SPHinXsys
alpha version
|
The tree is composed of a root (the first branch) and other branch generated sequentially. More...
#include <complex_body.h>
Inherits SPH::SecondaryStructure, and SPH::RealBody.
Classes | |
class | Branch |
Each branch (except the root) has a parent and several children, and geometric information. It is a realized edge and has multi inner particles. The first is the last particle from the parent or root, and the last is the first particle of all its child branches. Many connected branches compose a tree. More... | |
Public Member Functions | |
TreeBody (SPHSystem &sph_system, SharedPtr< Shape > shape_ptr) | |
Branch * | createANewBranch (size_t parent_id) |
size_t | BranchLocation (size_t particle_idx) |
Branch * | LastBranch () |
virtual void | buildParticleConfiguration (ParticleConfiguration &particle_configuration) override |
size_t | ContainerSize () |
Public Member Functions inherited from SPH::RealBody | |
RealBody (SPHSystem &sph_system, SharedPtr< Shape > shape_ptr) | |
void | setUseSplitCellLists () |
bool | getUseSplitCellLists () |
SplitCellLists & | getSplitCellLists () |
virtual void | assignBaseParticles (BaseParticles *base_particles) override |
virtual void | sortParticleWithCellLinkedList () |
virtual void | updateCellLinkedList () |
template<class AdaptationType , typename... ConstructorArgs> | |
void | defineAdaptation (ConstructorArgs &&...args) |
Public Member Functions inherited from SPH::SPHBody | |
SPHBody (SPHSystem &sph_system, SharedPtr< Shape > shape_ptr) | |
std::string | getBodyName () |
SPHSystem & | getSPHSystem () |
Real | getSPHBodyResolutionRef () |
void | setNewlyUpdated () |
void | setNotNewlyUpdated () |
bool | checkNewlyUpdated () |
void | setBodyDomainBounds (const BoundingBox &body_domain_bounds) |
BoundingBox | getBodyDomainBounds () |
BoundingBox | getSPHSystemBounds () |
template<typename... ConstructorArgs> | |
LevelSetShape * | defineComponentLevelSetShape (const std::string &shape_name, ConstructorArgs &&...args) |
template<typename... ConstructorArgs> | |
LevelSetShape * | defineBodyLevelSetShape (ConstructorArgs &&...args) |
template<class ParticleType = BaseParticles, class MaterialType = BaseMaterial> | |
void | defineParticlesWithMaterial (MaterialType *material) |
template<class ParticleType = BaseParticles, class MaterialType = BaseMaterial, typename... ConstructorArgs> | |
void | defineParticlesAndMaterial (ConstructorArgs &&...args) |
template<class ParticleGeneratorType , typename... ConstructorArgs> | |
void | generateParticles (ConstructorArgs &&...args) |
void | allocateConfigurationMemoriesForBufferParticles () |
template<typename VariableType > | |
void | addBodyStateForRecording (const std::string &variable_name) |
template<class DerivedVariableMethod > | |
void | addDerivedBodyStateForRecording () |
virtual void | writeParticlesToVtuFile (std::ostream &output_file) |
virtual void | writeParticlesToVtpFile (std::ofstream &output_file) |
virtual void | writeParticlesToPltFile (std::ofstream &output_file) |
virtual void | writeSurfaceParticlesToVtuFile (std::ofstream &output_file, BodySurface &surface_particles) |
virtual void | writeParticlesToXmlForRestart (std::string &filefullpath) |
virtual void | readParticlesFromXmlForRestart (std::string &filefullpath) |
virtual void | writeToXmlForReloadParticle (std::string &filefullpath) |
virtual void | readFromXmlForReloadParticle (std::string &filefullpath) |
virtual SPHBody * | ThisObjectPtr () |
Public Attributes | |
StdVec< Branch * > | branches_ |
IndexVector | branch_locations_ |
size_t | last_branch_id_ |
Branch * | root_ |
Public Attributes inherited from SPH::RealBody | |
ParticleSorting | particle_sorting_ |
BaseCellLinkedList * | cell_linked_list_ |
Public Attributes inherited from SPH::SPHBody | |
Shape * | body_shape_ |
SPHAdaptation * | sph_adaptation_ |
BaseMaterial * | base_material_ |
BaseParticles * | base_particles_ |
StdVec< SPHBodyRelation * > | body_relations_ |
Additional Inherited Members | |
Protected Attributes inherited from SPH::SPHBody | |
UniquePtrKeeper< SPHAdaptation > | sph_adaptation_ptr_keeper_ |
SPHSystem & | sph_system_ |
std::string | body_name_ |
bool | newly_updated_ |
BoundingBox | body_domain_bounds_ |
bool | is_domain_bounds_determined_ |
The tree is composed of a root (the first branch) and other branch generated sequentially.
|
overridevirtual |
First branch Note that the first branch has only one particle. Find the neighbors in child branch, the first branch only have one child, id = 1.
Build configuration.
Second branch. The second branch has special parent branch, branch 0, consisting only one point. The child branch are two normal branch.
Other branches. They are may normal branch (fully growed, has child and parent) or non-fully growed branch
This branch is fully growed.
This branch is not fully growed.
Implements SPH::SecondaryStructure.
IndexVector SPH::TreeBody::branch_locations_ |
in which branch are the particles located
StdVec<Branch *> SPH::TreeBody::branches_ |
Container of all branches