Helper functions for distance queries.
#include <dune/common/fvector.hh>#include <dune/geometry/quadraturerules.hh>#include <dumux/common/math.hh>#include <dumux/geometry/boundingboxtree.hh>Go to the source code of this file.
| Namespaces | |
| namespace | Dumux | 
| namespace | Dumux::Detail | 
| Distance implementation details. | |
| Functions | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::averageDistancePointGeometry (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry, std::size_t integrationOrder=2) | 
| Compute the average distance from a point to a geometry by integration. | |
| template<class Point> | |
| static Point::value_type | Dumux::squaredDistancePointLine (const Point &p, const Point &a, const Point &b) | 
| Compute the squared distance from a point to a line through the points a and b. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::squaredDistancePointLine (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the squared distance from a point to a line given by a geometry with two corners. | |
| template<class Point> | |
| static Point::value_type | Dumux::distancePointLine (const Point &p, const Point &a, const Point &b) | 
| Compute the distance from a point to a line through the points a and b. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::distancePointLine (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the distance from a point to a line given by a geometry with two corners. | |
| template<class Point> | |
| static Point::value_type | Dumux::squaredDistancePointSegment (const Point &p, const Point &a, const Point &b) | 
| Compute the squared distance from a point to the segment connecting the points a and b. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::squaredDistancePointSegment (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the squared distance from a point to a given segment geometry. | |
| template<class Point> | |
| static Point::value_type | Dumux::distancePointSegment (const Point &p, const Point &a, const Point &b) | 
| Compute the distance from a point to the segment connecting the points a and b. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::distancePointSegment (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the distance from a point to a given segment geometry. | |
| template<class Point> | |
| static Point::value_type | Dumux::squaredDistancePointTriangle (const Point &p, const Point &a, const Point &b, const Point &c) | 
| Compute the shortest squared distance from a point to the triangle connecting the points a, b and c See https://www.iquilezles.org/www/articles/triangledistance/triangledistance.htm. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::squaredDistancePointTriangle (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the shortest squared distance from a point to a given triangle geometry. | |
| template<class Point> | |
| static Point::value_type | Dumux::distancePointTriangle (const Point &p, const Point &a, const Point &b, const Point &c) | 
| Compute the shortest distance from a point to the triangle connecting the points a, b and c. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::distancePointTriangle (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the shortest distance from a point to a given triangle geometry. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::squaredDistancePointPolygon (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the shortest squared distance from a point to a given polygon geometry. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::distancePointPolygon (const typename Geometry::GlobalCoordinate &p, const Geometry &geometry) | 
| Compute the shortest distance from a point to a given polygon geometry. | |
| template<class Geometry> | |
| static Geometry::ctype | Dumux::averageDistanceSegmentGeometry (const typename Geometry::GlobalCoordinate &a, const typename Geometry::GlobalCoordinate &b, const Geometry &geometry, std::size_t integrationOrder=2) | 
| Compute the average distance from a segment to a geometry by integration. | |
| template<class ctype, int dimWorld> | |
| static ctype | Dumux::distance (const Dune::FieldVector< ctype, dimWorld > &a, const Dune::FieldVector< ctype, dimWorld > &b) | 
| Compute the shortest distance between two points. | |
| template<class ctype, int dimWorld> | |
| static ctype | Dumux::squaredDistance (const Dune::FieldVector< ctype, dimWorld > &a, const Dune::FieldVector< ctype, dimWorld > &b) | 
| Compute the shortest squared distance between two points. | |
| template<class Geo1, class Geo2> | |
| static auto | Dumux::squaredDistance (const Geo1 &geo1, const Geo2 &geo2) | 
| Compute the shortest distance between two geometries. | |
| template<class Geo1, class Geo2> | |
| static auto | Dumux::distance (const Geo1 &geo1, const Geo2 &geo2) | 
| Compute the shortest distance between two geometries. | |
| template<class EntitySet, class ctype, int dimworld, typename std::enable_if_t<(EntitySet::Entity::Geometry::mydimension > 0), int > = 0> | |
| void | Dumux::Detail::closestEntity (const Dune::FieldVector< ctype, dimworld > &point, const BoundingBoxTree< EntitySet > &tree, std::size_t node, ctype &minSquaredDistance, std::size_t &eIdx) | 
| Compute the closest entity in an AABB tree (index and shortest squared distance) recursively. | |
| template<class EntitySet, class ctype, int dimworld> | |
| std::pair< ctype, std::size_t > | Dumux::closestEntity (const Dune::FieldVector< ctype, dimworld > &point, const BoundingBoxTree< EntitySet > &tree, ctype minSquaredDistance=std::numeric_limits< ctype >::max()) | 
| Compute the closest entity in an AABB tree to a point (index and shortest squared distance) | |
| template<class EntitySet, class ctype, int dimworld> | |
| ctype | Dumux::squaredDistance (const Dune::FieldVector< ctype, dimworld > &point, const BoundingBoxTree< EntitySet > &tree, ctype minSquaredDistance=std::numeric_limits< ctype >::max()) | 
| Compute the shortest squared distance to entities in an AABB tree. | |
| template<class EntitySet, class ctype, int dimworld> | |
| ctype | Dumux::distance (const Dune::FieldVector< ctype, dimworld > &point, const BoundingBoxTree< EntitySet > &tree, ctype minSquaredDistance=std::numeric_limits< ctype >::max()) | 
| Compute the shortest distance to entities in an AABB tree. | |