OGS
MeshRevision.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <array>
18#include <limits>
19#include <string>
20#include <vector>
21
22// forward declaration
23namespace MeshLib
24{
25class Mesh;
26class Node;
27} // namespace MeshLib
28
29namespace MeshToolsLib
30{
36{
37public:
44 explicit MeshRevision(MeshLib::Mesh& mesh);
45
48 double eps = std::numeric_limits<double>::epsilon()) const;
49
52 std::vector<std::size_t> collapseNodeIndices(double eps) const;
53
65 MeshLib::Mesh* simplifyMesh(const std::string& new_mesh_name, double eps,
66 unsigned min_elem_dim = 1) const;
67
68private:
71 std::vector<MeshLib::Node*> constructNewNodesArray(
72 const std::vector<std::size_t>& id_map) const;
73
76};
77
78} // 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