3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Namespaces | Functions
distance.hh File Reference

Helper functions for distance queries. More...

#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.

Description

Helper functions for distance queries.

Classes

struct  Dumux::Detail::GeometrySquaredDistance< Geo1, Geo2, dimWorld, dim1, dim2 >
 
struct  Dumux::Detail::GeometrySquaredDistance< Geo1, Geo2, dimWorld, 0, 0 >
 
struct  Dumux::Detail::GeometrySquaredDistance< Geo1, Geo2, dimWorld, 1, 0 >
 
struct  Dumux::Detail::GeometrySquaredDistance< Geo1, Geo2, dimWorld, 0, 1 >
 
struct  Dumux::Detail::GeometrySquaredDistance< Geo1, Geo2, dimWorld, 0, 2 >
 
struct  Dumux::Detail::GeometrySquaredDistance< Geo1, Geo2, dimWorld, 2, 0 >
 

Namespaces

namespace  Dumux
 Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class Geo1 , class Geo2 >
static auto Dumux::squaredDistance (const Geo1 &geo1, const Geo2 &geo2)
 Compute the shortest distance between two geometries. More...
 
template<class Geo1 , class Geo2 >
static auto Dumux::distance (const Geo1 &geo1, const Geo2 &geo2)
 Compute the shortest distance between two geometries. More...
 
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. More...
 
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) More...
 
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. More...
 
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. More...
 
Include dependency graph for distance.hh: