25 std::string
const& geometry_name)
27 return geometrical_set_name +
"_" + geometry_name;
30template <
typename GeometryVec>
31std::vector<std::unique_ptr<MeshLib::Mesh>>
33 std::vector<GeometryVec*>
const& geometries,
35 bool const multiple_nodes_allowed)
37 std::vector<std::unique_ptr<MeshLib::Mesh>> additional_meshes;
44 &boundary_element_searcher.
mesh);
46 for (GeometryVec*
const geometry_vec : geometries)
50 auto const& vec_name = geometry_vec->getName();
52 auto const& vec_data = geometry_vec->getVector();
54 auto const vec_size = geometry_vec->size();
55 for (std::size_t i = 0; i < vec_size; ++i)
59 std::string geometry_name;
60 bool const is_geometry_named =
61 geometry_vec->getNameOfElementByID(i, geometry_name);
62 if (!is_geometry_named)
67 auto const& geometry = *vec_data[i];
69 DBUG(
"Creating mesh from geometry {:s} {:s}.", vec_name,
72 auto subdomain_mesh = createMeshFromElementSelection(
76 geometry, multiple_nodes_allowed)));
79 additional_meshes.push_back(
81 bulk_mesh, subdomain_mesh.get()));
84 additional_meshes.emplace_back(std::move(subdomain_mesh));
88 return additional_meshes;
91std::vector<std::unique_ptr<MeshLib::Mesh>>
94 std::unique_ptr<SearchLength>
95 search_length_algorithm,
96 bool const multiple_nodes_allowed)
98 std::vector<std::unique_ptr<MeshLib::Mesh>> additional_meshes;
100 auto const& mesh_node_searcher =
102 mesh, std::move(search_length_algorithm));
105 mesh, mesh_node_searcher);
112 geo_objects.
getPoints(), boundary_element_searcher,
113 multiple_nodes_allowed);
114 std::move(begin(point_meshes), end(point_meshes),
115 std::back_inserter(additional_meshes));
124 multiple_nodes_allowed);
125 std::move(begin(polyline_meshes), end(polyline_meshes),
126 std::back_inserter(additional_meshes));
132 geo_objects.
getSurfaces(), boundary_element_searcher,
133 multiple_nodes_allowed);
134 std::move(begin(surface_meshes), end(surface_meshes),
135 std::back_inserter(additional_meshes));
140 std::for_each(begin(additional_meshes), end(additional_meshes),
142 { m->setAxiallySymmetric(axial_symmetry); });
143 return additional_meshes;
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
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
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)