29 d_allDofsConstrained(false),
32 d_material_p(nullptr),
39 d_modelData_p(nullptr),
42 d_tform(
geom::ParticleTransform()),
48 std::map<std::string, size_t> groups,
49 bool are_all_dofs_constrained,
52 std::shared_ptr<data::ModelData> model_data,
53 std::shared_ptr<particle::RefParticle> ref_particle,
54 std::shared_ptr<geom::GeomObject>
geom,
56 std::shared_ptr<mesh::Mesh>
mesh,
63 d_numNodes(num_nodes),
67 d_allDofsConstrained(are_all_dofs_constrained),
70 d_material_p(nullptr),
77 d_modelData_p(model_data),
82 d_pRadius(
geom->boundingRadius()) {
91 for (
size_t i = 0; i <
d_rp_p->getNumNodes(); i++) {
103 d_rp_p->getNodalVolume(i) *
118 double horizon = p_material_deck.
d_horizon;
124 p_material_deck,
d_rp_p->getDimension(), horizon);
127 p_material_deck,
d_rp_p->getDimension(), horizon);
130 p_material_deck,
d_rp_p->getDimension(), horizon);
133 p_material_deck,
d_rp_p->getDimension(), horizon);
144 const double K_self =
149 std::cout <<
"Warning: Compute force is OFF in particle with id = "
153 std::cout <<
"Warning: All DoFs are OFF in particle with id = "
161 std::ostringstream oss;
162 oss << tabS <<
"------- BaseParticle --------" << std::endl
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;
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);
189 oss << tabS << std::endl;
double d_Rc
Contact radius for contact between internal nodes of particle.
BaseParticle(size_t id=0)
Constructor.
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_globStart
Id of first node of this object in global node list.
size_t d_id
Id of this particle in all particles list.
size_t getDimension() const
Get the dimension of the domain.
size_t d_globEnd
Id of last node of this object in global node list.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
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.
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.
std::string getTabS(int nt)
Returns tab spaces of a given size.
double selfContactStiffness(const double &K, const double &horizon, int horizonPower=5)
Contact stiffness for a body against itself.
A struct that stores transformation parameters and provides method to transform the particle....
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.
double d_x
the x coordinate