23: d_type(particle_type),
29 d_particleDescription(
""),
35 d_allDofsConstrained(false),
37 d_material_p(nullptr),
44 d_modelData_p(nullptr),
62 size_t particle_type_id,
65 std::string particle_description,
66 bool is_particle_a_wall,
67 bool are_all_dofs_constrained,
70 std::shared_ptr<model::ModelData> model_data,
71 std::shared_ptr<particle::RefParticle> ref_particle,
72 std::shared_ptr<util::geometry::GeomObject> geom,
74 std::shared_ptr<fe::Mesh> mesh,
77 : d_type(particle_type),
80 d_typeId(particle_type_id),
83 d_particleDescription(particle_description),
84 d_isWall(is_particle_a_wall),
85 d_numNodes(num_nodes),
89 d_allDofsConstrained(are_all_dofs_constrained),
91 d_material_p(nullptr),
98 d_modelData_p(model_data),
103 d_pRadius(geom->boundingRadius()) {
107 else if (
d_type ==
"wall")
114 std::cerr <<
"Error: Can not have d_type = 'particle' and d_isWall = true.\n";
118 std::cerr <<
"Error: Can not have d_type = 'wall' and d_isWall = false.\n";
127 for (
size_t i = 0;
i <
d_rp_p->getNumNodes();
i++) {
178 d_Kn = (18. / (
M_PI * std::pow(horizon, 5))) *
182 std::cout <<
"Warning: Compute force is OFF in particle with id = "
186 std::cout <<
"Warning: All DoFs are OFF in particle with id = "
194 std::ostringstream oss;
195 oss << tabS <<
"------- BaseParticle --------" << std::endl
198 oss << tabS <<
"d_type = " << d_type << std::endl;
199 oss << tabS <<
"d_particleDescription = " << d_particleDescription << std::endl;
200 oss << tabS <<
"d_typeIndex = " << d_typeIndex << std::endl;
201 oss << tabS <<
"d_isWall = " << d_isWall << std::endl;
202 oss << tabS <<
"d_id = " << d_id << std::endl;
203 oss << tabS <<
"d_typeId = " << d_typeId << std::endl;
204 oss << tabS <<
"d_zoneId = " << d_zoneId << std::endl;
205 oss << tabS <<
"d_dim = " << d_dim << std::endl;
206 oss << tabS <<
"d_numNodes = " << d_numNodes << std::endl;
207 oss << tabS <<
"d_pRadius = " << d_pRadius << std::endl;
208 oss << tabS <<
"d_h = " << d_h << std::endl;
209 oss << tabS <<
"d_allDofsConstrained = " << d_allDofsConstrained << std::endl;
210 oss << tabS <<
"d_computeForce = " << d_computeForce << std::endl;
211 oss << tabS <<
"d_horizon = " << d_horizon << std::endl;
212 oss << tabS <<
"d_density = " << d_density << std::endl;
213 oss << tabS <<
"d_Rc = " << d_Rc << std::endl;
214 oss << tabS <<
"d_Kn = " << d_Kn << std::endl;
215 oss << tabS <<
"d_globStart = " << d_globStart << std::endl;
216 oss << tabS <<
"d_globEnd = " << d_globEnd << std::endl;
217 oss << tabS <<
"d_globQuadStart = " << d_globQuadStart << std::endl;
218 oss << tabS <<
"d_globQuadEnd = " << d_globQuadEnd << std::endl;
219 oss << tabS << std::endl;
220 oss << tabS << std::endl;
221 oss << tabS <<
"Ref particle info = " << std::endl;
222 oss << d_rp_p->printStr(nt + 1, lvl);
223 oss << tabS <<
"Geometry info: " << std::endl;
224 oss << d_geom_p->printStr(nt + 1, lvl);
226 oss << tabS << std::endl;
particle::ParticleTransform d_tform
Transformation related data.
double d_Rc
Contact radius for contact between internal nodes of particle.
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.
std::shared_ptr< model::ModelData > d_modelData_p
Reference to model class.
bool d_isWall
Is this particle actually a wall?
size_t d_id
Id of this particle in all particles list.
BaseParticle(std::string particle_type="none")
Constructor.
size_t d_dim
Dimension of this particle.
size_t getDimension() const
Get id among the group of object in the same type as this.
std::string d_type
particle type, e.g., particle or wall
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.
Collection of methods and data related to particle object.
std::string getTabS(int nt)
Returns tab spaces of given size.
double computeMeshSize(const std::vector< util::Point > &nodes)
Computes minimum distance between any two nodes.
Structure to read and store material related data.
A struct that stores transformation parameters and provides method to transform the particle....
util::Point apply(const util::Point &v) const
Returns the transformed vector. We assume that the passed vector passes through origin.
double d_scale
Volumetric scaling factor.
A structure to represent 3d vectors.