![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
A class template that can be used to compute various mesh metrics (CircleRatio, AreaToPerimeterRatio, UniformityRatio, VolumeDifference). More...
#include <mesh_metrics.hpp>
Public Types | |
| using | float_t = typename MeshType::float_t |
| using | index_t = typename MeshType::index_t |
| using | MetricsVec = std::vector<float_t> |
| using | CellType = Cell<MeshType::self_dim, float_t, index_t> |
Public Member Functions | |
| MeshMetrics (const MeshType &mesh, MetricsInitOptionsType options=MetricsInitOptions::AllMetrics) | |
| Construct a new Mesh Metrics object. | |
| const MetricsVec & | getCircleRatios () const |
| Getter for the vector of the cells' circle ratios. | |
| const MetricsVec & | getAreaToPerimeterRatios () const |
| Getter for the vector of the cells' area to perimeter ratios. | |
| const MetricsVec & | getUniformityFactors () const |
| Getter for the vector of the cells' uniformity factors. | |
| const MetricsVec & | getVolumeDifferences () const |
| Getter for the vector of the cells' volume difference. | |
| const std::array< MetricsVec, 4 > & | getMetrics () const |
| Getter for the array of all the metrics. | |
| void | computeCircleRatios () |
| method used to compute the mesh circle ratios | |
| void | computeAreaToPerimeterRatios () |
| method used to compute the mesh area to perimeter ratios | |
| void | computeUniformityFactors () |
| method used to compute the mesh uniformity factors | |
| void | computeVolumeDifferences () |
| method used to compute the mesh volume differences | |
Static Public Attributes | |
| static constexpr index_t | dim = MeshType::self_dim |
Private Attributes | |
| const MeshType & | m_mesh |
| const MetricsInitOptionsType | m_options |
| const index_t | m_n_cells |
| std::vector< CellType > | m_cells |
| std::array< MetricsVec, 4 > | m_all_metrics |
A class template that can be used to compute various mesh metrics (CircleRatio, AreaToPerimeterRatio, UniformityRatio, VolumeDifference).
The MeshMetrics class template provides methods to compute and access various geometric quality metrics for each cell in a mesh, such as circle ratio, area-to-perimeter ratio, uniformity factor, and volume difference. The metrics to be computed can be selected on construction via the MetricsInitOptions enum, allowing flexible and efficient analysis of mesh quality. Metrics are computed using the cell class and are stored internally for fast access. The class supports both 2D and 3D meshes, and is compatible with different floating-point and index types.
| MeshType | The particular mesh type on which the metrics have to be computed on (e.g. Mesh2D<double, int32_t>, etc.) |
| using vulpes::geometry::MeshMetrics< MeshType >::CellType = Cell<MeshType::self_dim, float_t, index_t> |
| using vulpes::geometry::MeshMetrics< MeshType >::float_t = typename MeshType::float_t |
| using vulpes::geometry::MeshMetrics< MeshType >::index_t = typename MeshType::index_t |
| using vulpes::geometry::MeshMetrics< MeshType >::MetricsVec = std::vector<float_t> |
|
explicit |
Construct a new Mesh Metrics object.
| mesh | A reference to the mesh we want to compute the metrics on |
| options | A parameter that specifies the metrics we want initialized on construction. If not specified it has value AllMetrics |
| void vulpes::geometry::MeshMetrics< MeshType >::computeAreaToPerimeterRatios | ( | ) |
method used to compute the mesh area to perimeter ratios
| void vulpes::geometry::MeshMetrics< MeshType >::computeCircleRatios | ( | ) |
method used to compute the mesh circle ratios
| void vulpes::geometry::MeshMetrics< MeshType >::computeUniformityFactors | ( | ) |
method used to compute the mesh uniformity factors
| void vulpes::geometry::MeshMetrics< MeshType >::computeVolumeDifferences | ( | ) |
method used to compute the mesh volume differences
| const MeshMetrics< MeshType >::MetricsVec & vulpes::geometry::MeshMetrics< MeshType >::getAreaToPerimeterRatios | ( | ) | const |
Getter for the vector of the cells' area to perimeter ratios.
| const MeshMetrics< MeshType >::MetricsVec & vulpes::geometry::MeshMetrics< MeshType >::getCircleRatios | ( | ) | const |
Getter for the vector of the cells' circle ratios.
| const std::array< typename MeshMetrics< MeshType >::MetricsVec, 4 > & vulpes::geometry::MeshMetrics< MeshType >::getMetrics | ( | ) | const |
Getter for the array of all the metrics.
| const MeshMetrics< MeshType >::MetricsVec & vulpes::geometry::MeshMetrics< MeshType >::getUniformityFactors | ( | ) | const |
Getter for the vector of the cells' uniformity factors.
| const MeshMetrics< MeshType >::MetricsVec & vulpes::geometry::MeshMetrics< MeshType >::getVolumeDifferences | ( | ) | const |
Getter for the vector of the cells' volume difference.
|
staticconstexpr |
|
private |
|
private |
|
private |
|
private |
|
private |