24#ifndef DUMUX_GEOMETRY_INTERSECTS_POINT_GEOMETRY_HH
25#define DUMUX_GEOMETRY_INTERSECTS_POINT_GEOMETRY_HH
28#include <dune/common/exceptions.hh>
29#include <dune/common/fvector.hh>
39template <
class ctype,
int dimworld,
class Geometry,
typename std::enable_if_t<(Geometry::mydimension == 3),
int> = 0>
43 const auto type = g.type();
46 if (type.isTetrahedron())
50 else if (type.isHexahedron())
61 else if (type.isPyramid())
69 else if (type.isPrism())
78 DUNE_THROW(Dune::NotImplemented,
79 "Intersection for point and geometry type "
80 << type <<
" in " << dimworld <<
"-dimensional world.");
87template <
class ctype,
int dimworld,
class Geometry,
typename std::enable_if_t<(Geometry::mydimension == 2),
int> = 0>
91 const auto type = g.type();
94 if (type.isTriangle())
98 else if (type.isQuadrilateral())
106 DUNE_THROW(Dune::NotImplemented,
107 "Intersection for point and geometry type "
108 << type <<
" in " << dimworld <<
"-dimensional world.");
115template <
class ctype,
int dimworld,
class Geometry,
typename std::enable_if_t<(Geometry::mydimension == 1),
int> = 0>
Detect if a point intersects a simplex (including boundary)
bool intersectsPointGeometry(const Dune::FieldVector< ctype, dimworld > &point, const Geometry &g)
Find out whether a point is inside a three-dimensional geometry.
Definition: intersectspointgeometry.hh:40
bool intersectsPointSimplex(const Dune::FieldVector< ctype, dimworld > &point, const Dune::FieldVector< ctype, dimworld > &p0, const Dune::FieldVector< ctype, dimworld > &p1, const Dune::FieldVector< ctype, dimworld > &p2, const Dune::FieldVector< ctype, dimworld > &p3)
Find out whether a point is inside the tetrahedron (p0, p1, p2, p3) (dimworld is 3)
Definition: intersectspointsimplex.hh:38
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29