dune-grid-glue  2.3.0
Static Public Member Functions | List of all members
Projection::ProjectionHelper< dim, dimworld, T > Class Template Reference

Helper class that provides static methods to compute the projection and inverse projection of a point along some given directions. More...

#include <dune/grid-glue/common/projectionhelper.hh>

Static Public Member Functions

static bool inverseProjection (const std::vector< WorldCoords > &corners, const std::vector< WorldCoords > &directions, const WorldCoords &target, LocalCoords &preImage, const T overlap=1e-1)
 Compute the inverse projection of a point onto some surface element where the projection is done across directions which are associated to corners of an surface element. More...
 
static bool projection (const WorldCoords &corner, const WorldCoords &direction, const std::vector< WorldCoords > &targetCorners, LocalCoords &image, const T overlap=1e-1)
 Compute the projection of a point along a given direction into the convex hull of some target points. More...
 

Detailed Description

template<int dim, int dimworld, class T = double>
class Projection::ProjectionHelper< dim, dimworld, T >

Helper class that provides static methods to compute the projection and inverse projection of a point along some given directions.

Member Function Documentation

template<int dim, int dimworld, class T = double>
static bool Projection::ProjectionHelper< dim, dimworld, T >::inverseProjection ( const std::vector< WorldCoords > &  corners,
const std::vector< WorldCoords > &  directions,
const WorldCoords &  target,
LocalCoords &  preImage,
const T  overlap = 1e-1 
)
inlinestatic

Compute the inverse projection of a point onto some surface element where the projection is done across directions which are associated to corners of an surface element.

Parameters
cornersThe coordinates of the corners.
directionsThe directions along which the projection is done.
targetThe point whose inverse projection is computed.
preImageThe pre-image of the target point in local coordinates of the surface element.
overlapThe amount of overlap that is allowed, i.e. projection among the opposite direction is valid if the scaling is smaller than overlap.
Returns
Returns true if the computed pre-image is within the convex hull of the corner points.

Referenced by Projection::ProjectionHelper< 2, 3, T >::inverseProjection(), and Projection::inverseProjection().

template<int dim, int dimworld, class T = double>
static bool Projection::ProjectionHelper< dim, dimworld, T >::projection ( const WorldCoords &  corner,
const WorldCoords &  direction,
const std::vector< WorldCoords > &  targetCorners,
LocalCoords &  image,
const T  overlap = 1e-1 
)
inlinestatic

Compute the projection of a point along a given direction into the convex hull of some target points.

Parameters
cornerThe coordinates of the point that is projected.
directionThe direction along which an intersection with the target surface element is searched.
targetCornersThe corner coordinates of the target surface element.
imageThe projected corner in local coordinates of the target surface element.
overlapThe amount of overlap that is allowed, i.e. projection among the opposite direction is valid if the scaling is smaller than overlap.
Returns
Returns true if the computed image is within the convex hull of the target corner points.

Referenced by Projection::ProjectionHelper< 2, 3, T >::projection(), and Projection::projection().


The documentation for this class was generated from the following file: