27 for (std::size_t k = 0; k < nElements; ++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.
virtual double getContent() const =0
Returns the length, area or volume of a 1D, 2D or 3D element.
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.
virtual const Element * getNeighbor(unsigned i) const =0
Get the specified neighbor.
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
unsigned getDimension() const
Returns the dimension of the mesh (determined by the maximum dimension over all elements).
std::size_t getNumberOfElements() const
Get the number of elements.