31 std::string
const& geometry_name)
33 return geometrical_set_name +
"_" + geometry_name;
36template <
typename GeometryVec>
37std::vector<std::unique_ptr<MeshLib::Mesh>>
39 std::vector<GeometryVec*>
const& geometries,
41 bool const multiple_nodes_allowed)
43 std::vector<std::unique_ptr<MeshLib::Mesh>> additional_meshes;
50 &boundary_element_searcher.
mesh);
52 for (GeometryVec*
const geometry_vec : geometries)
56 auto const& vec_name = geometry_vec->
getName();
58 auto const& vec_data = geometry_vec->getVector();
60 auto const vec_size = geometry_vec->size();
61 for (std::size_t i = 0; i < vec_size; ++i)
65 std::string geometry_name;
66 bool const is_geometry_named =
67 geometry_vec->getNameOfElementByID(i, geometry_name);
68 if (!is_geometry_named)
73 auto const& geometry = *vec_data[i];
75 DBUG(
"Creating mesh from geometry {:s} {:s}.", vec_name,
78 auto subdomain_mesh = createMeshFromElementSelection(
82 geometry, multiple_nodes_allowed)));
85 additional_meshes.push_back(
87 bulk_mesh, subdomain_mesh.get()));
90 additional_meshes.emplace_back(std::move(subdomain_mesh));
94 return additional_meshes;
97std::vector<std::unique_ptr<MeshLib::Mesh>>
100 std::unique_ptr<SearchLength>
101 search_length_algorithm,
102 bool const multiple_nodes_allowed)
104 std::vector<std::unique_ptr<MeshLib::Mesh>> additional_meshes;
106 auto const& mesh_node_searcher =
108 mesh, std::move(search_length_algorithm));
111 mesh, mesh_node_searcher);
118 geo_objects.
getPoints(), boundary_element_searcher,
119 multiple_nodes_allowed);
120 std::move(begin(point_meshes), end(point_meshes),
121 std::back_inserter(additional_meshes));
130 multiple_nodes_allowed);
131 std::move(begin(polyline_meshes), end(polyline_meshes),
132 std::back_inserter(additional_meshes));
138 geo_objects.
getSurfaces(), boundary_element_searcher,
139 multiple_nodes_allowed);
140 std::move(begin(surface_meshes), end(surface_meshes),
141 std::back_inserter(additional_meshes));
146 std::for_each(begin(additional_meshes), end(additional_meshes),
148 { m->setAxiallySymmetric(axial_symmetry); });
149 return additional_meshes;
Definition of Duplicate functions.
Definition of the Element class.
Definition of the GEOObjects class.
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition of mesh class for partitioned mesh (by node) for parallel computing within the framework o...
Definition of the Node class.
Container class for geometric objects.
std::vector< PolylineVec * > const & getPolylines() const
Read access to polylines w/o using a name.
std::vector< PointVec * > const & getPoints() const
Read access to points w/o using a name.
std::vector< SurfaceVec * > const & getSurfaces() const
Read access to surfaces w/o using a name.
bool isAxiallySymmetric() const
const std::string getName() const
Get name of the mesh.
std::vector< Element * > cloneElements(std::vector< Element * > const &elements)
Clones a vector of elements using the Element::clone() function.
std::unique_ptr< NodePartitionedMesh > transformMeshToNodePartitionedMesh(NodePartitionedMesh const *const bulk_mesh, Mesh const *const subdomain_mesh)