PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A class to store reference particle related data. Consider a case of multiple hexagon-shaped particle related to each other by affine transformation. In such a case, it is possible to consider a reference hexagon particle and store the mesh and other details of only the reference particle. To get the data relevant to specific hexagon particle, one can apply the appropriate transformation on data for the reference hexagon particle. More...
#include <refParticle.h>
Public Member Functions | |
RefParticle (size_t id, std::shared_ptr< model::ModelData > model_data, std::shared_ptr< util::geometry::GeomObject > geom, std::shared_ptr< fe::Mesh > mesh) | |
Constructor. | |
std::string | printStr (int nt=0, int lvl=0) const |
Returns the string containing printable information about the object. | |
void | print (int nt=0, int lvl=0) const |
Prints the information about the object. | |
Accessors | |
std::shared_ptr< fe::Mesh > & | getMeshP () |
Get pointer to mesh object. | |
const std::shared_ptr< fe::Mesh > & | getMeshP () const |
Get pointer to mesh object. | |
std::shared_ptr< util::geometry::GeomObject > & | getGeomP () |
Get pointer to geometry object. | |
const std::shared_ptr< util::geometry::GeomObject > & | getGeomP () const |
Get pointer to geometry object. | |
fe::Mesh & | getMesh () |
Get reference to mesh object. | |
const fe::Mesh & | getMesh () const |
Get reference to mesh object. | |
size_t | getDimension () const |
Get the dimension of the domain. | |
size_t | getNumNodes () const |
Get the number of nodes. | |
util::Point | getNode (const size_t &i) const |
Get reference coordinate of a node. | |
double | getNodalVolume (const size_t &i) const |
Get nodal volume. | |
size_t | getCenterNodeId () const |
Get id of center node of particle. | |
double | getParticleRadius () const |
Get radius of reference particle. | |
Data Fields | |
size_t | d_id |
Id of reference particle in list d_referenceParticles in ModelData. | |
std::shared_ptr< model::ModelData > | d_modelData_p |
Reference to model class. | |
std::shared_ptr< fe::Mesh > | d_mesh_p |
Pointer to mesh on reference particle. | |
size_t | d_centerNode |
Id of mesh node closest to the particle center. | |
std::shared_ptr< util::geometry::GeomObject > | d_geom_p |
Geometrical object defining this particle. | |
double | d_pRadius |
Particle radius. | |
std::vector< size_t > | d_bNodes |
List of nodes near boundary. | |
std::vector< uint8_t > | d_intFlags |
Interior flags. For given node i the flag is d_intFlags[i%8]. We use 1 bit per node. | |
A class to store reference particle related data. Consider a case of multiple hexagon-shaped particle related to each other by affine transformation. In such a case, it is possible to consider a reference hexagon particle and store the mesh and other details of only the reference particle. To get the data relevant to specific hexagon particle, one can apply the appropriate transformation on data for the reference hexagon particle.
Definition at line 40 of file refParticle.h.
particle::RefParticle::RefParticle | ( | size_t | id, |
std::shared_ptr< model::ModelData > | model_data, | ||
std::shared_ptr< util::geometry::GeomObject > | geom, | ||
std::shared_ptr< fe::Mesh > | mesh | ||
) |
Constructor.
id | Id of this object in list of all reference particles in ModelData |
model_data | Global model data |
geom | Particle geometry object |
mesh | Pointer to mesh |
Definition at line 18 of file refParticle.cpp.
References d_centerNode, d_geom_p, d_pRadius, and util::isLess().
|
inline |
Get id of center node of particle.
Definition at line 124 of file refParticle.h.
References d_centerNode.
|
inline |
Get the dimension of the domain.
Definition at line 90 of file refParticle.h.
References d_mesh_p.
|
inline |
Get pointer to geometry object.
Definition at line 72 of file refParticle.h.
References d_geom_p.
|
inline |
Get pointer to geometry object.
Definition at line 75 of file refParticle.h.
References d_geom_p.
|
inline |
Get reference to mesh object.
Definition at line 81 of file refParticle.h.
References d_mesh_p.
|
inline |
Get reference to mesh object.
Definition at line 84 of file refParticle.h.
References d_mesh_p.
|
inline |
Get pointer to mesh object.
Definition at line 63 of file refParticle.h.
References d_mesh_p.
|
inline |
Get pointer to mesh object.
Definition at line 66 of file refParticle.h.
References d_mesh_p.
|
inline |
Get nodal volume.
i | Index of node |
Definition at line 116 of file refParticle.h.
References d_mesh_p.
|
inline |
Get reference coordinate of a node.
i | Index of node |
Definition at line 107 of file refParticle.h.
References d_mesh_p.
|
inline |
Get the number of nodes.
Definition at line 98 of file refParticle.h.
References d_mesh_p.
|
inline |
Get radius of reference particle.
Definition at line 130 of file refParticle.h.
References d_pRadius.
|
inline |
Prints the information about the object.
nt | Number of tabs to append before printing |
lvl | Information level (higher means more information) |
Definition at line 149 of file refParticle.h.
References printStr().
std::string particle::RefParticle::printStr | ( | int | nt = 0 , |
int | lvl = 0 |
||
) | const |
Returns the string containing printable information about the object.
nt | Number of tabs to append before printing |
lvl | Information level (higher means more information) |
Definition at line 48 of file refParticle.cpp.
References util::io::getTabS().
Referenced by print().
std::vector<size_t> particle::RefParticle::d_bNodes |
List of nodes near boundary.
Definition at line 171 of file refParticle.h.
size_t particle::RefParticle::d_centerNode |
Id of mesh node closest to the particle center.
Definition at line 162 of file refParticle.h.
Referenced by getCenterNodeId(), and RefParticle().
std::shared_ptr<util::geometry::GeomObject> particle::RefParticle::d_geom_p |
Geometrical object defining this particle.
Definition at line 165 of file refParticle.h.
Referenced by getGeomP(), getGeomP(), and RefParticle().
size_t particle::RefParticle::d_id |
Id of reference particle in list d_referenceParticles in ModelData.
Definition at line 153 of file refParticle.h.
std::vector<uint8_t> particle::RefParticle::d_intFlags |
Interior flags. For given node i the flag is d_intFlags[i%8]. We use 1 bit per node.
Definition at line 177 of file refParticle.h.
std::shared_ptr<fe::Mesh> particle::RefParticle::d_mesh_p |
Pointer to mesh on reference particle.
Definition at line 159 of file refParticle.h.
Referenced by getDimension(), getMesh(), getMesh(), getMeshP(), getMeshP(), getNodalVolume(), getNode(), and getNumNodes().
std::shared_ptr<model::ModelData> particle::RefParticle::d_modelData_p |
Reference to model class.
Definition at line 156 of file refParticle.h.
double particle::RefParticle::d_pRadius |
Particle radius.
Definition at line 168 of file refParticle.h.
Referenced by getParticleRadius(), and RefParticle().