43    using ctype = 
typename std::decay_t<
decltype(c(0))>::value_type;
 
   44    static constexpr int coordDim = std::decay_t<
decltype(c(0))>::dimension;
 
   45    static_assert(coordDim >= dim, 
"Coordinate dimension has to be larger than geometry dimension");
 
   48    if constexpr (coordDim > 3)
 
   49        return std::numeric_limits<ctype>::quiet_NaN();
 
   51    if constexpr (dim == 0)
 
   54    else if constexpr (dim == 1)
 
   55        return (c(1)-c(0)).two_norm();
 
   57    else if constexpr (dim == 2)
 
   59        if (type == Dune::GeometryTypes::triangle)
 
   61            if constexpr (coordDim == 2)
 
   73        else if (type == Dune::GeometryTypes::quadrilateral)
 
   75            if constexpr (coordDim == 2)
 
   88            return std::numeric_limits<ctype>::quiet_NaN();
 
   91    else if constexpr (dim == 3)
 
   93        if (type == Dune::GeometryTypes::tetrahedron)
 
  100        else if (type == Dune::GeometryTypes::hexahedron)
 
  103            const auto v = c(7)-c(0);
 
  111        else if (type == Dune::GeometryTypes::pyramid)
 
  118            return 1.0/6.0 * abs(
 
  122        else if (type == Dune::GeometryTypes::prism)
 
  132            return std::numeric_limits<ctype>::quiet_NaN();
 
  135        return std::numeric_limits<ctype>::quiet_NaN();
 
 
  175auto volume(
const Geometry& geo, Transformation transformation, 
unsigned int integrationOrder = 4)
 
  177    using ctype = 
typename Geometry::ctype;
 
  179    const auto rule = Dune::QuadratureRules<ctype, Geometry::mydimension>::rule(geo.type(), integrationOrder);
 
  180    for (
const auto& qp : rule)
 
  181        volume += transformation.integrationElement(geo, qp.position())*qp.weight();
 
 
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:671
Scalar tripleProduct(const Dune::FieldVector< Scalar, 3 > &vec1, const Dune::FieldVector< Scalar, 3 > &vec2, const Dune::FieldVector< Scalar, 3 > &vec3)
Triple product of three vectors in three-dimensional Euclidean space retuning scalar.
Definition math.hh:700