23#ifndef VULPES_GEOMETRY_MESH_METRICS_HPP_
24#define VULPES_GEOMETRY_MESH_METRICS_HPP_
87template <
typename MeshType>
90 using float_t =
typename MeshType::float_t;
91 using index_t =
typename MeshType::index_t;
106 const MeshType& mesh,
127 const std::array<MetricsVec, 4>&
getMetrics()
const;
A class template that can be used to compute various mesh metrics (CircleRatio, AreaToPerimeterRatio,...
Definition mesh_metrics.hpp:88
void computeAreaToPerimeterRatios()
method used to compute the mesh area to perimeter ratios
Definition mesh_metrics.cpp:117
void computeCircleRatios()
method used to compute the mesh circle ratios
Definition mesh_metrics.cpp:90
MeshMetrics(const MeshType &mesh, MetricsInitOptionsType options=MetricsInitOptions::AllMetrics)
Construct a new Mesh Metrics object.
Definition mesh_metrics.cpp:32
std::array< MetricsVec, 4 > m_all_metrics
Definition mesh_metrics.hpp:154
typename MeshType::index_t index_t
Definition mesh_metrics.hpp:91
const MetricsVec & getCircleRatios() const
Getter for the vector of the cells' circle ratios.
Definition mesh_metrics.cpp:83
const MeshType & m_mesh
Definition mesh_metrics.hpp:148
std::vector< CellType > m_cells
Definition mesh_metrics.hpp:152
std::vector< float_t > MetricsVec
Definition mesh_metrics.hpp:93
const MetricsVec & getAreaToPerimeterRatios() const
Getter for the vector of the cells' area to perimeter ratios.
Definition mesh_metrics.cpp:111
void computeVolumeDifferences()
method used to compute the mesh volume differences
Definition mesh_metrics.cpp:184
const MetricsVec & getUniformityFactors() const
Getter for the vector of the cells' uniformity factors.
Definition mesh_metrics.cpp:146
typename MeshType::float_t float_t
Definition mesh_metrics.hpp:90
void computeUniformityFactors()
method used to compute the mesh uniformity factors
Definition mesh_metrics.cpp:152
const index_t m_n_cells
Definition mesh_metrics.hpp:151
const std::array< MetricsVec, 4 > & getMetrics() const
Getter for the array of all the metrics.
Definition mesh_metrics.cpp:211
static constexpr index_t dim
Definition mesh_metrics.hpp:96
const MetricsVec & getVolumeDifferences() const
Getter for the vector of the cells' volume difference.
Definition mesh_metrics.cpp:178
Cell< MeshType::self_dim, float_t, index_t > CellType
Definition mesh_metrics.hpp:94
const MetricsInitOptionsType m_options
Definition mesh_metrics.hpp:149
Definition abs_agg_model.cpp:40
std::underlying_type_t< MetricsInitOptions > MetricsInitOptionsType
Definition mesh_metrics.hpp:68
MetricId
An enum that definies the indexes of various metrics in the global metrics array.
Definition mesh_metrics.hpp:43
@ VolumeDifferenceID
Definition mesh_metrics.hpp:47
@ UniformityFactorID
Definition mesh_metrics.hpp:46
@ AreaPerimeterRatioID
Definition mesh_metrics.hpp:45
@ CircleRatioID
Definition mesh_metrics.hpp:44
std::conditional_t< Dim==2, Cell2D< FloatType, IndexType >, Cell3D< FloatType, IndexType > > Cell
Definition cell.hpp:267
MetricsInitOptions
An enum that can be used to specify the metrics that we desire to be computed.
Definition mesh_metrics.hpp:60
@ AllMetrics
Definition mesh_metrics.hpp:65
@ CircleRatio
Definition mesh_metrics.hpp:61
@ VolumeDifference
Definition mesh_metrics.hpp:64
@ AreaPerimeterRatio
Definition mesh_metrics.hpp:62
@ UniformityFactor
Definition mesh_metrics.hpp:63
Definition cell_manager.hpp:38