19 std::shared_ptr<model::ModelData> model_data,
20 std::shared_ptr<util::geometry::GeomObject> geom,
21 std::shared_ptr<fe::Mesh> mesh)
23 d_modelData_p(model_data),
27 d_pRadius(geom->boundingRadius()) {
30 std::cerr <<
"Error: Reference particle radius is too small.\n";
38 double dist =
d_geom_p->boundingRadius();
39 for (
size_t i = 0; i < mesh->getNumNodes(); i++) {
40 dx = center - mesh->getNode(i);
51 std::ostringstream oss;
52 oss << tabS <<
"------- Reference particle --------" << std::endl
55 oss << tabS <<
"Mesh pointer = " << d_mesh_p.get() << std::endl;
56 oss << tabS <<
"Mesh info: " << std::endl;
57 oss << d_mesh_p->printStr(nt + 1, lvl);
58 oss << tabS <<
"Center node = " << d_centerNode << std::endl;
59 oss << tabS <<
"Center node location = " << getNode(d_centerNode).printStr()
61 oss << tabS <<
"Geometry info: " << std::endl;
62 oss << d_geom_p->printStr(nt + 1, lvl);
63 oss << tabS <<
"Radius = " << d_pRadius << std::endl;
64 oss << tabS <<
"Num interior flag data = " << d_intFlags.size() << std::endl;
66 oss << tabS << std::endl;
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.
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.