27 for (std::size_t k = 0; k < nElements; ++k)
29 Element const& elem(*elements[k]);
39 double worst_ratio(1.0);
40 for (std::size_t i = 0; i < n_neighbors; ++i)
43 if (neighbor ==
nullptr)
49 (vol_a > vol_b) ? vol_b / vol_a : vol_a / vol_b;
50 if (ratio < worst_ratio)
Definition of the SizeDifferenceMetric class.
std::vector< double > _element_quality_metric
virtual double getContent() const =0
Returns the length, area or volume of a 1D, 2D or 3D element.
virtual const Element * getNeighbor(unsigned i) const =0
Get the specified neighbor.
virtual unsigned getNumberOfNeighbors() const =0
Get the number of neighbors for this element.
virtual constexpr unsigned getDimension() const =0
Get dimension of the mesh element.
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
std::size_t getNumberOfElements() const
Get the number of elements.
void calculateQuality() override
Calculates the quality metric for each element of the mesh.