OGS
|
A collection of methods for testing mesh quality and correctness.
Definition at line 30 of file MeshValidation.h.
#include <MeshValidation.h>
Public Member Functions | |
MeshValidation (MeshLib::Mesh &mesh) | |
Static Public Member Functions | |
static std::vector< ElementErrorCode > | testElementGeometry (const MeshLib::Mesh &mesh, double min_volume=std::numeric_limits< double >::epsilon()) |
static std::array< std::string, static_cast< std::size_t >ElementErrorFlag::MaxValue)> | ElementErrorCodeOutput (const std::vector< ElementErrorCode > &error_codes) |
static unsigned | detectHoles (MeshLib::Mesh const &mesh) |
|
explicit |
Constructor
Definition at line 64 of file MeshValidation.cpp.
References ElementErrorCodeOutput(), MeshLib::MeshRevision::getNumberOfCollapsableNodes(), MeshLib::NodeSearch::getSearchedNodeIDs(), INFO(), MaxValue, MeshLib::NodeSearch::searchUnused(), and testElementGeometry().
|
static |
Tests if holes are located within the mesh. In this context, a hole is a boundary of an element with no neighbor that cannot be reached from the actual boundary of the mesh. Examples include a missing triangle in a 2D mesh or a missing Tetrahedron in a 3D mesh. The method does not work for 1d-meshes. Note, that this method does not work when complex 3D structures are build from 2D mesh elements, e.g. using the LayeredVolume-class, where more than two 2D elements may share an edge.
mesh | The mesh that is tested |
Definition at line 198 of file MeshValidation.cpp.
References MeshLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshLib::Mesh::getDimension(), and MeshLib::trackSurface().
Referenced by MeshAnalysisDialog::on_startButton_pressed(), and MeshLib::MeshInformation::writeMeshValidationResults().
|
static |
Detailed output which ElementID is associated with which error(s)
Definition at line 160 of file MeshValidation.cpp.
References MaxValue, NodeOrder, NonConvex, NonCoplanar, ElementErrorCode::toString(), and ZeroVolume.
Referenced by MeshValidation(), and MeshAnalysisDialog::elementsMsgOutput().
|
static |
Tests if elements are geometrically correct.
mesh | The mesh that is tested |
min_volume | The minimum required volume for a mesh element, so it is NOT considered faulty |
Definition at line 89 of file MeshValidation.cpp.
References MeshLib::Mesh::getElements(), MeshLib::Mesh::getNumberOfElements(), INFO(), MaxValue, NodeOrder, NonConvex, NonCoplanar, ElementErrorCode::toString(), and ZeroVolume.
Referenced by MeshValidation(), and MeshAnalysisDialog::on_startButton_pressed().