OGS
MeshRevision.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 <array>
7#include <limits>
8#include <string>
9#include <vector>
10
11// forward declaration
12namespace MeshLib
13{
14class Mesh;
15class Node;
16} // namespace MeshLib
17
18namespace MeshToolsLib
19{
25{
26public:
33 explicit MeshRevision(MeshLib::Mesh& mesh);
34
37 double eps = std::numeric_limits<double>::epsilon()) const;
38
41 std::vector<std::size_t> collapseNodeIndices(double eps) const;
42
54 MeshLib::Mesh* simplifyMesh(const std::string& new_mesh_name, double eps,
55 unsigned min_elem_dim = 1) const;
56
57private:
60 std::vector<MeshLib::Node*> constructNewNodesArray(
61 const std::vector<std::size_t>& id_map) const;
62
65};
66
67} // namespace MeshToolsLib
MeshRevision(MeshLib::Mesh &mesh)
unsigned getNumberOfCollapsibleNodes(double eps=std::numeric_limits< double >::epsilon()) const
Returns the number of potentially collapsible nodes.
MeshLib::Mesh & _mesh
The original mesh used for constructing the class.
MeshLib::Mesh * simplifyMesh(const std::string &new_mesh_name, double eps, unsigned min_elem_dim=1) const
std::vector< MeshLib::Node * > constructNewNodesArray(const std::vector< std::size_t > &id_map) const
std::vector< std::size_t > collapseNodeIndices(double eps) const