Revision 4b12ab4d055d3c080f93e52f7e5a4b2dec01d30e authored by Dmitri Naumov on 19 May 2021, 09:21:04 UTC, committed by Dmitry Yu. Naumov on 03 June 2021, 16:34:25 UTC
Moving them from protected section. All of the access is now through public interface and these parts can be hidden.
1 parent 69a7f3a
ElementQualityMetric.h
/**
* \file
* \author Thomas Fischer
* \date 2010-12-08
* \brief Definition of the ElementQualityMetricBase class.
*
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <vector>
#include "BaseLib/Histogram.h"
#include "MeshLib/Mesh.h"
#include "MeshLib/Elements/Element.h"
namespace MeshLib
{
/**
* Base class for calculating the quality of mesh element based on a given metric
*/
class ElementQualityMetric
{
public:
explicit ElementQualityMetric(Mesh const& mesh);
virtual ~ElementQualityMetric() = default;
/// Calculates the quality metric for each element of the mesh
virtual void calculateQuality () = 0;
/// Returns the result vector
std::vector<double> const& getElementQuality () const;
/// Returns a histogram of the quality vector separated into the given number of bins.
/// If no number of bins is specified, one will be calculated based on the Sturges criterium.
virtual BaseLib::Histogram<double> getHistogram (std::size_t n_bins = 0) const;
protected:
double _min;
double _max;
Mesh const& _mesh;
std::vector<double> _element_quality_metric;
};
} // namespace MeshLib
Computing file changes ...