26#ifndef DUMUX_GEOMETRY_CIRCUMSPHERE_HH
27#define DUMUX_GEOMETRY_CIRCUMSPHERE_HH
41static inline Sphere<typename Point::value_type, Point::dimension>
44 const auto ac = c - a;
45 const auto ab = b - a;
47 const auto distCenterToA = (
crossProduct(n, ab)*ac.two_norm2() +
crossProduct(ac, n)*ab.two_norm2()) / (2.0*n.two_norm2());
49 return { a + distCenterToA, distCenterToA.two_norm() };
56template<
class Geometry,
typename std::enable_if_t<Geometry::mydimension == 2,
int> = 0>
57static inline Sphere<typename Geometry::ctype, Geometry::coorddimension>
60 assert(triangle.corners() == 3 &&
"Geometry is not a triangle.");
Define some often used mathematical functions.
A function to compute bounding spheres of points clouds or convex polytopes.
static Sphere< typename Point::value_type, Point::dimension > circumSphereOfTriangle(const Point &a, const Point &b, const Point &c)
Computes the circumsphere of a triangle.
Definition: circumsphere.hh:42
Dune::FieldVector< Scalar, 3 > crossProduct(const Dune::FieldVector< Scalar, 3 > &vec1, const Dune::FieldVector< Scalar, 3 > &vec2)
Cross product of two vectors in three-dimensional Euclidean space.
Definition: math.hh:654
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29