OGS
MeshValidation.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <array>
18#include <limits>
19#include <vector>
20
22
23namespace MeshLib
24{
25class Mesh;
26class Element;
27} // namespace MeshLib
28
29namespace MeshToolsLib
30{
31
35struct MeshValidation final
36{
42 static bool allNodesUsed(MeshLib::Mesh const& mesh);
43
49 static bool existCollapsibleNodes(MeshLib::Mesh& mesh);
50
55 static void evaluateElementGeometry(MeshLib::Mesh const& mesh);
56
64 static std::vector<ElementErrorCode> testElementGeometry(
65 const MeshLib::Mesh& mesh,
66 double min_volume = std::numeric_limits<double>::epsilon());
67
72 static std::array<std::string,
73 static_cast<std::size_t>(ElementErrorFlag::MaxValue)>
74 ElementErrorCodeOutput(const std::vector<ElementErrorCode>& error_codes);
75
88 static unsigned detectHoles(MeshLib::Mesh const& mesh);
89};
90
91} // namespace MeshToolsLib
Definition of ElementErrorCodes.
A collection of methods for testing mesh quality and correctness.
static bool existCollapsibleNodes(MeshLib::Mesh &mesh)
static unsigned detectHoles(MeshLib::Mesh const &mesh)
static std::array< std::string, static_cast< std::size_t >(ElementErrorFlag::MaxValue)> ElementErrorCodeOutput(const std::vector< ElementErrorCode > &error_codes)
static bool allNodesUsed(MeshLib::Mesh const &mesh)
static std::vector< ElementErrorCode > testElementGeometry(const MeshLib::Mesh &mesh, double min_volume=std::numeric_limits< double >::epsilon())
static void evaluateElementGeometry(MeshLib::Mesh const &mesh)