|
dune-grid-glue 2.10
|
Functions | |
| template<typename Coordinate , typename Field > | |
| Coordinate | corner (unsigned c) |
| std::pair< unsigned, unsigned > | edgeToCorners (unsigned edge) |
| template<typename Coordinate , typename Corners > | |
| Corners::value_type | interpolate (const Coordinate &x, const Corners &corners) |
| template<typename Coordinate , typename Normals > | |
| Normals::value_type | interpolate_unit_normals (const Coordinate &x, const Normals &normals) |
| template<typename Coordinate , typename Field > | |
| bool | inside (const Coordinate &x, const Field &epsilon) |
|
inline |
Return corner coordinates of a simplex.
Given the number c of a corner, this function returns the coordinate of the cth corner of the standard simplex with the same dimension as Coordinate.
| c | corner number |
cth corner of the standard simplex
|
inline |
Translate edge to corner numbers.
Given the number edge of an edge of a triangle, this function returns the number of the corners belonging to it.
| edge | edge number of a triangle |
|
inline |
Check if the point x is inside the standard simplex.
This functions checks if the point x is in the inside (or on the boundary) of the standard simplex, that is xᵢ ≥ 0 and ∑ xᵢ ≤ 1.
| x | coordinates of point to check |
| epsilon | tolerance used for floating-point comparisons |
true if x is inside, false otherwise
|
inline |
Convert barycentric coordinates to euclidean coordinates.
This function converts barycentric coordinates x with respect to the triangle with corners corners to euclidean coordinates. For the result y the following equation holds: yᵢ = (cornersᵢ₊₁ - corners₀) xᵢ
Note that this can also be for linear interpolation of normals given on the corners, but this does not preserve the norm (e.g. for unit normals).
| x | barycentric coordinates |
| corners | coordinates or normals at the corners |
|
inline |
Interpolate between unit normals on corners of a simplex.
This functions interpolates between unit normals given on corners of a simplex using linear interpolation.
| x | barycentric coordinates |
| normals | unit normals at corners |
x \seealso interpolate(const Coordinate&, const Corners&)