OGS
RemoveMeshComponents.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <string>
7#include <vector>
8
9namespace MeshLib
10{
11class Mesh;
12class Element;
13class Node;
14} // namespace MeshLib
15
16namespace MeshToolsLib
17{
18
27MeshLib::Mesh* removeElements(
28 const MeshLib::Mesh& mesh,
29 const std::vector<std::size_t>& removed_element_ids,
30 const std::string& new_mesh_name);
31
40MeshLib::Mesh* removeNodes(const MeshLib::Mesh& mesh,
41 const std::vector<std::size_t>& del_nodes_idx,
42 const std::string& new_mesh_name);
43
45std::vector<bool> markUnusedNodes(
46 std::vector<MeshLib::Element*> const& elements,
47 std::vector<MeshLib::Node*> const& nodes);
48
50void removeMarkedNodes(std::vector<bool> const& nodes_to_delete,
51 std::vector<MeshLib::Node*>& nodes);
52} // namespace MeshToolsLib
std::vector< bool > markUnusedNodes(std::vector< MeshLib::Element * > const &elements, std::vector< MeshLib::Node * > const &nodes)
Marks nodes not used by any of the elements.
void removeMarkedNodes(std::vector< bool > const &nodes_to_delete, std::vector< MeshLib::Node * > &nodes)
Deallocates and removes nodes marked true.
MeshLib::Mesh * removeNodes(const MeshLib::Mesh &mesh, const std::vector< std::size_t > &del_nodes_idx, const std::string &new_mesh_name)
MeshLib::Mesh * removeElements(const MeshLib::Mesh &mesh, const std::vector< std::size_t > &removed_element_ids, const std::string &new_mesh_name)