OGS
createMaterialIDsBasedSubMesh.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
6#include "MeshLib/Mesh.h"
10
11namespace MeshLib
12{
13std::unique_ptr<MeshLib::Mesh> createMaterialIDsBasedSubMesh(
14 MeshLib::Mesh const& mesh, std::vector<int> const& material_ids,
15 std::string const& name_for_created_mesh)
16{
17 auto const elements =
20 name_for_created_mesh, MeshLib::cloneElements(elements));
21}
22} // namespace MeshLib
std::unique_ptr< MeshLib::Mesh > createMeshFromElementSelection(std::string mesh_name, std::vector< MeshLib::Element * > const &elements)
std::vector< MeshLib::Element * > getMeshElementsForMaterialIDs(MeshLib::Mesh const &mesh, std::vector< int > const &selected_material_ids)
std::unique_ptr< MeshLib::Mesh > createMaterialIDsBasedSubMesh(MeshLib::Mesh const &mesh, std::vector< int > const &material_ids, std::string const &name_for_created_mesh)
std::vector< Element * > cloneElements(std::vector< Element * > const &elements)
Clones a vector of elements using the Element::clone() function.