23#ifndef DUMUX_GEOMETRY_DIAMETER_HH
24#define DUMUX_GEOMETRY_DIAMETER_HH
35template<
class Geometry>
36typename Geometry::ctype
diameter(
const Geometry& geo)
39 typename Geometry::ctype h = 0.0;
40 for (std::size_t i = 0; i < geo.corners(); ++i)
41 for (std::size_t j = i + 1; j < geo.corners(); ++j)
42 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: geometry/diameter.hh:36