NetDEM v1.0
|
A class representing a cell in a simulation grid. More...
#include <cell.hpp>
Public Member Functions | |
Cell () | |
Default constructor for the Cell class. | |
Cell (Vec3d const &bmin, Vec3d const &bmax) | |
Constructor for the Cell class with bounding box specified. | |
bool | IsJudgeCell (Particle const &p, Particle const &q) |
Determine if two particles are in the same cell. | |
bool | IsJudgeCell (Particle const &p, Wall const &w) |
Determine if a particle and a wall are in the same cell. | |
std::tuple< Vec3d, Vec3d > | GetBound () const |
Get the lower and upper coordinates of the cell box. | |
VecXT< std::pair< Particle *, int > > const & | GetLinkedParticles () const |
Get the particles that are linked with this cell. | |
VecXT< std::pair< Wall *, int > > const & | GetLinkedWalls () const |
Get the walls that are linked with this cell. | |
void | ClearLinkedLists () |
Clear the linked particle and wall lists. | |
STLModel | GetSTLModel () |
Generate an STL model for visualization purposes. | |
~Cell () | |
Default destructor for the Cell class. | |
void | Print () |
Print the bounding box of the cell to stdout. | |
Protected Member Functions | |
void | RemoveLinkedParticle (int lookup_id) |
Remove a linked particle by look-up id. | |
void | RemoveLinkedWall (int lookup_id) |
Remove a linked wall by look-up id. | |
Friends | |
class | Particle |
class | Wall |
class | MPIManager |
A class representing a cell in a simulation grid.
This class keeps track of particles and walls that are located within its boundaries. It is used for broad-phase contact detection. The particles in a sub-domain will first be sorted into cells, so that only the particles that fall in the same cell could be potentially contact with each other.
Cell::Cell | ( | ) |
Default constructor for the Cell class.
Constructor for the Cell class with bounding box specified.
bmin | The minimum coordinates of the cell's bounding box. |
bmax | The maximum coordinates of the cell's bounding box. |
Cell::~Cell | ( | ) |
Default destructor for the Cell class.
void Cell::ClearLinkedLists | ( | ) |
Clear the linked particle and wall lists.
Get the particles that are linked with this cell.
Get the walls that are linked with this cell.
STLModel Cell::GetSTLModel | ( | ) |
Generate an STL model for visualization purposes.
Determine if two particles are in the same cell.
p | The first particle. |
q | The second particle. |
Determine if a particle and a wall are in the same cell.
p | The particle. |
w | The wall. |
void Cell::Print | ( | ) |
Print the bounding box of the cell to stdout.
|
protected |
Remove a linked particle by look-up id.
|
protected |
Remove a linked wall by look-up id.
|
friend |
|
friend |
|
friend |