diff --git a/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp b/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp index 96b2a4e609acef7ed24e860cd13d21b0b1c75ebf..d4fbaa3b04c0757311ee2622abf3b73f374f5ef7 100644 --- a/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp +++ b/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp @@ -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)))); } diff --git a/MeshGeoToolsLib/ConstructMeshesFromGeometries.h b/MeshGeoToolsLib/ConstructMeshesFromGeometries.h index c7aeb7113549e5b2ac65e8e3168a5aa1474a179d..3efbf3d7ed9d8e2e715e3c0445f38653af5d5681 100644 --- a/MeshGeoToolsLib/ConstructMeshesFromGeometries.h +++ b/MeshGeoToolsLib/ConstructMeshesFromGeometries.h @@ -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 diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 7525dfe08b9c880aa3bcf5b915b1a476a8143f3d..a135853d4c5555d69e859fabd3b454f45b81c1d6 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -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); } //