OGS
ElementQualityMetric.cpp
Go to the documentation of this file.
1
16
17#include <cmath>
18
19#include "MeshLib/Node.h"
20
21namespace MeshToolsLib
22{
28
30 std::size_t n_bins) const
31{
32 if (n_bins == 0)
33 {
34 n_bins = static_cast<std::size_t>(
35 1 +
36 3.3 * std::log(static_cast<float>((_mesh.getNumberOfElements()))));
37 }
38
39 return BaseLib::Histogram<double>(getElementQuality(), n_bins, true);
40}
41
42std::vector<double> const& ElementQualityMetric::getElementQuality() const
43{
45}
46} // namespace MeshToolsLib
Definition of the ElementQualityMetricBase class.
Definition of the Node class.
std::size_t getNumberOfElements() const
Get the number of elements.
Definition Mesh.h:97
std::vector< double > _element_quality_metric
virtual BaseLib::Histogram< double > getHistogram(std::size_t n_bins=0) const
ElementQualityMetric(MeshLib::Mesh const &mesh)
std::vector< double > const & getElementQuality() const
Returns the result vector.