13#ifndef DUMUX_GEOMETRY_DIAMETER_HH
14#define DUMUX_GEOMETRY_DIAMETER_HH
25template<
class Geometry>
26typename Geometry::ctype
diameter(
const Geometry& geo)
29 typename Geometry::ctype h = 0.0;
30 for (std::size_t i = 0; i < geo.corners(); ++i)
31 for (std::size_t j = i + 1; j < geo.corners(); ++j)
32 h = max(h, (geo.corner(i)-geo.corner(j)).two_norm());
Geometry::ctype diameter(const Geometry &geo)
Computes the longest distance between points of a geometry.
Definition: diameter.hh:26