SPHinXsys
alpha version
|
Defining a mesh cell linked list for a body. The meshes for all bodies share the same global coordinates. More...
#include <cell_linked_list.h>
Inherits SPH::BaseCellLinkedList, and SPH::Mesh.
Public Member Functions | |
CellLinkedList (BoundingBox tentative_bounds, Real grid_spacing, RealBody &real_body, SPHAdaptation &sph_adaptation) | |
void | allocateMeshDataMatrix () |
void | deleteMeshDataMatrix () |
virtual void | assignBaseParticles (BaseParticles *base_particles) override |
void | clearCellLists () |
void | UpdateCellListData () |
virtual void | UpdateCellLists () override |
void | insertACellLinkedParticleIndex (size_t particle_index, const Vecd &particle_position) override |
void | InsertACellLinkedListDataEntry (size_t particle_index, const Vecd &particle_position) override |
virtual ListData | findNearestListDataEntry (const Vecd &position) override |
virtual void | computingSequence (StdLargeVec< size_t > &sequence) override |
virtual void | tagBodyPartByCell (CellLists &cell_lists, std::function< bool(Vecd, Real)> &check_included) override |
virtual void | tagBodyDomainBoundingCells (StdVec< CellLists > &cell_lists, BoundingBox &body_domain_bounds, int axis) override |
virtual void | tagMirrorBoundingCells (CellLists &cell_lists, BoundingBox &body_domain_bounds, int axis, bool positive) override |
virtual void | writeMeshFieldToPlt (std::ofstream &output_file) override |
template<typename GetParticleIndex , typename GetSearchDepth , typename GetNeighborRelation > | |
void | searchNeighborsByParticles (size_t total_real_particles, BaseParticles &source_particles, ParticleConfiguration &particle_configuration, GetParticleIndex &get_particle_index, GetSearchDepth &get_search_depth, GetNeighborRelation &get_neighbor_relation) |
template<typename GetParticleIndex , typename GetSearchDepth , typename GetNeighborRelation , typename PartParticleCheck > | |
void | searchNeighborPartsByParticles (size_t total_real_particles, BaseParticles &source_particles, ParticleConfiguration &particle_configuration, GetParticleIndex &get_particle_index, GetSearchDepth &get_search_depth, GetNeighborRelation &get_neighbor_relation, PartParticleCheck &part_check) |
MeshDataMatrix< CellList > | getCellLists () const |
Public Member Functions inherited from SPH::BaseCellLinkedList | |
BaseCellLinkedList (RealBody &real_body, SPHAdaptation &sph_adaptation) | |
Public Member Functions inherited from SPH::BaseMeshField | |
BaseMeshField (const std::string &name) | |
std::string | Name () |
Public Member Functions inherited from SPH::Mesh | |
Mesh (BoundingBox tentative_bounds, Real grid_spacing, size_t buffer_width) | |
Mesh (Vecd mesh_lower_bound, Vecu number_of_cells, Real grid_spacing) | |
Vecu | NumberOfCells () |
size_t | MeshBufferSize () |
virtual Real | DataSpacing () |
Public Member Functions inherited from SPH::BaseMesh | |
BaseMesh (Vecu number_of_grid_points) | |
BaseMesh (Vecd mesh_lower_bound, Real grid_spacing, Vecu number_of_grid_points) | |
BaseMesh (BoundingBox tentative_bounds, Real grid_spacing, size_t buffer_width) | |
Vecd | MeshLowerBound () |
Real | GridSpacing () |
Vecu | NumberOfGridPoints () |
Vecu | NumberOfGridPointsFromNumberOfCells (const Vecu &number_of_cells) |
Vecu | NumberOfCellsFromNumberOfGridPoints (const Vecu &number_of_grid_points) |
Vecd | GridPositionFromCellPosition (const Vecd &cell_position) |
Vecu | CellIndexFromPosition (const Vecd &position) |
Vecd | CellPositionFromIndex (const Vecu &cell_index) |
Vecd | GridPositionFromIndex (const Vecu &grid_index) |
Vecu | transfer1DtoMeshIndex (const Vecu &number_of_mesh_indexes, size_t i) |
size_t | transferMeshIndexTo1D (const Vecu &number_of_mesh_indexes, const Vecu &mesh_index) |
size_t | MortonCode (const size_t &i) |
size_t | transferMeshIndexToMortonOrder (const Vecu &mesh_index) |
Protected Member Functions | |
virtual void | updateSplitCellLists (SplitCellLists &split_cell_lists) override |
Protected Member Functions inherited from SPH::BaseCellLinkedList | |
virtual void | clearSplitCellLists (SplitCellLists &split_cell_lists) |
Protected Member Functions inherited from SPH::Mesh | |
void | copyMeshProperties (Mesh *another_mesh) |
Protected Attributes | |
MeshDataMatrix< CellList > | cell_linked_lists_ |
Protected Attributes inherited from SPH::BaseCellLinkedList | |
RealBody & | real_body_ |
Kernel & | kernel_ |
BaseParticles * | base_particles_ |
Protected Attributes inherited from SPH::BaseMeshField | |
std::string | name_ |
Protected Attributes inherited from SPH::Mesh | |
size_t | buffer_width_ |
Vecu | number_of_cells_ |
Protected Attributes inherited from SPH::BaseMesh | |
Vecd | mesh_lower_bound_ |
Real | grid_spacing_ |
Vecu | number_of_grid_points_ |
Defining a mesh cell linked list for a body. The meshes for all bodies share the same global coordinates.
void SPH::CellLinkedList::allocateMeshDataMatrix | ( | ) |
allocate memories for addresses of data packages.
|
overridevirtual |
Assign base particles to the mesh cell linked list, and is important because particles are not defined in the constructor.
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
computing the sequence which indicate the order of sorted particle data
Implements SPH::BaseCellLinkedList.
void SPH::CellLinkedList::deleteMeshDataMatrix | ( | ) |
delete memories for addresses of data packages.
|
overridevirtual |
find the nearest list data entry
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
Insert a cell-linked_list entry of the index and particle position pair.
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
Insert a cell-linked_list entry to the concurrent index list.
Implements SPH::BaseCellLinkedList.
void SPH::CellLinkedList::searchNeighborPartsByParticles | ( | size_t | total_real_particles, |
BaseParticles & | source_particles, | ||
ParticleConfiguration & | particle_configuration, | ||
GetParticleIndex & | get_particle_index, | ||
GetSearchDepth & | get_search_depth, | ||
GetNeighborRelation & | get_neighbor_relation, | ||
PartParticleCheck & | part_check | ||
) |
generalized particle search algorithm for searching body part
void SPH::CellLinkedList::searchNeighborsByParticles | ( | size_t | total_real_particles, |
BaseParticles & | source_particles, | ||
ParticleConfiguration & | particle_configuration, | ||
GetParticleIndex & | get_particle_index, | ||
GetSearchDepth & | get_search_depth, | ||
GetNeighborRelation & | get_neighbor_relation | ||
) |
generalized particle search algorithm
|
overridevirtual |
Tag domain bounding cells in an axis direction, called by domain bounding classes
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
Tag body part by cell, call by body part
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
Tag mirror bounding cells, called by mirror boundary condition
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
update the cell lists
Implements SPH::BaseCellLinkedList.
|
overrideprotectedvirtual |
update split particle list in this mesh
Implements SPH::BaseCellLinkedList.
|
overridevirtual |
output mesh data for Tecplot visualization
Implements SPH::BaseMeshField.
|
protected |
The array for of mesh cells, i.e. mesh data. Within each cell, a list is saved with the indexes of particles.