Skip to content
Snippets Groups Projects
Commit 9b83db59 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MGTL] Extract meshNameFromGeometry(geo_set, geo).

Used in construction of mesh names in two places.
This unifies the name.
parent 93a6f93b
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,12 @@
namespace MeshGeoToolsLib
{
std::string meshNameFromGeometry(std::string const& geometrical_set_name,
std::string const& geometry_name)
{
return geometrical_set_name + "_" + geometry_name;
}
template <typename GeometryVec>
std::vector<std::unique_ptr<MeshLib::Mesh>>
constructAdditionalMeshesFromGeometries(
......@@ -55,7 +61,7 @@ constructAdditionalMeshesFromGeometries(
geometry_name.c_str());
additional_meshes.emplace_back(createMeshFromElementSelection(
vec_name + "_" + geometry_name,
meshNameFromGeometry(vec_name, geometry_name),
MeshLib::cloneElements(
boundary_element_searcher.getBoundaryElements(geometry))));
}
......
......@@ -31,4 +31,7 @@ constructAdditionalMeshesFromGeoObjects(GeoLib::GEOObjects const& geo_objects,
MeshLib::Mesh const& mesh,
std::unique_ptr<SearchLength>
search_length_algorithm);
std::string meshNameFromGeometry(std::string const& geometrical_set_name,
std::string const& geometry_name);
} // namespace MeshGeoToolsLib
......@@ -12,6 +12,7 @@
#include <utility>
#include <logog/include/logog.hpp>
#include "MeshGeoToolsLib/ConstructMeshesFromGeometries.h"
#include "MeshLib/Mesh.h"
#include "ProcessLib/BoundaryCondition/BoundaryCondition.h"
#include "ProcessLib/BoundaryCondition/CreateBoundaryCondition.h"
......@@ -61,7 +62,8 @@ MeshLib::Mesh const& findMeshInConfig(
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__geometry}
config.getConfigParameter<std::string>("geometry");
mesh_name = geometrical_set_name + "_" + geometry_name;
mesh_name = MeshGeoToolsLib::meshNameFromGeometry(geometrical_set_name,
geometry_name);
}
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment