OGS
ElementQualityMetric.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <vector>
18
19#include "BaseLib/Histogram.h"
21#include "MeshLib/Mesh.h"
22
23namespace MeshToolsLib
24{
25
31{
32public:
33 explicit ElementQualityMetric(MeshLib::Mesh const& mesh);
34
35 virtual ~ElementQualityMetric() = default;
36
38 virtual void calculateQuality() = 0;
39
41 std::vector<double> const& getElementQuality() const;
42
47 std::size_t n_bins = 0) const;
48
49protected:
50 double _min = std::numeric_limits<double>::max();
51 double _max = 0;
53 std::vector<double> _element_quality_metric;
54};
55} // namespace MeshToolsLib
Definition of the Element class.
Implementation of Histogram class.
Definition of the Mesh class.
std::vector< double > _element_quality_metric
virtual BaseLib::Histogram< double > getHistogram(std::size_t n_bins=0) const
virtual ~ElementQualityMetric()=default
ElementQualityMetric(MeshLib::Mesh const &mesh)
virtual void calculateQuality()=0
Calculates the quality metric for each element of the mesh.
std::vector< double > const & getElementQuality() const
Returns the result vector.