OGS
MeshValidation.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 <vector>
9
11
12namespace MeshLib
13{
14class Mesh;
15class Element;
16} // namespace MeshLib
17
18namespace MeshToolsLib
19{
20
24struct MeshValidation final
25{
31 static bool allNodesUsed(MeshLib::Mesh const& mesh);
32
38 static bool existCollapsibleNodes(MeshLib::Mesh& mesh);
39
44 static void evaluateElementGeometry(MeshLib::Mesh const& mesh);
45
53 static std::vector<ElementErrorCode> testElementGeometry(
54 const MeshLib::Mesh& mesh,
55 double min_volume = std::numeric_limits<double>::epsilon());
56
61 static std::array<std::string,
62 static_cast<std::size_t>(ElementErrorFlag::MaxValue)>
63 ElementErrorCodeOutput(const std::vector<ElementErrorCode>& error_codes);
64
77 static unsigned detectHoles(MeshLib::Mesh const& mesh);
78};
79
80} // namespace MeshToolsLib
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)