This namespace contains helper functions for the projection of two triangular surface on each other.
More...
|
template<class T , int dim> |
static Dune::FieldVector< T, dim > | crossProduct (const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b) |
| Compute the cross product of two vectors. More...
|
|
template<int dim, int dimworld, class T > |
static bool | projection (const Dune::FieldVector< T, dimworld > &corner, const Dune::FieldVector< T, dimworld > &direction, const std::vector< Dune::FieldVector< T, dimworld > > &targetCorners, Dune::FieldVector< T, dim > &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...
|
|
template<int dim, int dimworld, class T > |
static bool | inverseProjection (const std::vector< Dune::FieldVector< T, dimworld > > &corners, const std::vector< Dune::FieldVector< T, dimworld > > &directions, const Dune::FieldVector< T, dimworld > &target, Dune::FieldVector< T, dim > &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...
|
|
template<int dim, int dimworld, class T = double> |
static void | addEdgeIntersections (const std::vector< Dune::FieldVector< T, dimworld > > &corners1, const std::vector< Dune::FieldVector< T, dimworld > > &corners2, const std::vector< Dune::FieldVector< T, dimworld > > &directions1, const Dune::GeometryType >1, const Dune::GeometryType >2, std::vector< Dune::array< Dune::FieldVector< T, dim >, 2 > > &polygonCorners, const std::vector< int > &hitCorners, std::bitset<(1<< dim)> &neighborIntersects1, std::bitset<(1<< dim)> &neighborIntersects2, const T overlap=1e-1) |
| Compute the projection along given directions of surface element edges onto target edges. More...
|
|
This namespace contains helper functions for the projection of two triangular surface on each other.
template<int dim, int dimworld, class T = double>
static void Projection::addEdgeIntersections |
( |
const std::vector< Dune::FieldVector< T, dimworld > > & |
corners1, |
|
|
const std::vector< Dune::FieldVector< T, dimworld > > & |
corners2, |
|
|
const std::vector< Dune::FieldVector< T, dimworld > > & |
directions1, |
|
|
const Dune::GeometryType & |
gt1, |
|
|
const Dune::GeometryType & |
gt2, |
|
|
std::vector< Dune::array< Dune::FieldVector< T, dim >, 2 > > & |
polygonCorners, |
|
|
const std::vector< int > & |
hitCorners, |
|
|
std::bitset<(1<< dim)> & |
neighborIntersects1, |
|
|
std::bitset<(1<< dim)> & |
neighborIntersects2, |
|
|
const T |
overlap = 1e-1 |
|
) |
| |
|
static |
Compute the projection along given directions of surface element edges onto target edges.
- Parameters
-
corners1 | The coordinates of the surface element corners whose edges are projected. |
corners2 | The coordinates of the surface element corners on which is projected. |
directions1 | The directions along which the projection is done. |
gt1 | The geometry type of the projected surface element. |
gt2 | The geometry type of the target surface element. |
polygonCorners | If intersection points are found their local coordinates are added to this vector. |
hitCorners | Vector containing information on which surface element corners are projected on each other. |
neighborIntersects1 | If two edges intersect then the corresponding surface element neighbors also intersect. This information for the projected surface element is stored in the bitfield. |
neighborIntersects2 | If two edges intersect then the corresponding surface element neighbors also intersect. This information for the surface element on which is projected is stored in the bitfield. |
overlap | The amount of overlap that is allowed, i.e. projection among the opposite direction is valid if the scaling is smaller than overlap. |
References Projection::EdgeIntersectionHelper< dim, dimworld, T >::addEdgeIntersections().
template<int dim, int dimworld, class T >
static bool Projection::inverseProjection |
( |
const std::vector< Dune::FieldVector< T, dimworld > > & |
corners, |
|
|
const std::vector< Dune::FieldVector< T, dimworld > > & |
directions, |
|
|
const Dune::FieldVector< T, dimworld > & |
target, |
|
|
Dune::FieldVector< T, dim > & |
preImage, |
|
|
const T |
overlap = 1e-1 |
|
) |
| |
|
static |
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
-
corners | The coordinates of the corners. |
directions | The directions along which the projection is done. |
target | The point whose inverse projection is computed. |
preImage | The pre-image of the target point in local coordinates of the surface element. |
overlap | The 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.
References Projection::ProjectionHelper< dim, dimworld, T >::inverseProjection().
template<int dim, int dimworld, class T >
static bool Projection::projection |
( |
const Dune::FieldVector< T, dimworld > & |
corner, |
|
|
const Dune::FieldVector< T, dimworld > & |
direction, |
|
|
const std::vector< Dune::FieldVector< T, dimworld > > & |
targetCorners, |
|
|
Dune::FieldVector< T, dim > & |
image, |
|
|
const T |
overlap = 1e-1 |
|
) |
| |
|
static |
Compute the projection of a point along a given direction into the convex hull of some target points.
- Parameters
-
corner | The coordinates of the point that is projected. |
direction | The direction along which an intersection with the target surface element is searched. |
targetCorners | The corner coordinates of the target surface element. |
image | The projected corner in local coordinates of the target surface element. |
overlap | The 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.
References Projection::ProjectionHelper< dim, dimworld, T >::projection().