PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
particle::BaseParticle Class Reference

A class to store particle geometry, nodal discretization, and methods. More...

#include <baseParticle.h>

Collaboration diagram for particle::BaseParticle:

Public Member Functions

 BaseParticle (size_t id=0)
 Constructor.
 
 BaseParticle (size_t id, bool isWall, size_t dim, std::map< std::string, size_t > groups, bool are_all_dofs_constrained, size_t num_nodes, double h, std::shared_ptr< data::ModelData > model_data, std::shared_ptr< particle::RefParticle > ref_particle, std::shared_ptr< geom::GeomObject > geom, geom::ParticleTransform &transform, std::shared_ptr< mesh::Mesh > mesh, inp::MaterialDeck &material_deck, bool populate_data=true)
 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
size_t getId () const
 Get id.
 
bool isWall () const
 Is this particle a wall?
 
size_t getGroupId (const std::string &key) const
 Get group id for given key.
 
size_t getDimension () const
 Get the dimension of the domain.
 
std::shared_ptr< mesh::Mesh > & getMeshP ()
 Get pointer to mesh object.
 
const std::shared_ptr< mesh::Mesh > & getMeshP () const
 Get pointer to mesh object.
 
mesh::MeshgetMesh ()
 Get reference to mesh object.
 
const mesh::MeshgetMesh () const
 Get reference to mesh object.
 
double getMeshSize () const
 Get mesh size.
 
double getDensity () const
 Get density.
 
double getHorizon () const
 Get horizon.
 
material::MaterialgetMaterial ()
 Get pointer to material object.
 
const material::MaterialgetMaterial () const
 Get id.
 
size_t getNumNodes () const
 Get the number of nodes.
 
size_t getNodeId (size_t i_loc) const
 Get global id of node given the local id of node in this object.
 
Get and set reference coordinate
util::PointgetXRef (size_t i)
 Get reference coordinate of the node.
 
const util::PointgetXRef (size_t i) const
 Get reference coordinate of the node.
 
void setXRef (size_t i, const util::Point &x)
 Set reference coordinate of the node.
 
void addXRef (size_t i, const util::Point &x)
 Add reference coordinate of the node.
 
void setXRef (size_t i, int dof, double x)
 Set specific reference coordinate of the node.
 
void addXRef (size_t i, int dof, double x)
 Add specific reference coordinate of the node.
 
util::PointgetXRefLocal (size_t i)
 Get reference coordinate of the node given node's local id.
 
const util::PointgetXRefLocal (size_t i) const
 Get reference coordinate of the node.
 
void setXRefLocal (size_t i, const util::Point &x)
 Set reference coordinate of the node given node's local id.
 
void addXRefLocal (size_t i, const util::Point &x)
 Add to reference coordinate of the node given node's local id.
 
void setXRefLocal (size_t i, int dof, double x)
 Set specific reference coordinate of the node given node's local id.
 
void addXRefLocal (size_t i, int dof, double x)
 Add to specific reference coordinate of the node given node's local id.
 
Get and set current coordinate
util::PointgetX (size_t i)
 Get current coordinate of the node.
 
const util::PointgetX (size_t i) const
 Get current coordinate of the node.
 
void setX (size_t i, const util::Point &x)
 Set current coordinate of the node.
 
void addX (size_t i, const util::Point &x)
 Add current coordinate of the node.
 
void setX (size_t i, int dof, double x)
 Set specific current coordinate of the node.
 
void addX (size_t i, int dof, double x)
 Add to specific current coordinate of the node.
 
util::PointgetXLocal (size_t i)
 Get current coordinate of the node given node's local id.
 
const util::PointgetXLocal (size_t i) const
 Get current coordinate of the node.
 
void setXLocal (size_t i, const util::Point &x)
 Set current coordinate of the node given node's local id.
 
void addXLocal (size_t i, const util::Point &x)
 Add to current coordinate of the node given node's local id.
 
void setXLocal (size_t i, int dof, double x)
 Set specific current coordinate of the node given node's local id.
 
void addXLocal (size_t i, int dof, double x)
 Add to specific current coordinate of the node given node's local id.
 
Get and set displacement
util::PointgetU (size_t i)
 Get displacement of the node.
 
const util::PointgetU (size_t i) const
 Get displacement of the node.
 
void setU (size_t i, const util::Point &u)
 Set displacement of the node.
 
void addU (size_t i, const util::Point &u)
 Add to displacement of the node.
 
void setU (size_t i, int dof, double u)
 Set displacement of the node.
 
void addU (size_t i, int dof, double u)
 Add to displacement of the node.
 
util::PointgetULocal (size_t i)
 Get displacement of the node given node's local id.
 
const util::PointgetULocal (size_t i) const
 Get displacement of the node given node's local id.
 
void setULocal (size_t i, const util::Point &u)
 Set displacement of the node given node's local id.
 
void addULocal (size_t i, const util::Point &u)
 Add to displacement of the node given node's local id.
 
void setULocal (size_t i, int dof, double u)
 Set displacement of the node given node's local id.
 
void addULocal (size_t i, int dof, double u)
 Add to displacement of the node given node's local id.
 
Get and set velocity
util::PointgetV (size_t i)
 Get velocity of the node.
 
const util::PointgetV (size_t i) const
 Get velocity of the node.
 
void setV (size_t i, const util::Point &v)
 Set velocity of the node.
 
void addV (size_t i, const util::Point &v)
 Add to velocity of the node.
 
void setV (size_t i, int dof, double v)
 Set velocity of the node.
 
void addV (size_t i, int dof, double v)
 Add to velocity of the node.
 
util::PointgetVLocal (size_t i)
 Get velocity of the node given node's local id.
 
const util::PointgetVLocal (size_t i) const
 Get velocity of the node.
 
void setVLocal (size_t i, const util::Point &v)
 Set velocity of the node given node's local id.
 
void addVLocal (size_t i, const util::Point &v)
 Add to velocity of the node given node's local id.
 
void setVLocal (size_t i, int dof, double v)
 Set velocity of the node given node's local id.
 
void addVLocal (size_t i, int dof, double v)
 Add to velocity of the node given node's local id.
 
Get and set force
util::PointgetF (size_t i)
 Get force of the node.
 
const util::PointgetF (size_t i) const
 Get force of the node.
 
void setF (size_t i, const util::Point &f)
 Set force of the node.
 
void addF (size_t i, const util::Point &f)
 Add to force of the node.
 
void setF (size_t i, int dof, double f)
 Set force of the node.
 
void addF (size_t i, int dof, double f)
 Add to force of the node.
 
util::PointgetFLocal (size_t i)
 Get force of the node given node's local id.
 
const util::PointgetFLocal (size_t i) const
 Get force of the node.
 
void setFLocal (size_t i, const util::Point &f)
 Set force of the node given node's local id.
 
void addFLocal (size_t i, const util::Point &f)
 Add to force of the node given node's local id.
 
void setFLocal (size_t i, int dof, double f)
 Set force of the node given node's local id.
 
void addFLocal (size_t i, int dof, double f)
 Add to force of the node given node's local id.
 
Get and set volume
double & getVol (size_t i)
 Get volume of the node.
 
const double & getVol (size_t i) const
 Get volume of the node.
 
void setVol (size_t i, const double &vol)
 Set volume of the node.
 
void addVol (size_t i, const double &vol)
 Add to volume of the node.
 
double & getVolLocal (size_t i)
 Get volume of the node given node's local id.
 
const double & getVolLocal (size_t i) const
 Get volume of the node.
 
void setVolLocal (size_t i, const double &vol)
 Set volume of the node given node's local id.
 
void addVolLocal (size_t i, const double &vol)
 Add to volume of the node given node's local id.
 
Get and set fixity
uint8_t & getFix (size_t i)
 Get fixity of the node.
 
const uint8_t & getFix (size_t i) const
 Get fixity of the node.
 
void setFix (size_t i, const unsigned int &dof, const bool &flag)
 Set fixity of the node.
 
uint8_t & getFixLocal (size_t i)
 Get fixity of the node given node's local id.
 
const uint8_t & getFixLocal (size_t i) const
 Get fixity of the node.
 
void setFixLocal (size_t i, const unsigned int &dof, const bool &flag)
 Set fixity of the node given node's local id.
 
Get and set mx
double & getMx (size_t i)
 Get weighted-volume (mx) of the node.
 
const double & getMx (size_t i) const
 Get weighted-volume (mx) of the node.
 
void setMx (size_t i, const double &mx)
 Set weighted-volume (mx) of the node.
 
void addMx (size_t i, const double &mx)
 Add to weighted-volume (mx) of the node.
 
double & getMxLocal (size_t i)
 Get weighted-volume (mx) of the node given node's local id.
 
const double & getMxLocal (size_t i) const
 Get weighted-volume (mx) of the node.
 
void setMxLocal (size_t i, const double &mx)
 Set weighted-volume (mx) of the node given node's local id.
 
void addMxLocal (size_t i, const double &mx)
 Add to weighted-volume (mx) of the node given node's local id.
 
Get and set thetax
double & getThetax (size_t i)
 Get volumetric deformation (thetax) of the node.
 
const double & getThetax (size_t i) const
 Get volumetric deformation (thetax) of the node.
 
void setThetax (size_t i, const double &thetax)
 Set volumetric deformation (thetax) of the node.
 
void addThetax (size_t i, const double &thetax)
 Add to volumetric deformation (thetax) of the node.
 
double & getThetaxLocal (size_t i)
 Get volumetric deformation (thetax) of the node given node's local id.
 
const double & getThetaxLocal (size_t i) const
 Get volumetric deformation (thetax) of the node.
 
void setThetaxLocal (size_t i, const double &thetax)
 Set volumetric deformation (thetax) of the node given node's local id.
 
void addThetaxLocal (size_t i, const double &thetax)
 Add to volumetric deformation (thetax) of the node given node's local id.
 
Get and set center node data
size_t getCenterNodeId () const
 Get id of center node of particle.
 
double getParticleRadius () const
 Get radius of reference particle.
 
util::PointgetXCenter ()
 Get current coordinate of center node.
 
const util::PointgetXCenter () const
 Get current coordinate of center node.
 
util::PointgetUCenter ()
 Get displacement of center node.
 
const util::PointgetUCenter () const
 Get displacement of center node.
 
util::PointgetVCenter ()
 Get velocity of center node.
 
const util::PointgetVCenter () const
 Get velocity of center node.
 

Data Fields

bool d_isWall
 
size_t d_id
 Id of this particle in all particles list.
 
std::map< std::string, size_t > d_groups
 Map that provides different groups of this particle.
 
size_t d_dim
 Dimension of this particle.
 
size_t d_numNodes
 Number of nodes in this particle.
 
double d_pRadius
 Particle radius.
 
double d_h
 mesh size
 
bool d_allDofsConstrained
 Specify if all dofs are constrained so we do not update displacement, velocity, and force data.
 
bool d_computeForce
 Specify if we compute force.
 
int d_mpiOwner
 MPI owner rank for this grain (-1 = wall / all ranks). Used by particle-parallel (T09); ignored when not using MPI.
 
double d_horizon
 horizon
 
double d_density
 density
 
std::unique_ptr< material::Materiald_material_p
 Pointer to peridynamic material object.
 
double d_Rc
 Contact radius for contact between internal nodes of particle.
 
double d_Kn
 Normal contact coefficient for internal contact.
 
size_t d_globStart
 Id of first node of this object in global node list.
 
size_t d_globEnd
 Id of last node of this object in global node list.
 
size_t d_globQuadStart
 Id of first node of this object in global quadrature data list, e.g., strain in elements at quadrature points.
 
size_t d_globQuadEnd
 Id of last node of this object in global quadrature data list, e.g., strain in elements at quadrature points.
 
std::shared_ptr< data::ModelDatad_modelData_p
 Reference to model class.
 
std::shared_ptr< particle::RefParticled_rp_p
 Pointer to reference particle.
 
std::shared_ptr< geom::GeomObjectd_geom_p
 Geometrical object defining this particle.
 
geom::ParticleTransform d_tform
 Transformation related data.
 
std::shared_ptr< mesh::Meshd_mesh_p
 Pointer to mesh on reference particle.
 

Detailed Description

A class to store particle geometry, nodal discretization, and methods.

This class generates a base particle for peri-dem simulations. It holds the nodal positions, geometry of particle, list of nodes

Definition at line 32 of file baseParticle.h.

Constructor & Destructor Documentation

◆ BaseParticle() [1/2]

particle::BaseParticle::BaseParticle ( size_t  id = 0)

Constructor.

Parameters
idId of this object in list of all base particle objects

Definition at line 21 of file baseParticle.cpp.

22: d_isWall(false),
23 d_id(id),
24 d_dim(0),
25 d_numNodes(0),
26 d_h(0.),
27 d_horizon(0.),
28 d_density(0.),
30 d_computeForce(true),
31 d_mpiOwner(0),
32 d_material_p(nullptr),
33 d_Rc(0.),
34 d_Kn(0.),
35 d_globStart(0),
36 d_globEnd(0),
39 d_modelData_p(nullptr),
40 d_rp_p(nullptr),
41 d_geom_p(nullptr),
43 d_mesh_p(nullptr) {}
double d_Rc
Contact radius for contact between internal nodes of particle.
geom::ParticleTransform d_tform
Transformation related data.
bool d_allDofsConstrained
Specify if all dofs are constrained so we do not update displacement, velocity, and force data.
bool d_computeForce
Specify if we compute force.
size_t d_globQuadEnd
Id of last node of this object in global quadrature data list, e.g., strain in elements at quadrature...
double d_horizon
horizon
double d_h
mesh size
size_t d_numNodes
Number of nodes in this particle.
size_t d_globStart
Id of first node of this object in global node list.
double d_density
density
size_t d_globQuadStart
Id of first node of this object in global quadrature data list, e.g., strain in elements at quadratur...
size_t d_id
Id of this particle in all particles list.
std::shared_ptr< geom::GeomObject > d_geom_p
Geometrical object defining this particle.
int d_mpiOwner
MPI owner rank for this grain (-1 = wall / all ranks). Used by particle-parallel (T09); ignored when ...
size_t d_dim
Dimension of this particle.
std::shared_ptr< mesh::Mesh > d_mesh_p
Pointer to mesh on reference particle.
size_t d_globEnd
Id of last node of this object in global node list.
std::unique_ptr< material::Material > d_material_p
Pointer to peridynamic material object.
double d_Kn
Normal contact coefficient for internal contact.
std::shared_ptr< particle::RefParticle > d_rp_p
Pointer to reference particle.
std::shared_ptr< data::ModelData > d_modelData_p
Reference to model class.
A struct that stores transformation parameters and provides method to transform the particle....

◆ BaseParticle() [2/2]

particle::BaseParticle::BaseParticle ( size_t  id,
bool  isWall,
size_t  dim,
std::map< std::string, size_t >  groups,
bool  are_all_dofs_constrained,
size_t  num_nodes,
double  h,
std::shared_ptr< data::ModelData model_data,
std::shared_ptr< particle::RefParticle ref_particle,
std::shared_ptr< geom::GeomObject geom,
geom::ParticleTransform transform,
std::shared_ptr< mesh::Mesh mesh,
inp::MaterialDeck material_deck,
bool  populate_data = true 
)

Constructor.

Parameters
particle_typeType of the object (e.g. particle or wall)
idId of this object in list of all base particle objects
particle_type_idId of this object in list of specific type of particles (e.g. id in the list of walls or particles)
zone_idZone id this object belongs to
dimSpatial dimension
particle_descriptionDescription of particle if there is (e.g., 'rigid')
is_particle_a_wallIs this particle a wall?
are_all_dofs_constrainedTrue means all dofs are constrained so we do not need to compute forces
num_nodesNumber of nodes
hMesh size
model_dataGlobal model data
material_deckMaterial input data deck
populate_dataModify global model data to add the properties of this object

Definition at line 45 of file baseParticle.cpp.

59 : d_id(id),
60 d_dim(dim),
62 d_groups(groups),
63 d_numNodes(num_nodes),
64 d_h(h),
65 d_horizon(0),
66 d_density(0),
67 d_allDofsConstrained(are_all_dofs_constrained),
68 d_computeForce(true),
69 d_mpiOwner(0),
70 d_material_p(nullptr),
71 d_Rc(0.),
72 d_Kn(0.),
73 d_globStart(0),
74 d_globEnd(0),
77 d_modelData_p(model_data),
78 d_rp_p(ref_particle),
80 d_tform(transform),
82 d_pRadius(geom->boundingRadius()) {
83
85
86 if (populate_data) {
87
88 d_globStart = d_modelData_p->d_x.size();
89 d_globEnd = d_modelData_p->d_x.size() + d_rp_p->getNumNodes();
90
91 for (size_t i = 0; i < d_rp_p->getNumNodes(); i++) {
92
93 const util::Point vn = d_rp_p->getNode(i);
94 util::Point x0 = d_tform.apply(vn);
95
96 d_modelData_p->d_xRef.push_back(x0);
97 d_modelData_p->d_x.push_back(x0);
98 d_modelData_p->d_u.push_back(util::Point());
99 d_modelData_p->d_v.push_back(util::Point());
100 d_modelData_p->d_vMag.push_back(0.);
101 d_modelData_p->d_f.push_back(util::Point());
102 d_modelData_p->d_vol.push_back(
103 d_rp_p->getNodalVolume(i) *
104 std::pow(d_tform.d_scale, d_rp_p->getDimension()));
105 d_modelData_p->d_fix.push_back(uint8_t(0));
106 d_modelData_p->d_forceFixity.push_back(uint8_t(0));
107 d_modelData_p->d_thetaX.push_back(0.);
108 d_modelData_p->d_mX.push_back(0.);
109 d_modelData_p->d_ptId.push_back(id); // id of this particle
110 }
111 }
112
114
115 // initialize material class
116 inp::MaterialDeck p_material_deck = material_deck;
117 // double horizon = d_geom_p->inscribedRadius();
118 double horizon = p_material_deck.d_horizon;
119 if (p_material_deck.d_horizonMeshRatio > 0.)
120 horizon = p_material_deck.d_horizonMeshRatio * d_h;
121
122 if (p_material_deck.d_materialType == "RNPBond")
123 d_material_p = std::make_unique<material::RnpMaterial>(
124 p_material_deck, d_rp_p->getDimension(), horizon);
125 else if (p_material_deck.d_materialType == "PMBBond")
126 d_material_p = std::make_unique<material::PmbMaterial>(
127 p_material_deck, d_rp_p->getDimension(), horizon);
128 else if (p_material_deck.d_materialType == "PDElasticBond")
129 d_material_p = std::make_unique<material::PdElastic>(
130 p_material_deck, d_rp_p->getDimension(), horizon);
131 else if (p_material_deck.d_materialType == "PDState")
132 d_material_p = std::make_unique<material::PdState>(
133 p_material_deck, d_rp_p->getDimension(), horizon);
134
135 d_horizon = horizon;
136 d_density = d_material_p->getDensity();
137
138 // d_material_p->print();
139
140 // set contact radius for internal contact
141 d_Rc = 0.95 * d_h;
142
143 // set contact coefficient for internal contact
144 const double K_self =
145 d_material_p->computeMaterialProperties(getDimension()).d_K;
146 d_Kn = util::selfContactStiffness(K_self, horizon);
147
148 if (!d_computeForce) {
149 std::cout << "Warning: Compute force is OFF in particle with id = "
150 << d_id << "\n";
151 }
153 std::cout << "Warning: All DoFs are OFF in particle with id = "
154 << d_id << "\n";
155 }
156}
double d_pRadius
Particle radius.
bool isWall() const
Is this particle a wall?
std::map< std::string, size_t > d_groups
Map that provides different groups of this particle.
size_t getDimension() const
Get the dimension of the domain.
double computeMeshSize(const std::vector< util::Point > &nodes)
Computes minimum distance between any two nodes.
Collection of methods and data related to finite element and mesh.
Definition mesh.cpp:29
double selfContactStiffness(const double &K, const double &horizon, int horizonPower=5)
Contact stiffness for a body against itself.
Definition function.cpp:148
util::Point apply(const util::Point &v) const
Maps a reference-configuration point to world coordinates using the same rule as geom::mapSimilarity...
double d_scale
Uniform scale factor.
Structure to read and store material related data.
double d_horizonMeshRatio
Horizon to mesh ratio.
std::string d_materialType
Material type.
double d_horizon
Horizon for peridynamic interaction.
A structure to represent 3d vectors.
Definition point.h:30
double d_x
the x coordinate
Definition point.h:33

References geom::ParticleTransform::apply(), geom::computeMeshSize(), d_allDofsConstrained, d_computeForce, d_density, d_globEnd, d_globStart, d_h, inp::MaterialDeck::d_horizon, d_horizon, inp::MaterialDeck::d_horizonMeshRatio, d_id, d_Kn, d_material_p, inp::MaterialDeck::d_materialType, d_modelData_p, d_Rc, d_rp_p, geom::ParticleTransform::d_scale, d_tform, util::Point::d_x, getDimension(), and util::selfContactStiffness().

Here is the call graph for this function:

Member Function Documentation

◆ addF() [1/2]

void particle::BaseParticle::addF ( size_t  i,
const util::Point f 
)
inline

Add to force of the node.

Parameters
iGlobal id of node
fForce to add

Definition at line 535 of file baseParticle.h.

535{ d_modelData_p->addF(i, f); };

References d_modelData_p.

◆ addF() [2/2]

void particle::BaseParticle::addF ( size_t  i,
int  dof,
double  f 
)
inline

Add to force of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
fForce to add

Definition at line 551 of file baseParticle.h.

551{ d_modelData_p->addF(i, dof, f); };

References d_modelData_p.

◆ addFLocal() [1/2]

void particle::BaseParticle::addFLocal ( size_t  i,
const util::Point f 
)
inline

Add to force of the node given node's local id.

Parameters
iLocal id of node
fForce to add

Definition at line 573 of file baseParticle.h.

573{ d_modelData_p->addF(i+d_globStart, f); };

References d_globStart, and d_modelData_p.

◆ addFLocal() [2/2]

void particle::BaseParticle::addFLocal ( size_t  i,
int  dof,
double  f 
)
inline

Add to force of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
fForce to add

Definition at line 590 of file baseParticle.h.

590 { d_modelData_p->addF
591 (i+d_globStart, dof, f); };

References d_globStart, and d_modelData_p.

◆ addMx()

void particle::BaseParticle::addMx ( size_t  i,
const double &  mx 
)
inline

Add to weighted-volume (mx) of the node.

Parameters
iGlobal id of node
mxWeighted-volume to add

Definition at line 714 of file baseParticle.h.

714{ d_modelData_p->addMx(i, mx); };

References d_modelData_p.

◆ addMxLocal()

void particle::BaseParticle::addMxLocal ( size_t  i,
const double &  mx 
)
inline

Add to weighted-volume (mx) of the node given node's local id.

Parameters
iLocal id of node
mxWeighted-volume to add

Definition at line 736 of file baseParticle.h.

736{ d_modelData_p->addMx(i+d_globStart, mx); };

References d_globStart, and d_modelData_p.

◆ addThetax()

void particle::BaseParticle::addThetax ( size_t  i,
const double &  thetax 
)
inline

Add to volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
thetaxVolumetric deformation to add

Definition at line 767 of file baseParticle.h.

767 { d_modelData_p->addThetax
768 (i, thetax); };

References d_modelData_p.

◆ addThetaxLocal()

void particle::BaseParticle::addThetaxLocal ( size_t  i,
const double &  thetax 
)
inline

Add to volumetric deformation (thetax) of the node given node's local id.

Parameters
iLocal id of node
thetaxVolumetric deformation to add

Definition at line 792 of file baseParticle.h.

792 { d_modelData_p->addThetax
793 (i+d_globStart, thetax); };

References d_globStart, and d_modelData_p.

◆ addU() [1/2]

void particle::BaseParticle::addU ( size_t  i,
const util::Point u 
)
inline

Add to displacement of the node.

Parameters
iGlobal id of node
uDisplacement to add

Definition at line 363 of file baseParticle.h.

363{ d_modelData_p->addU(i, u); };

References d_modelData_p.

◆ addU() [2/2]

void particle::BaseParticle::addU ( size_t  i,
int  dof,
double  u 
)
inline

Add to displacement of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
uDisplacement to add

Definition at line 379 of file baseParticle.h.

379{ d_modelData_p->addU(i, dof, u); };

References d_modelData_p.

◆ addULocal() [1/2]

void particle::BaseParticle::addULocal ( size_t  i,
const util::Point u 
)
inline

Add to displacement of the node given node's local id.

Parameters
iLocal id of node
uDisplacement to add

Definition at line 403 of file baseParticle.h.

403{ d_modelData_p->addU(i+d_globStart, u); };

References d_globStart, and d_modelData_p.

◆ addULocal() [2/2]

void particle::BaseParticle::addULocal ( size_t  i,
int  dof,
double  u 
)
inline

Add to displacement of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
uDisplacement to add

Definition at line 420 of file baseParticle.h.

420 { d_modelData_p->addU
421 (i+d_globStart, dof, u); };

References d_globStart, and d_modelData_p.

◆ addV() [1/2]

void particle::BaseParticle::addV ( size_t  i,
const util::Point v 
)
inline

Add to velocity of the node.

Parameters
iGlobal id of node
vVelocity to add

Definition at line 450 of file baseParticle.h.

450{ d_modelData_p->addV(i, v); };

References d_modelData_p.

◆ addV() [2/2]

void particle::BaseParticle::addV ( size_t  i,
int  dof,
double  v 
)
inline

Add to velocity of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
vVelocity to add

Definition at line 466 of file baseParticle.h.

466{ d_modelData_p->addV(i, dof, v); };

References d_modelData_p.

◆ addVLocal() [1/2]

void particle::BaseParticle::addVLocal ( size_t  i,
const util::Point v 
)
inline

Add to velocity of the node given node's local id.

Parameters
iLocal id of node
vVelocity to add

Definition at line 488 of file baseParticle.h.

488{ d_modelData_p->addV(i+d_globStart, v); };

References d_globStart, and d_modelData_p.

◆ addVLocal() [2/2]

void particle::BaseParticle::addVLocal ( size_t  i,
int  dof,
double  v 
)
inline

Add to velocity of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
vVelocity to add

Definition at line 505 of file baseParticle.h.

505 { d_modelData_p->addV
506 (i+d_globStart, dof, v); };

References d_globStart, and d_modelData_p.

◆ addVol()

void particle::BaseParticle::addVol ( size_t  i,
const double &  vol 
)
inline

Add to volume of the node.

Parameters
iGlobal id of node
volVolume to add

Definition at line 620 of file baseParticle.h.

620{ d_modelData_p->addVol(i, vol); };

References d_modelData_p.

◆ addVolLocal()

void particle::BaseParticle::addVolLocal ( size_t  i,
const double &  vol 
)
inline

Add to volume of the node given node's local id.

Parameters
iLocal id of node
volVolume to add

Definition at line 642 of file baseParticle.h.

642{ d_modelData_p->addVol(i+d_globStart, vol); };

References d_globStart, and d_modelData_p.

◆ addX() [1/2]

void particle::BaseParticle::addX ( size_t  i,
const util::Point x 
)
inline

Add current coordinate of the node.

Parameters
iGlobal id of node
xCurrent coordinate to add

Definition at line 278 of file baseParticle.h.

278{ d_modelData_p->addX(i, x); };

References d_modelData_p.

◆ addX() [2/2]

void particle::BaseParticle::addX ( size_t  i,
int  dof,
double  x 
)
inline

Add to specific current coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xCurrent coordinate to add

Definition at line 294 of file baseParticle.h.

294{ d_modelData_p->addX(i, dof, x); };

References d_modelData_p.

◆ addXLocal() [1/2]

void particle::BaseParticle::addXLocal ( size_t  i,
const util::Point x 
)
inline

Add to current coordinate of the node given node's local id.

Parameters
iLocal id of node
xCurrent coordinate to add

Definition at line 316 of file baseParticle.h.

316{ d_modelData_p->addX(i+d_globStart, x); };

References d_globStart, and d_modelData_p.

◆ addXLocal() [2/2]

void particle::BaseParticle::addXLocal ( size_t  i,
int  dof,
double  x 
)
inline

Add to specific current coordinate of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
xCurrent coordinate to add

Definition at line 333 of file baseParticle.h.

333 { d_modelData_p->addX
334 (i+d_globStart, dof, x); };

References d_globStart, and d_modelData_p.

◆ addXRef() [1/2]

void particle::BaseParticle::addXRef ( size_t  i,
const util::Point x 
)
inline

Add reference coordinate of the node.

Parameters
iGlobal id of node
xReference coordinate to add

Definition at line 188 of file baseParticle.h.

188{ d_modelData_p->addXRef(i, x); };

References d_modelData_p.

◆ addXRef() [2/2]

void particle::BaseParticle::addXRef ( size_t  i,
int  dof,
double  x 
)
inline

Add specific reference coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xReference coordinate to add

Definition at line 206 of file baseParticle.h.

206 {
207 d_modelData_p->addXRef(i, dof, x);
208 };

References d_modelData_p.

◆ addXRefLocal() [1/2]

void particle::BaseParticle::addXRefLocal ( size_t  i,
const util::Point x 
)
inline

Add to reference coordinate of the node given node's local id.

Parameters
iLocal id of node
xReference coordinate to add

Definition at line 230 of file baseParticle.h.

230{ d_modelData_p->addXRef(i+d_globStart, x); };

References d_globStart, and d_modelData_p.

◆ addXRefLocal() [2/2]

void particle::BaseParticle::addXRefLocal ( size_t  i,
int  dof,
double  x 
)
inline

Add to specific reference coordinate of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
xReference coordinate to add

Definition at line 248 of file baseParticle.h.

248 { d_modelData_p->addXRef
249 (i+d_globStart, dof, x); };

References d_globStart, and d_modelData_p.

◆ getCenterNodeId()

size_t particle::BaseParticle::getCenterNodeId ( ) const
inline

Get id of center node of particle.

Returns
Id Id of center node

Definition at line 806 of file baseParticle.h.

806{ return d_rp_p->getCenterNodeId(); };

References d_rp_p.

◆ getDensity()

double particle::BaseParticle::getDensity ( ) const
inline

Get density.

Returns
rho Density

Definition at line 135 of file baseParticle.h.

135{ return d_density; };

References d_density.

◆ getDimension()

size_t particle::BaseParticle::getDimension ( ) const
inline

Get the dimension of the domain.

Returns
N Dimension

Definition at line 105 of file baseParticle.h.

105{ return d_dim; };

References d_dim.

Referenced by BaseParticle().

Here is the caller graph for this function:

◆ getF() [1/2]

util::Point & particle::BaseParticle::getF ( size_t  i)
inline

Get force of the node.

Parameters
iGlobal id of node
Returns
f Force

Definition at line 520 of file baseParticle.h.

520{ return d_modelData_p->getF(i); };

References d_modelData_p.

◆ getF() [2/2]

const util::Point & particle::BaseParticle::getF ( size_t  i) const
inline

Get force of the node.

Parameters
iGlobal id of node
Returns
f Force

Definition at line 521 of file baseParticle.h.

521{ return d_modelData_p->getF(i); };

References d_modelData_p.

◆ getFix() [1/2]

uint8_t & particle::BaseParticle::getFix ( size_t  i)
inline

Get fixity of the node.

Parameters
iGlobal id of node
Returns
flag Fixity

Definition at line 656 of file baseParticle.h.

656{ return d_modelData_p->getFix(i); };

References d_modelData_p.

◆ getFix() [2/2]

const uint8_t & particle::BaseParticle::getFix ( size_t  i) const
inline

Get fixity of the node.

Parameters
iGlobal id of node
Returns
flag Fixity

Definition at line 657 of file baseParticle.h.

657{ return d_modelData_p->getFix(i); };

References d_modelData_p.

◆ getFixLocal() [1/2]

uint8_t & particle::BaseParticle::getFixLocal ( size_t  i)
inline

Get fixity of the node given node's local id.

Parameters
iLocal id of node
Returns
flag Fixity

Definition at line 674 of file baseParticle.h.

674{ return d_modelData_p->getFix(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getFixLocal() [2/2]

const uint8_t & particle::BaseParticle::getFixLocal ( size_t  i) const
inline

Get fixity of the node.

Parameters
iGlobal id of node
Returns
flag Fixity

Definition at line 675 of file baseParticle.h.

675{ return d_modelData_p->getFix(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getFLocal() [1/2]

util::Point & particle::BaseParticle::getFLocal ( size_t  i)
inline

Get force of the node given node's local id.

Parameters
iLocal id of node
Returns
f Force

Definition at line 558 of file baseParticle.h.

558{ return d_modelData_p->getF(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getFLocal() [2/2]

const util::Point & particle::BaseParticle::getFLocal ( size_t  i) const
inline

Get force of the node.

Parameters
iGlobal id of node
Returns
f Force

Definition at line 559 of file baseParticle.h.

559{ return d_modelData_p->getF(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getGroupId()

size_t particle::BaseParticle::getGroupId ( const std::string &  key) const
inline

Get group id for given key.

Parameters
keyKey to lookup group id (e.g. "geom_id", "mat_id", "mesh_id", "contact_id")
Returns
Group id corresponding to key

Definition at line 99 of file baseParticle.h.

99{ return d_groups.at(key); };

References d_groups.

◆ getHorizon()

double particle::BaseParticle::getHorizon ( ) const
inline

Get horizon.

Returns
eps Horizon

Definition at line 141 of file baseParticle.h.

141{ return d_horizon; };

References d_horizon.

◆ getId()

size_t particle::BaseParticle::getId ( ) const
inline

Get id.

Returns
id ID of this object

Definition at line 86 of file baseParticle.h.

86{ return d_id; };

References d_id.

Referenced by rw::writer::VtkParticleWriter::appendNodes(), and anonymous_namespace{vtkParticleWriter.cpp}::appendPointArraysForNodes().

Here is the caller graph for this function:

◆ getMaterial() [1/2]

material::Material * particle::BaseParticle::getMaterial ( )
inline

Get pointer to material object.

Returns
material Pointer to material object

Definition at line 147 of file baseParticle.h.

147{ return d_material_p.get(); };

References d_material_p.

◆ getMaterial() [2/2]

const material::Material * particle::BaseParticle::getMaterial ( ) const
inline

Get id.

Returns
id ID of this object

Definition at line 148 of file baseParticle.h.

148{ return d_material_p.get(); };

References d_material_p.

◆ getMesh() [1/2]

mesh::Mesh & particle::BaseParticle::getMesh ( )
inline

Get reference to mesh object.

Returns
mesh Reference to mesh

Definition at line 120 of file baseParticle.h.

120{ return *d_mesh_p; };

References d_mesh_p.

◆ getMesh() [2/2]

const mesh::Mesh & particle::BaseParticle::getMesh ( ) const
inline

Get reference to mesh object.

Returns
mesh Reference to mesh

Definition at line 123 of file baseParticle.h.

123{ return *d_mesh_p; };

References d_mesh_p.

◆ getMeshP() [1/2]

std::shared_ptr< mesh::Mesh > & particle::BaseParticle::getMeshP ( )
inline

Get pointer to mesh object.

Returns
mesh Pointer to mesh

Definition at line 111 of file baseParticle.h.

111{ return d_mesh_p; };

References d_mesh_p.

◆ getMeshP() [2/2]

const std::shared_ptr< mesh::Mesh > & particle::BaseParticle::getMeshP ( ) const
inline

Get pointer to mesh object.

Returns
mesh Pointer to mesh

Definition at line 114 of file baseParticle.h.

114{ return d_mesh_p; };

References d_mesh_p.

◆ getMeshSize()

double particle::BaseParticle::getMeshSize ( ) const
inline

Get mesh size.

Returns
h Mesh size

Definition at line 129 of file baseParticle.h.

129{ return d_h; };

References d_h.

◆ getMx() [1/2]

double & particle::BaseParticle::getMx ( size_t  i)
inline

Get weighted-volume (mx) of the node.

Parameters
iGlobal id of node
Returns
mx Weighted-volume

Definition at line 699 of file baseParticle.h.

699{ return d_modelData_p->getMx(i); };

References d_modelData_p.

◆ getMx() [2/2]

const double & particle::BaseParticle::getMx ( size_t  i) const
inline

Get weighted-volume (mx) of the node.

Parameters
iGlobal id of node
Returns
mx Weighted-volume

Definition at line 700 of file baseParticle.h.

700{ return d_modelData_p->getMx(i); };

References d_modelData_p.

◆ getMxLocal() [1/2]

double & particle::BaseParticle::getMxLocal ( size_t  i)
inline

Get weighted-volume (mx) of the node given node's local id.

Parameters
iLocal id of node
Returns
mx Weighted-volume

Definition at line 721 of file baseParticle.h.

721{ return d_modelData_p->getMx(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getMxLocal() [2/2]

const double & particle::BaseParticle::getMxLocal ( size_t  i) const
inline

Get weighted-volume (mx) of the node.

Parameters
iGlobal id of node
Returns
mx Weighted-volume

Definition at line 722 of file baseParticle.h.

722{ return d_modelData_p->getMx(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getNodeId()

size_t particle::BaseParticle::getNodeId ( size_t  i_loc) const
inline

Get global id of node given the local id of node in this object.

Parameters
i_locLocal id of node
Returns
Id Gloabl id of node

Definition at line 161 of file baseParticle.h.

161{ return i_loc + d_globStart; };

References d_globStart.

Referenced by anonymous_namespace{particleMpi.cpp}::packGrainKinematics(), and anonymous_namespace{particleMpi.cpp}::unpackGrainKinematics().

Here is the caller graph for this function:

◆ getNumNodes()

size_t particle::BaseParticle::getNumNodes ( ) const
inline

Get the number of nodes.

Returns
N number of nodes

Definition at line 154 of file baseParticle.h.

154{ return d_numNodes; };

References d_numNodes.

Referenced by anonymous_namespace{particleMpi.cpp}::packGrainKinematics(), and anonymous_namespace{particleMpi.cpp}::unpackGrainKinematics().

Here is the caller graph for this function:

◆ getParticleRadius()

double particle::BaseParticle::getParticleRadius ( ) const
inline

Get radius of reference particle.

Returns
Radius Radius of reference particle

Definition at line 812 of file baseParticle.h.

812{ return d_pRadius; };

References d_pRadius.

◆ getThetax() [1/2]

double & particle::BaseParticle::getThetax ( size_t  i)
inline

Get volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
Returns
thetax Volumetric deformation

Definition at line 750 of file baseParticle.h.

750{ return d_modelData_p->getThetax(i); };

References d_modelData_p.

◆ getThetax() [2/2]

const double & particle::BaseParticle::getThetax ( size_t  i) const
inline

Get volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
Returns
thetax Volumetric deformation

Definition at line 751 of file baseParticle.h.

751 { return d_modelData_p->getThetax(i)
752 ; };

References d_modelData_p.

◆ getThetaxLocal() [1/2]

double & particle::BaseParticle::getThetaxLocal ( size_t  i)
inline

Get volumetric deformation (thetax) of the node given node's local id.

Parameters
iLocal id of node
Returns
thetax Volumetric deformation

Definition at line 775 of file baseParticle.h.

775{ return d_modelData_p->getThetax(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getThetaxLocal() [2/2]

const double & particle::BaseParticle::getThetaxLocal ( size_t  i) const
inline

Get volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
Returns
thetax Volumetric deformation

Definition at line 776 of file baseParticle.h.

776 { return d_modelData_p->getThetax(i+d_globStart)
777 ; };

References d_globStart, and d_modelData_p.

◆ getU() [1/2]

util::Point & particle::BaseParticle::getU ( size_t  i)
inline

Get displacement of the node.

Parameters
iGlobal id of node
Returns
u Displacement

Definition at line 348 of file baseParticle.h.

348{ return d_modelData_p->getU(i); };

References d_modelData_p.

◆ getU() [2/2]

const util::Point & particle::BaseParticle::getU ( size_t  i) const
inline

Get displacement of the node.

Parameters
iGlobal id of node
Returns
u Displacement

Definition at line 349 of file baseParticle.h.

349{ return d_modelData_p->getU(i); };

References d_modelData_p.

◆ getUCenter() [1/2]

util::Point & particle::BaseParticle::getUCenter ( )
inline

Get displacement of center node.

Returns
u Displacement

Definition at line 831 of file baseParticle.h.

831 {
832 return d_modelData_p->getU(d_globStart + d_rp_p->getCenterNodeId());
833 };

References d_globStart, d_modelData_p, and d_rp_p.

◆ getUCenter() [2/2]

const util::Point & particle::BaseParticle::getUCenter ( ) const
inline

Get displacement of center node.

Returns
u Displacement

Definition at line 836 of file baseParticle.h.

836 {
837 return d_modelData_p->getU(d_globStart + d_rp_p->getCenterNodeId());
838 };

References d_globStart, d_modelData_p, and d_rp_p.

◆ getULocal() [1/2]

util::Point & particle::BaseParticle::getULocal ( size_t  i)
inline

Get displacement of the node given node's local id.

Parameters
iLocal id of node
Returns
u Displacement

Definition at line 386 of file baseParticle.h.

386{ return d_modelData_p->getU(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getULocal() [2/2]

const util::Point & particle::BaseParticle::getULocal ( size_t  i) const
inline

Get displacement of the node given node's local id.

Parameters
iLocal id of node
Returns
u Displacement

Definition at line 389 of file baseParticle.h.

389{ return d_modelData_p->getU(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getV() [1/2]

util::Point & particle::BaseParticle::getV ( size_t  i)
inline

Get velocity of the node.

Parameters
iGlobal id of node
Returns
v Velocity

Definition at line 435 of file baseParticle.h.

435{ return d_modelData_p->getV(i); };

References d_modelData_p.

◆ getV() [2/2]

const util::Point & particle::BaseParticle::getV ( size_t  i) const
inline

Get velocity of the node.

Parameters
iGlobal id of node
Returns
v Velocity

Definition at line 436 of file baseParticle.h.

436{ return d_modelData_p->getV(i); };

References d_modelData_p.

◆ getVCenter() [1/2]

util::Point & particle::BaseParticle::getVCenter ( )
inline

Get velocity of center node.

Returns
v Velocity

Definition at line 844 of file baseParticle.h.

844 {
845 return d_modelData_p->getV(d_globStart + d_rp_p->getCenterNodeId());
846 };

References d_globStart, d_modelData_p, and d_rp_p.

◆ getVCenter() [2/2]

const util::Point & particle::BaseParticle::getVCenter ( ) const
inline

Get velocity of center node.

Returns
v Velocity

Definition at line 849 of file baseParticle.h.

849 {
850 return d_modelData_p->getV(d_globStart + d_rp_p->getCenterNodeId());
851 };

References d_globStart, d_modelData_p, and d_rp_p.

◆ getVLocal() [1/2]

util::Point & particle::BaseParticle::getVLocal ( size_t  i)
inline

Get velocity of the node given node's local id.

Parameters
iLocal id of node
Returns
v Velocity

Definition at line 473 of file baseParticle.h.

473{ return d_modelData_p->getV(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getVLocal() [2/2]

const util::Point & particle::BaseParticle::getVLocal ( size_t  i) const
inline

Get velocity of the node.

Parameters
iGlobal id of node
Returns
v Velocity

Definition at line 474 of file baseParticle.h.

474{ return d_modelData_p->getV(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getVol() [1/2]

double & particle::BaseParticle::getVol ( size_t  i)
inline

Get volume of the node.

Parameters
iGlobal id of node
Returns
vol Volume

Definition at line 605 of file baseParticle.h.

605{ return d_modelData_p->getVol(i); };

References d_modelData_p.

◆ getVol() [2/2]

const double & particle::BaseParticle::getVol ( size_t  i) const
inline

Get volume of the node.

Parameters
iGlobal id of node
Returns
vol Volume

Definition at line 606 of file baseParticle.h.

606{ return d_modelData_p->getVol(i); };

References d_modelData_p.

◆ getVolLocal() [1/2]

double & particle::BaseParticle::getVolLocal ( size_t  i)
inline

Get volume of the node given node's local id.

Parameters
iLocal id of node
Returns
vol Volume

Definition at line 627 of file baseParticle.h.

627{ return d_modelData_p->getVol(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getVolLocal() [2/2]

const double & particle::BaseParticle::getVolLocal ( size_t  i) const
inline

Get volume of the node.

Parameters
iGlobal id of node
Returns
vol Volume

Definition at line 628 of file baseParticle.h.

628{ return d_modelData_p->getVol(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getX() [1/2]

util::Point & particle::BaseParticle::getX ( size_t  i)
inline

Get current coordinate of the node.

Parameters
iGlobal id of node
Returns
x Current coordinate

Definition at line 263 of file baseParticle.h.

263{ return d_modelData_p->getX(i); };

References d_modelData_p.

◆ getX() [2/2]

const util::Point & particle::BaseParticle::getX ( size_t  i) const
inline

Get current coordinate of the node.

Parameters
iGlobal id of node
Returns
x Current coordinate

Definition at line 264 of file baseParticle.h.

264{ return d_modelData_p->getX(i); };

References d_modelData_p.

◆ getXCenter() [1/2]

util::Point & particle::BaseParticle::getXCenter ( )
inline

Get current coordinate of center node.

Returns
x Current coordinate

Definition at line 818 of file baseParticle.h.

818 {
819 return d_modelData_p->getX(d_globStart + d_rp_p->getCenterNodeId());
820 };

References d_globStart, d_modelData_p, and d_rp_p.

◆ getXCenter() [2/2]

const util::Point & particle::BaseParticle::getXCenter ( ) const
inline

Get current coordinate of center node.

Returns
x Current coordinate

Definition at line 823 of file baseParticle.h.

823 {
824 return d_modelData_p->getX(d_globStart + d_rp_p->getCenterNodeId());
825 };

References d_globStart, d_modelData_p, and d_rp_p.

◆ getXLocal() [1/2]

util::Point & particle::BaseParticle::getXLocal ( size_t  i)
inline

Get current coordinate of the node given node's local id.

Parameters
iLocal id of node
Returns
x Current coordinate

Definition at line 301 of file baseParticle.h.

301{ return d_modelData_p->getX(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getXLocal() [2/2]

const util::Point & particle::BaseParticle::getXLocal ( size_t  i) const
inline

Get current coordinate of the node.

Parameters
iGlobal id of node
Returns
x Current coordinate

Definition at line 302 of file baseParticle.h.

302{ return d_modelData_p->getX(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getXRef() [1/2]

util::Point & particle::BaseParticle::getXRef ( size_t  i)
inline

Get reference coordinate of the node.

Parameters
iGlobal id of node
Returns
x Reference coordinate

Definition at line 173 of file baseParticle.h.

173{ return d_modelData_p->getXRef(i); };

References d_modelData_p.

◆ getXRef() [2/2]

const util::Point & particle::BaseParticle::getXRef ( size_t  i) const
inline

Get reference coordinate of the node.

Parameters
iGlobal id of node
Returns
x Reference coordinate

Definition at line 174 of file baseParticle.h.

174{ return d_modelData_p->getXRef(i); };

References d_modelData_p.

◆ getXRefLocal() [1/2]

util::Point & particle::BaseParticle::getXRefLocal ( size_t  i)
inline

Get reference coordinate of the node given node's local id.

Parameters
iLocal id of node
Returns
x Reference coordinate

Definition at line 215 of file baseParticle.h.

215{ return d_modelData_p->getXRef(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ getXRefLocal() [2/2]

const util::Point & particle::BaseParticle::getXRefLocal ( size_t  i) const
inline

Get reference coordinate of the node.

Parameters
iGlobal id of node
Returns
x Reference coordinate

Definition at line 216 of file baseParticle.h.

216{ return d_modelData_p->getXRef(i+d_globStart); };

References d_globStart, and d_modelData_p.

◆ isWall()

bool particle::BaseParticle::isWall ( ) const
inline

Is this particle a wall?

Returns
bool True if this particle is a wall

Definition at line 92 of file baseParticle.h.

92{ return d_isWall; };

References d_isWall.

Referenced by particle::isLocallyOwned().

Here is the caller graph for this function:

◆ print()

void particle::BaseParticle::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)

Definition at line 869 of file baseParticle.h.

869{ std::cout << printStr(nt, lvl); }
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.

References printStr().

Here is the call graph for this function:

◆ printStr()

std::string particle::BaseParticle::printStr ( int  nt = 0,
int  lvl = 0 
) const

Returns the string containing printable information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)
Returns
string String containing printable information about the object

Definition at line 158 of file baseParticle.cpp.

158 {
159
160 auto tabS = util::io::getTabS(nt);
161 std::ostringstream oss;
162 oss << tabS << "------- BaseParticle --------" << std::endl
163 << std::endl;
164
165 oss << tabS << "d_isWall = " << d_isWall << std::endl;
166 oss << tabS << "d_id = " << d_id << std::endl;
167 oss << tabS << "d_dim = " << d_dim << std::endl;
168 //oss << tabS << "d_groups = " << util::io::printStr<std::string, size_t>(d_groups) << std::endl;
169 oss << tabS << "d_numNodes = " << d_numNodes << std::endl;
170 oss << tabS << "d_pRadius = " << d_pRadius << std::endl;
171 oss << tabS << "d_h = " << d_h << std::endl;
172 oss << tabS << "d_allDofsConstrained = " << d_allDofsConstrained << std::endl;
173 oss << tabS << "d_computeForce = " << d_computeForce << std::endl;
174 oss << tabS << "d_horizon = " << d_horizon << std::endl;
175 oss << tabS << "d_density = " << d_density << std::endl;
176 oss << tabS << "d_Rc = " << d_Rc << std::endl;
177 oss << tabS << "d_Kn = " << d_Kn << std::endl;
178 oss << tabS << "d_globStart = " << d_globStart << std::endl;
179 oss << tabS << "d_globEnd = " << d_globEnd << std::endl;
180 oss << tabS << "d_globQuadStart = " << d_globQuadStart << std::endl;
181 oss << tabS << "d_globQuadEnd = " << d_globQuadEnd << std::endl;
182 oss << tabS << std::endl;
183 oss << tabS << std::endl;
184 oss << tabS << "Ref particle info = " << std::endl;
185 oss << d_rp_p->printStr(nt + 1, lvl);
186 oss << tabS << "Geometry info: " << std::endl;
187 oss << d_geom_p->printStr(nt + 1, lvl);
188
189 oss << tabS << std::endl;
190
191 return oss.str();
192}
std::string getTabS(int nt)
Returns tab spaces of a given size.
Definition io.h:82

References util::io::getTabS().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setF() [1/2]

void particle::BaseParticle::setF ( size_t  i,
const util::Point f 
)
inline

Set force of the node.

Parameters
iGlobal id of node
fForce to set

Definition at line 528 of file baseParticle.h.

528{ d_modelData_p->setF(i, f); };

References d_modelData_p.

◆ setF() [2/2]

void particle::BaseParticle::setF ( size_t  i,
int  dof,
double  f 
)
inline

Set force of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
fForce to set

Definition at line 543 of file baseParticle.h.

543{ d_modelData_p->setF(i, dof, f); };

References d_modelData_p.

◆ setFix()

void particle::BaseParticle::setFix ( size_t  i,
const unsigned int &  dof,
const bool &  flag 
)
inline

Set fixity of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
flagFixity to set

Definition at line 665 of file baseParticle.h.

665 {
666 d_modelData_p->setFix(i, dof, flag);
667 };

References d_modelData_p.

◆ setFixLocal()

void particle::BaseParticle::setFixLocal ( size_t  i,
const unsigned int &  dof,
const bool &  flag 
)
inline

Set fixity of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
flagFixity to set

Definition at line 683 of file baseParticle.h.

683 {
684 d_modelData_p->setFix(i+d_globStart, dof, flag);
685 };

References d_globStart, and d_modelData_p.

◆ setFLocal() [1/2]

void particle::BaseParticle::setFLocal ( size_t  i,
const util::Point f 
)
inline

Set force of the node given node's local id.

Parameters
iLocal id of node
fForce to set

Definition at line 566 of file baseParticle.h.

566{ d_modelData_p->setF(i+d_globStart, f); };

References d_globStart, and d_modelData_p.

◆ setFLocal() [2/2]

void particle::BaseParticle::setFLocal ( size_t  i,
int  dof,
double  f 
)
inline

Set force of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
fForce to set

Definition at line 581 of file baseParticle.h.

581 { d_modelData_p->setF
582 (i+d_globStart, dof, f); };

References d_globStart, and d_modelData_p.

◆ setMx()

void particle::BaseParticle::setMx ( size_t  i,
const double &  mx 
)
inline

Set weighted-volume (mx) of the node.

Parameters
iGlobal id of node
mxWeighted-volume to set

Definition at line 707 of file baseParticle.h.

707{ d_modelData_p->setMx(i, mx); };

References d_modelData_p.

◆ setMxLocal()

void particle::BaseParticle::setMxLocal ( size_t  i,
const double &  mx 
)
inline

Set weighted-volume (mx) of the node given node's local id.

Parameters
iLocal id of node
mxWeighted-volume to set

Definition at line 729 of file baseParticle.h.

729{ d_modelData_p->setMx(i+d_globStart, mx); };

References d_globStart, and d_modelData_p.

◆ setThetax()

void particle::BaseParticle::setThetax ( size_t  i,
const double &  thetax 
)
inline

Set volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
thetaxVolumetric deformation to set

Definition at line 759 of file baseParticle.h.

759 { d_modelData_p->setThetax
760 (i, thetax); };

References d_modelData_p.

◆ setThetaxLocal()

void particle::BaseParticle::setThetaxLocal ( size_t  i,
const double &  thetax 
)
inline

Set volumetric deformation (thetax) of the node given node's local id.

Parameters
iLocal id of node
thetaxVolumetric deformation to set

Definition at line 784 of file baseParticle.h.

784 { d_modelData_p->setThetax
785 (i+d_globStart, thetax); };

References d_globStart, and d_modelData_p.

◆ setU() [1/2]

void particle::BaseParticle::setU ( size_t  i,
const util::Point u 
)
inline

Set displacement of the node.

Parameters
iGlobal id of node
uDisplacement to set

Definition at line 356 of file baseParticle.h.

356{ d_modelData_p->setU(i, u); };

References d_modelData_p.

◆ setU() [2/2]

void particle::BaseParticle::setU ( size_t  i,
int  dof,
double  u 
)
inline

Set displacement of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
uDisplacement to set

Definition at line 371 of file baseParticle.h.

371{ d_modelData_p->setU(i, dof, u); };

References d_modelData_p.

◆ setULocal() [1/2]

void particle::BaseParticle::setULocal ( size_t  i,
const util::Point u 
)
inline

Set displacement of the node given node's local id.

Parameters
iLocal id of node
uDisplacement to set

Definition at line 396 of file baseParticle.h.

396{ d_modelData_p->setU(i+d_globStart, u); };

References d_globStart, and d_modelData_p.

◆ setULocal() [2/2]

void particle::BaseParticle::setULocal ( size_t  i,
int  dof,
double  u 
)
inline

Set displacement of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
uDisplacement to set

Definition at line 411 of file baseParticle.h.

411 { d_modelData_p->setU
412 (i+d_globStart, dof, u); };

References d_globStart, and d_modelData_p.

◆ setV() [1/2]

void particle::BaseParticle::setV ( size_t  i,
const util::Point v 
)
inline

Set velocity of the node.

Parameters
iGlobal id of node
vVelocity to set

Definition at line 443 of file baseParticle.h.

443{ d_modelData_p->setV(i, v); };

References d_modelData_p.

◆ setV() [2/2]

void particle::BaseParticle::setV ( size_t  i,
int  dof,
double  v 
)
inline

Set velocity of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
vVelocity to set

Definition at line 458 of file baseParticle.h.

458{ d_modelData_p->setV(i, dof, v); };

References d_modelData_p.

◆ setVLocal() [1/2]

void particle::BaseParticle::setVLocal ( size_t  i,
const util::Point v 
)
inline

Set velocity of the node given node's local id.

Parameters
iLocal id of node
vVelocity to set

Definition at line 481 of file baseParticle.h.

481{ d_modelData_p->setV(i+d_globStart, v); };

References d_globStart, and d_modelData_p.

◆ setVLocal() [2/2]

void particle::BaseParticle::setVLocal ( size_t  i,
int  dof,
double  v 
)
inline

Set velocity of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
vVelocity to set

Definition at line 496 of file baseParticle.h.

496 { d_modelData_p->setV
497 (i+d_globStart, dof, v); };

References d_globStart, and d_modelData_p.

◆ setVol()

void particle::BaseParticle::setVol ( size_t  i,
const double &  vol 
)
inline

Set volume of the node.

Parameters
iGlobal id of node
volVolume to set

Definition at line 613 of file baseParticle.h.

613{ d_modelData_p->setVol(i, vol); };

References d_modelData_p.

◆ setVolLocal()

void particle::BaseParticle::setVolLocal ( size_t  i,
const double &  vol 
)
inline

Set volume of the node given node's local id.

Parameters
iLocal id of node
volVolume to set

Definition at line 635 of file baseParticle.h.

635{ d_modelData_p->setVol(i+d_globStart, vol); };

References d_globStart, and d_modelData_p.

◆ setX() [1/2]

void particle::BaseParticle::setX ( size_t  i,
const util::Point x 
)
inline

Set current coordinate of the node.

Parameters
iGlobal id of node
xCurrent coordinate to set

Definition at line 271 of file baseParticle.h.

271{ d_modelData_p->setX(i, x); };

References d_modelData_p.

◆ setX() [2/2]

void particle::BaseParticle::setX ( size_t  i,
int  dof,
double  x 
)
inline

Set specific current coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xCurrent coordinate to set

Definition at line 286 of file baseParticle.h.

286{ d_modelData_p->setX(i, dof, x); };

References d_modelData_p.

◆ setXLocal() [1/2]

void particle::BaseParticle::setXLocal ( size_t  i,
const util::Point x 
)
inline

Set current coordinate of the node given node's local id.

Parameters
iLocal id of node
xCurrent coordinate to set

Definition at line 309 of file baseParticle.h.

309{ d_modelData_p->setX(i+d_globStart, x); };

References d_globStart, and d_modelData_p.

◆ setXLocal() [2/2]

void particle::BaseParticle::setXLocal ( size_t  i,
int  dof,
double  x 
)
inline

Set specific current coordinate of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
xCurrent coordinate to set

Definition at line 324 of file baseParticle.h.

324 { d_modelData_p->setX
325 (i+d_globStart, dof, x); };

References d_globStart, and d_modelData_p.

◆ setXRef() [1/2]

void particle::BaseParticle::setXRef ( size_t  i,
const util::Point x 
)
inline

Set reference coordinate of the node.

Parameters
iGlobal id of node
xReference coordinate to set

Definition at line 181 of file baseParticle.h.

181{ d_modelData_p->setXRef(i, x); };

References d_modelData_p.

◆ setXRef() [2/2]

void particle::BaseParticle::setXRef ( size_t  i,
int  dof,
double  x 
)
inline

Set specific reference coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xReference coordinate to set

Definition at line 196 of file baseParticle.h.

196 {
197 d_modelData_p->setXRef(i, dof, x);
198 };

References d_modelData_p.

◆ setXRefLocal() [1/2]

void particle::BaseParticle::setXRefLocal ( size_t  i,
const util::Point x 
)
inline

Set reference coordinate of the node given node's local id.

Parameters
iLocal id of node
xReference coordinate to set

Definition at line 223 of file baseParticle.h.

223{ d_modelData_p->setXRef(i+d_globStart, x); };

References d_globStart, and d_modelData_p.

◆ setXRefLocal() [2/2]

void particle::BaseParticle::setXRefLocal ( size_t  i,
int  dof,
double  x 
)
inline

Set specific reference coordinate of the node given node's local id.

Parameters
iLocal id of node
dofDirection or degree of freedom to be modified
xReference coordinate to set

Definition at line 238 of file baseParticle.h.

238 { d_modelData_p->setXRef
239 (i+d_globStart, dof, x); };

References d_globStart, and d_modelData_p.

Field Documentation

◆ d_allDofsConstrained

bool particle::BaseParticle::d_allDofsConstrained

Specify if all dofs are constrained so we do not update displacement, velocity, and force data.

Definition at line 897 of file baseParticle.h.

Referenced by BaseParticle().

◆ d_computeForce

bool particle::BaseParticle::d_computeForce

Specify if we compute force.

Definition at line 900 of file baseParticle.h.

Referenced by BaseParticle().

◆ d_density

double particle::BaseParticle::d_density

density

Definition at line 912 of file baseParticle.h.

Referenced by BaseParticle(), and getDensity().

◆ d_dim

size_t particle::BaseParticle::d_dim

Dimension of this particle.

Definition at line 882 of file baseParticle.h.

Referenced by getDimension().

◆ d_geom_p

std::shared_ptr<geom::GeomObject> particle::BaseParticle::d_geom_p

Geometrical object defining this particle.

Definition at line 944 of file baseParticle.h.

◆ d_globEnd

size_t particle::BaseParticle::d_globEnd

Id of last node of this object in global node list.

Definition at line 927 of file baseParticle.h.

Referenced by BaseParticle().

◆ d_globQuadEnd

size_t particle::BaseParticle::d_globQuadEnd

Id of last node of this object in global quadrature data list, e.g., strain in elements at quadrature points.

Definition at line 935 of file baseParticle.h.

◆ d_globQuadStart

size_t particle::BaseParticle::d_globQuadStart

Id of first node of this object in global quadrature data list, e.g., strain in elements at quadrature points.

Definition at line 931 of file baseParticle.h.

◆ d_globStart

◆ d_groups

std::map<std::string, size_t> particle::BaseParticle::d_groups

Map that provides different groups of this particle.

Definition at line 879 of file baseParticle.h.

Referenced by rw::writer::VtkParticleWriter::appendNodes(), and getGroupId().

◆ d_h

double particle::BaseParticle::d_h

mesh size

Definition at line 891 of file baseParticle.h.

Referenced by BaseParticle(), and getMeshSize().

◆ d_horizon

double particle::BaseParticle::d_horizon

horizon

Definition at line 909 of file baseParticle.h.

Referenced by BaseParticle(), and getHorizon().

◆ d_id

size_t particle::BaseParticle::d_id

Id of this particle in all particles list.

Definition at line 876 of file baseParticle.h.

Referenced by BaseParticle(), and getId().

◆ d_isWall

bool particle::BaseParticle::d_isWall

Integer-based particle identity. 0 means it is a particle and 1 means it is a wall

Definition at line 873 of file baseParticle.h.

Referenced by isWall().

◆ d_Kn

double particle::BaseParticle::d_Kn

Normal contact coefficient for internal contact.

Definition at line 921 of file baseParticle.h.

Referenced by BaseParticle().

◆ d_material_p

std::unique_ptr<material::Material> particle::BaseParticle::d_material_p

Pointer to peridynamic material object.

Definition at line 915 of file baseParticle.h.

Referenced by rw::writer::VtkParticleWriter::appendNodes(), BaseParticle(), getMaterial(), and getMaterial().

◆ d_mesh_p

std::shared_ptr<mesh::Mesh> particle::BaseParticle::d_mesh_p

Pointer to mesh on reference particle.

Definition at line 950 of file baseParticle.h.

Referenced by getMesh(), getMesh(), getMeshP(), and getMeshP().

◆ d_modelData_p

◆ d_mpiOwner

int particle::BaseParticle::d_mpiOwner

MPI owner rank for this grain (-1 = wall / all ranks). Used by particle-parallel (T09); ignored when not using MPI.

Definition at line 906 of file baseParticle.h.

Referenced by particle::isLocallyOwned().

◆ d_numNodes

size_t particle::BaseParticle::d_numNodes

Number of nodes in this particle.

Definition at line 885 of file baseParticle.h.

Referenced by getNumNodes().

◆ d_pRadius

double particle::BaseParticle::d_pRadius

Particle radius.

Definition at line 888 of file baseParticle.h.

Referenced by getParticleRadius().

◆ d_Rc

double particle::BaseParticle::d_Rc

Contact radius for contact between internal nodes of particle.

Definition at line 918 of file baseParticle.h.

Referenced by BaseParticle().

◆ d_rp_p

std::shared_ptr<particle::RefParticle> particle::BaseParticle::d_rp_p

Pointer to reference particle.

Definition at line 941 of file baseParticle.h.

Referenced by BaseParticle(), getCenterNodeId(), getUCenter(), getUCenter(), getVCenter(), getVCenter(), getXCenter(), and getXCenter().

◆ d_tform

geom::ParticleTransform particle::BaseParticle::d_tform

Transformation related data.

Definition at line 947 of file baseParticle.h.

Referenced by BaseParticle().


The documentation for this class was generated from the following files: