DUNE-GRID-GLUE (2.10)
Projection of a line (triangle) on another line (triangle). More...
#include <dune/grid-glue/common/projection.hh>
Classes | |
struct | EdgeIntersection |
Intersection between two edges of a triangle. More... | |
Public Types | |
typedef Coordinate::field_type | Field |
Scalar type. | |
typedef std::array< Coordinate, dim > | Images |
List of corner images. More... | |
typedef Images | Preimages |
Public Member Functions | |
Projection (const Field overlap=Field(0), const Field max_normal_product=Field(-0.1)) | |
void | epsilon (const Field epsilon) |
Set epsilon used for floating-point comparisons. More... | |
template<typename Corners , typename Normals > | |
void | project (const std::tuple< Corners &, Corners & > &corners, const std::tuple< Normals &, Normals & > &normals) |
Do the actual projection. More... | |
const std::tuple< Images, Preimages > & | images () const |
Images and preimages of corners. More... | |
const std::tuple< std::bitset< dim >, std::bitset< dim > > & | success () const |
Indicate whether projection (inverse projection) is valid for each corner or not. More... | |
unsigned | numberOfEdgeIntersections () const |
Number of edge intersections. More... | |
const std::array< EdgeIntersection, maxEdgeIntersections > & | edgeIntersections () const |
Edge-edge intersections. More... | |
Static Public Attributes | |
static constexpr unsigned | dim = Coordinate::dimension |
dimension of coordinates | |
static constexpr unsigned | maxEdgeIntersections = dim == 3 ? 9 : 0 |
maximum number of edge-edge intersections More... | |
Detailed Description
class Dune::GridGlue::Projection< Coordinate >
Projection of a line (triangle) on another line (triangle).
This class implements methods to project a line (2d) or triangle (3d) on another line (triangle) along normal field given by values at the corners.
Member Typedef Documentation
◆ Images
typedef std::array<Coordinate, dim> Dune::GridGlue::Projection< Coordinate >::Images |
List of corner images.
This type is used to return the list of images Φ(xᵢ) of the corners xᵢ in barycentric coordinates with respect to the image simplex. The last entry is used to return the (signed) distance along the normal.
◆ Preimages
typedef Images Dune::GridGlue::Projection< Coordinate >::Preimages |
List of corner preimages.
This is used as Images, but for the preimages Φ⁻¹(yᵢ) of the corners yᵢ of the image simplex.
Constructor & Destructor Documentation
◆ Projection()
Dune::GridGlue::Projection< Coordinate >::Projection | ( | const Field | overlap = Field(0) , |
const Field | max_normal_product = Field(-0.1) |
||
) |
- Parameters
-
overlap allowed overlap max_normal_product maximum value for scalar product ν(x)·ν(Φ(x))
Member Function Documentation
◆ edgeIntersections()
|
inline |
Edge-edge intersections.
- Note
- project() must be called before this method can be used.
- Warning
- Only the first numberOfEdgeIntersections() entries are valid edge intersections.
◆ epsilon()
void Dune::GridGlue::Projection< Coordinate >::epsilon | ( | const Field | epsilon | ) |
Set epsilon used for floating-point comparisons.
- Parameters
-
epsilon new epsilon used for floating-point comaprisons
◆ images()
|
inline |
Images and preimages of corners.
Returns a pair of arrays. The first array contains the images Φ(xᵢ)
of the corners xᵢ
. The second array contains the preimages Φ⁻¹(yⱼ)
of the corners yⱼ
.
The first d-1 values are the barycentric coordinates with respect to the corners of the (pre)image, the last value is the signed distance between the projected point and its (pre)image along the normal at the projected preimage corner or the inverse projected image corner.
- Note
- project() must be called before this method can be used.
- Returns
- pair of arrays giving
((Φ(xᵢ))ᵢ, (Φ⁻¹(yⱼ))ⱼ)
in barycentric coordinates
◆ numberOfEdgeIntersections()
|
inline |
Number of edge intersections.
- Note
- project() must be called before this method can be used.
◆ project()
void Dune::GridGlue::Projection< Coordinate >::project | ( | const std::tuple< Corners &, Corners & > & | corners, |
const std::tuple< Normals &, Normals & > & | normals | ||
) |
Do the actual projection.
- Parameters
-
corners euclidean coordinates of corners of preimage and image normals normals at corners of preimage and image
- Template Parameters
-
Corners list of corner coordinates, should be std::vector<Coordinate>
orstd::array<Coordinate, n>
Normals list of corner normals, should be std::vector<Coordinate>
orstd::array<Coordinate, n>
◆ success()
|
inline |
Indicate whether projection (inverse projection) is valid for each corner or not.
Returns a pair of bitsets. The first bitset indicates if the projection Φ(xᵢ)
is valid for each corner xᵢ
, that is that Φ(xᵢ)
could be computed and lies in the image simplex. The second bitset indicates the same for the inverse projection Φ⁻¹(yⱼ)
for the corners yⱼ
.
- Note
- project() must be called before this method can be used.
- Returns
- pair of bitsets indicating success of (inverse) projection at corners
xᵢ
(yⱼ
)
Member Data Documentation
◆ maxEdgeIntersections
|
staticconstexpr |
maximum number of edge-edge intersections
See also \seealso edgeIntersections()
The documentation for this class was generated from the following files:
- dune/grid-glue/common/projection.hh
- dune/grid-glue/common/projection_impl.hh
