23 std::string
const& geometry_name)
25 return geometrical_set_name +
"_" + geometry_name;
28 template <
typename GeometryVec>
29 std::vector<std::unique_ptr<MeshLib::Mesh>>
31 std::vector<GeometryVec*>
const& geometries,
33 bool const multiple_nodes_allowed)
35 std::vector<std::unique_ptr<MeshLib::Mesh>> additional_meshes;
37 for (GeometryVec*
const geometry_vec : geometries)
41 auto const& vec_name = geometry_vec->getName();
43 auto const& vec_data = *geometry_vec->getVector();
45 auto const vec_size = geometry_vec->size();
46 for (std::size_t i = 0; i < vec_size; ++i)
50 std::string geometry_name;
51 bool const is_geometry_named =
52 geometry_vec->getNameOfElementByID(i, geometry_name);
53 if (!is_geometry_named)
58 auto const& geometry = *vec_data[i];
60 DBUG(
"Creating mesh from geometry {:s} {:s}.", vec_name,
67 geometry, multiple_nodes_allowed))));
70 return additional_meshes;
73 std::vector<std::unique_ptr<MeshLib::Mesh>>
76 std::unique_ptr<SearchLength>
77 search_length_algorithm,
78 bool const multiple_nodes_allowed)
80 std::vector<std::unique_ptr<MeshLib::Mesh>> additional_meshes;
82 auto const& mesh_node_searcher =
84 mesh, std::move(search_length_algorithm));
87 mesh, mesh_node_searcher);
94 geo_objects.
getPoints(), boundary_element_searcher,
95 multiple_nodes_allowed);
96 std::move(begin(point_meshes), end(point_meshes),
97 std::back_inserter(additional_meshes));
106 multiple_nodes_allowed);
107 std::move(begin(polyline_meshes), end(polyline_meshes),
108 std::back_inserter(additional_meshes));
114 geo_objects.
getSurfaces(), boundary_element_searcher,
115 multiple_nodes_allowed);
116 std::move(begin(surface_meshes), end(surface_meshes),
117 std::back_inserter(additional_meshes));
122 std::for_each(begin(additional_meshes), end(additional_meshes),
124 { m->setAxiallySymmetric(axial_symmetry); });
125 return additional_meshes;
Definition of Duplicate functions.
Definition of the Element class.
Definition of the GEOObjects class.
void DBUG(char const *fmt, Args const &... args)
Definition of the Node class.
Container class for geometric objects.
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.
std::vector< PolylineVec * > const & getPolylines() const
Read access to polylines w/o using a name.
bool isAxiallySymmetric() const
std::unique_ptr< MeshLib::Mesh > createMeshFromElementSelection(std::string mesh_name, std::vector< MeshLib::Element * > const &elements)
std::vector< Element * > cloneElements(std::vector< Element * > const &elements)
Clones a vector of elements using the Element::clone() function.