NetDEM v1.0
|
Class for managing the simulation domain and particles that belong to it. More...
#include <domain.hpp>
Public Member Functions | |
Domain () | |
Constructs a new Domain object with default settings. | |
Domain (Vec3d const &bmin, Vec3d const &bmax) | |
Constructs a new Domain object with the given bounds. | |
int | GetSelfRank () const |
Get the rank id of the domain. | |
int | GetTotalRank () const |
Get the total ranks of the simulation. | |
std::tuple< Vec3d, Vec3d > | GetBound () const |
Get the bounds of the current domain. | |
void | Init () |
Initializes the domain. | |
void | InitScene (Scene *const scene) |
Initializes the domain with the given scene. | |
void | InitScene () |
Initializes the domain with a default scene. | |
Scene * | GetScene () |
Gets the pointer to the scene used by this domain. | |
void | SetBound (double bmin_x, double bmin_y, double bmin_z, double bmax_x, double bmax_y, double bmax_z) |
Sets the size of the domain. | |
void | SetCellSpacing (double s_x, double s_y, double s_z) |
Sets the cell spacing for the CellManager . | |
bool | IsJudgeDomain (Particle const &p, Particle const &q) |
Checks if a particle needs to be checked for contact detection in this domain. | |
bool | IsJudgeDomain (Particle const &p, Wall const &w) |
Checks if a particle needs to be checked for contact with a wall in this domain. | |
bool | IsBelongToDomain (Particle const &p) |
Checks if a particle belongs to this domain. | |
bool | IsBelongToDomain (ParticleData const &p) |
Checks if a particle data belongs to this domain. | |
bool | IsBelongToDomain (Vec3d const &pos) |
Checks if a position belongs to this domain. | |
bool | IsParticleProxyToSend (Particle const &p) |
Checks if a particle needs to be sent to other domains for contact detection. | |
bool | IsParticleProxyToRecv (Particle const &p) |
Checks if a particle needs to be received from other domains for contact detection. | |
bool | IsParticleProxyToRecv (ParticleData const &p) |
Checks if a particle data needs to be received from other domains for contact detection. | |
void | Print () |
Prints information about this domain to the screen. | |
VecXT< std::pair< Particle *, int > > const & | GetLinkedOuterParticles () |
Get the particles that belong to other domains but may potentially overlap with this domain. | |
void | ClearLinkedLists () |
Clears linked lists. | |
STLModel | GetSTLModel () |
Returns an STLModel object for visualization purposes. | |
~Domain () | |
Destructor for the Domain object. | |
Public Attributes | |
CellManager | cell_manager |
Manages the cells, which are used in the borad-phase contact detection. | |
Protected Member Functions | |
void | RemoveLinkedParticle (int lookup_id) |
Remove a linked particle by look-up id. | |
Friends | |
class | Particle |
class | Wall |
class | MPIManager |
class | DomainManager |
Class for managing the simulation domain and particles that belong to it.
The Domain
class includes a CellManager
object for broad-phase contact detection. It stores information about the rank id and total number of processes, the lower and upper bounds of the domain, and a list of particles that are outside of the domain but need to be transferred to it for contact detection.
Domain::Domain | ( | ) |
Constructs a new Domain
object with default settings.
Constructs a new Domain
object with the given bounds.
bmin | Lower bound of the domain. |
bmax | Upper bound of the domain. |
Domain::~Domain | ( | ) |
Destructor for the Domain
object.
void Domain::ClearLinkedLists | ( | ) |
Clears linked lists.
Get the particles that belong to other domains but may potentially overlap with this domain.
Scene * Domain::GetScene | ( | ) |
Gets the pointer to the scene used by this domain.
int Domain::GetSelfRank | ( | ) | const |
Get the rank id of the domain.
STLModel Domain::GetSTLModel | ( | ) |
int Domain::GetTotalRank | ( | ) | const |
Get the total ranks of the simulation.
void Domain::Init | ( | ) |
Initializes the domain.
void Domain::InitScene | ( | ) |
Initializes the domain with a default scene.
void Domain::InitScene | ( | Scene *const | scene | ) |
Initializes the domain with the given scene.
scene | Pointer to the scene to use for initialization. |
bool Domain::IsBelongToDomain | ( | Particle const & | p | ) |
Checks if a particle belongs to this domain.
A particle is assumed to belong to this domain if its centroid is inside this domain.
p | The particle to check. |
bool Domain::IsBelongToDomain | ( | ParticleData const & | p | ) |
Checks if a particle data belongs to this domain.
A particle is assumed to belong to this domain if its centroid is inside this domain.
p | ParticleData struct containing the particle data to check. |
bool Domain::IsBelongToDomain | ( | Vec3d const & | pos | ) |
Checks if a position belongs to this domain.
pos | The position to check. |
Checks if a particle needs to be checked for contact detection in this domain.
p | The first particle involved in the potential contact. |
q | The second particle involved in the potential contact. |
Checks if a particle needs to be checked for contact with a wall in this domain.
p | The particle involved in the potential contact. |
w | The wall involved in the potential contact. |
bool Domain::IsParticleProxyToRecv | ( | Particle const & | p | ) |
Checks if a particle needs to be received from other domains for contact detection.
p | The particle to check. |
bool Domain::IsParticleProxyToRecv | ( | ParticleData const & | p | ) |
Checks if a particle data needs to be received from other domains for contact detection.
p | ParticleData struct containing the particle data to check. |
bool Domain::IsParticleProxyToSend | ( | Particle const & | p | ) |
Checks if a particle needs to be sent to other domains for contact detection.
p | The particle to check. |
void Domain::Print | ( | ) |
Prints information about this domain to the screen.
|
protected |
Remove a linked particle by look-up id.
void Domain::SetBound | ( | double | bmin_x, |
double | bmin_y, | ||
double | bmin_z, | ||
double | bmax_x, | ||
double | bmax_y, | ||
double | bmax_z ) |
Sets the size of the domain.
bmin_x | Lower bound in the x direction. |
bmin_y | Lower bound in the y direction. |
bmin_z | Lower bound in the z direction. |
bmax_x | Upper bound in the x direction. |
bmax_y | Upper bound in the y direction. |
bmax_z | Upper bound in the z direction. |
void Domain::SetCellSpacing | ( | double | s_x, |
double | s_y, | ||
double | s_z ) |
Sets the cell spacing for the CellManager
.
|
friend |
|
friend |
|
friend |
|
friend |
CellManager netdem::Domain::cell_manager |
Manages the cells, which are used in the borad-phase contact detection.