OGS
MeshToolsLib::AngleSkewMetric Struct Referencefinal

Detailed Description

Calculates the quality of mesh elements based on the EquiAngleSkew measure

Definition at line 25 of file AngleSkewMetric.h.

#include <AngleSkewMetric.h>

Inheritance diagram for MeshToolsLib::AngleSkewMetric:
[legend]
Collaboration diagram for MeshToolsLib::AngleSkewMetric:
[legend]

Public Member Functions

void calculateQuality () override
 Calculates the quality metric for each element of the mesh.
 
 ElementQualityMetric (MeshLib::Mesh const &mesh)
 
- Public Member Functions inherited from MeshToolsLib::ElementQualityMetric
 ElementQualityMetric (MeshLib::Mesh const &mesh)
 
virtual ~ElementQualityMetric ()=default
 
std::vector< double > const & getElementQuality () const
 Returns the result vector.
 
virtual BaseLib::Histogram< double > getHistogram (std::size_t n_bins=0) const
 

Additional Inherited Members

- Protected Attributes inherited from MeshToolsLib::ElementQualityMetric
double _min = std::numeric_limits<double>::max()
 
double _max = 0
 
MeshLib::Mesh const & _mesh
 
std::vector< double > _element_quality_metric
 

Member Function Documentation

◆ calculateQuality()

void MeshToolsLib::AngleSkewMetric::calculateQuality ( )
overridevirtual

Calculates the quality metric for each element of the mesh.

Implements MeshToolsLib::ElementQualityMetric.

Definition at line 145 of file AngleSkewMetric.cpp.

146{
147 for (auto const e : _mesh.getElements())
148 {
149 switch (e->getGeomType())
150 {
152 _element_quality_metric[e->getID()] = -1.0;
153 break;
155 _element_quality_metric[e->getID()] = checkTriangle(*e);
156 break;
158 _element_quality_metric[e->getID()] = checkQuad(*e);
159 break;
162 break;
165 break;
167 _element_quality_metric[e->getID()] = checkPrism(*e);
168 break;
169 default:
170 break;
171 }
172 }
173}
std::vector< double > _element_quality_metric
double checkTriangle(MeshLib::Element const &elem)
double checkHexahedron(MeshLib::Element const &elem)
double checkTetrahedron(MeshLib::Element const &elem)

References MeshToolsLib::ElementQualityMetric::_element_quality_metric, MeshToolsLib::ElementQualityMetric::_mesh, MeshLib::Mesh::getElements(), MeshLib::HEXAHEDRON, MeshLib::LINE, MeshLib::PRISM, MeshLib::QUAD, MeshLib::TETRAHEDRON, and MeshLib::TRIANGLE.

◆ ElementQualityMetric()

MeshToolsLib::ElementQualityMetric::ElementQualityMetric ( MeshLib::Mesh const & mesh)
explicit

Definition at line 33 of file ElementQualityMetric.cpp.

24 : _mesh(mesh)
25{
27}
std::size_t getNumberOfElements() const
Get the number of elements.
Definition Mesh.h:97

References MeshToolsLib::ElementQualityMetric::_mesh, and MeshLib::Mesh::getNumberOfElements().


The documentation for this struct was generated from the following files: