OGS
|
A collection of methods for testing mesh quality and correctness.
Definition at line 35 of file MeshValidation.h.
#include <MeshValidation.h>
Static Public Member Functions | |
static bool | allNodesUsed (MeshLib::Mesh const &mesh) |
static bool | existCollapsibleNodes (MeshLib::Mesh &mesh) |
static void | evaluateElementGeometry (MeshLib::Mesh const &mesh) |
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) |
|
static |
Tests if all nodes of the mesh are used in an element.
mesh | The mesh that is tested |
Definition at line 64 of file MeshValidation.cpp.
References MeshLib::NodeSearch::getSearchedNodeIDs(), INFO(), and MeshLib::NodeSearch::searchUnused().
Referenced by MeshToolsLib::MeshInformation::writeMeshValidationResults().
|
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 207 of file MeshValidation.cpp.
References MeshLib::Cell, MeshLib::Face, MeshToolsLib::BoundaryExtraction::getBoundaryElementsAsMesh(), MeshLib::getBulkIDString(), MeshLib::Mesh::getDimension(), MeshLib::Node, and MeshToolsLib::trackSurface().
Referenced by MeshAnalysisDialog::on_startButton_pressed(), and MeshToolsLib::MeshInformation::writeMeshValidationResults().
|
static |
Detailed output which ElementID is associated with which error(s)
Definition at line 169 of file MeshValidation.cpp.
References MaxValue, NodeOrder, NonConvex, NonCoplanar, ElementErrorCode::toString(), and ZeroVolume.
Referenced by MeshAnalysisDialog::elementsMsgOutput(), and evaluateElementGeometry().
|
static |
Prints evaluation data computed by testElementGeometry.
mesh | The mesh that is tested |
Definition at line 85 of file MeshValidation.cpp.
References ElementErrorCodeOutput(), INFO(), MaxValue, and testElementGeometry().
Referenced by MeshToolsLib::MeshInformation::writeMeshValidationResults().
|
static |
Tests if nodes of the mesh can be collapsed.
mesh | The mesh that is tested |
Definition at line 77 of file MeshValidation.cpp.
References MeshToolsLib::MeshRevision::getNumberOfCollapsibleNodes(), and INFO().
Referenced by MeshToolsLib::MeshInformation::writeMeshValidationResults().
|
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 98 of file MeshValidation.cpp.
References MeshLib::Mesh::getElements(), MeshLib::Mesh::getNumberOfElements(), INFO(), MaxValue, NodeOrder, NonConvex, NonCoplanar, ElementErrorCode::toString(), and ZeroVolume.
Referenced by evaluateElementGeometry(), and MeshAnalysisDialog::on_startButton_pressed().