| FEAT 3
    Finite Element Analysis Toolbox | 
Standard Transformation namespace. More...
| Functions | |
| template<typename DT_ , int world_dim, int sc_, int sp_, int smx_, int snx_> | |
| void | inverse_mapping (Tiny::Vector< DT_, 2, sc_ > &coeffs, const Tiny::Vector< DT_, world_dim, sp_ > &point, const Tiny::Matrix< DT_, 2, world_dim, smx_, snx_ > &x) | 
| Computes the inverse coordinate mapping wrt. a Simplex<1> embedded in 2d or 3d.  More... | |
| template<typename DT_ , int sc_, int sp_, int smx_, int snx_> | |
| void | inverse_mapping (Tiny::Vector< DT_, 3, sc_ > &coeffs, const Tiny::Vector< DT_, 3, sp_ > &point, const Tiny::Matrix< DT_, 3, 3, smx_, snx_ > &x) | 
| Computes the inverse coordinate mapping wrt. a Simplex<2> in 3d.  More... | |
| template<typename DT_ , int helper_dim, int world_dim, int sc_, int sp_, int smx_, int snx_, typename std::enable_if< helper_dim==world_dim+1, bool >::type = true> | |
| void | inverse_mapping (Tiny::Vector< DT_, world_dim, sc_ > &coeffs, const Tiny::Vector< DT_, world_dim, sp_ > &point, const Tiny::Matrix< DT_, helper_dim, world_dim, smx_, snx_ > &x) | 
| Computes the inverse coordinate mapping wrt. a full-dimensional Simplex.  More... | |
Standard Transformation namespace.
This namespace encapsulates all classes related to the implementation of the standard first-order (i.e. P1/Q1) transformation mapping.
| void FEAT::Trafo::Standard::inverse_mapping | ( | Tiny::Vector< DT_, 2, sc_ > & | coeffs, | 
| const Tiny::Vector< DT_, world_dim, sp_ > & | point, | ||
| const Tiny::Matrix< DT_, 2, world_dim, smx_, snx_ > & | x | ||
| ) | 
Computes the inverse coordinate mapping wrt. a Simplex<1> embedded in 2d or 3d.
| DT_ | The floating point type | 
| world_dim | Dimension of the points to compute the inverse mapping for | 
| sc_ | Stride for the vector of coefficients | 
| sp_ | Stride for the point vector | 
| smx_,snx_ | Row and column strides for the matrix holding the vertices | 
| [out] | coeffs | The coefficients for the mapping from the reference cell to the real cell | 
| [in] | point | The point to compute the coefficients for | 
| [in] | x | Coordinates of the simplex on which we compute coeffs. | 
Assume we have a non-degenerate Simplex<1> called \( S \) in \( \mathbb{R}^d \) where \( d=2, 3 \) Then \( S \) is defined by vertices \( x^0, x^1 \in \mathbb{R}^d \).
For a point \( x \in \mathbb{R}^d \) we are looking for its projection \( p \) onto the straight line defined by \( x^0, x^1 \), which means that \( (x^1 - x^0, x - p) = 0 \). If this holds, \( p \) has the form \( p = x^0 + \omega (x^1 - x^0), \omega \in \mathbb{R} \).
It is easy to see that
\[ x \in S \Leftrightarrow \omega \in [0, 1] \]
and that
\[ \omega = \frac{(x^1 - x^0, x - x^0)}{\| x^1 - x^0 \|_2^2}. \]
This routine computes the coefficient \( \omega \) and saves it to \( \mathrm{coeffs[0]} \) and the distance \( \mathrm{coeffs[1]} = \| x - p \|_2 \).
Definition at line 141 of file inverse_mapping.hpp.
References FEAT::Tiny::dot(), FEAT::Tiny::Vector< T_, n_, s_ >::norm_euclid(), and FEAT::Math::sqr().
| void FEAT::Trafo::Standard::inverse_mapping | ( | Tiny::Vector< DT_, 3, sc_ > & | coeffs, | 
| const Tiny::Vector< DT_, 3, sp_ > & | point, | ||
| const Tiny::Matrix< DT_, 3, 3, smx_, snx_ > & | x | ||
| ) | 
Computes the inverse coordinate mapping wrt. a Simplex<2> in 3d.
| DT_ | The floating point type | 
| world_dim | Dimension of the points to compute the inverse mapping for | 
| sc_ | Stride for the vector of coefficients | 
| sp_ | Stride for the point vector | 
| smx_,snx_ | Row and column strides for the matrix holding the vertices | 
| [out] | coeffs | The coefficients for the mapping from the reference cell to the real cell | 
| [in] | point | The point to compute the coefficients for | 
| [in] | x | Coordinates of the simplex on which we compute coeffs. | 
Assume we have a non-degenerate Simplex<2> called \( S \) in \( \mathbb{R}^d \) defined by vertices \( x^j \in \mathbb{R}^d, j = 0, \dots, 2 \). Then  
\[ v^3 := (x^1 - x^0) \times (x^2 - x^0) \Rightarrow v^3 \perp S. \]
Using \( x^3 := \| v^3 \|_2^{-1} v^3 \), the vertices \( x^0, \dots, x^3 \) define a fictitious Simplex<3> \( S' \). Then we can proceed with computing the coefficients as in the Simplex<d> in \( \mathbb{R}^d\) variant of this function, and the last coefficient is just the distance of the point \( x \) to the plane in which \( S \) lies.
If \( \exists j \in \{ 0, \dots, s \}: \lambda_j < 0 \), then \( x \notin S \) and \( x \) lies on the far side of the plane defined by the facet opposite vertex \( j \). This makes the barycentric coordinates very handy for finding out in which direction of a given simplex a point lies.
Definition at line 205 of file inverse_mapping.hpp.
References FEAT::Tiny::Vector< T_, n_, s_ >::normalize(), FEAT::Tiny::orthogonal_3x2(), and FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_inverse().
| void FEAT::Trafo::Standard::inverse_mapping | ( | Tiny::Vector< DT_, world_dim, sc_ > & | coeffs, | 
| const Tiny::Vector< DT_, world_dim, sp_ > & | point, | ||
| const Tiny::Matrix< DT_, helper_dim, world_dim, smx_, snx_ > & | x | ||
| ) | 
Computes the inverse coordinate mapping wrt. a full-dimensional Simplex.
| DT_ | The floating point type | 
| world_dim | Dimension of the points to compute the inverse mapping for | 
| sc_ | Stride for the vector of coefficients | 
| sp_ | Stride for the point vector | 
| smx_,snx_ | Row and column strides for the matrix holding the vertices | 
| [out] | coeffs | The coefficients for the mapping from the reference cell to the real cell | 
| [in] | point | The point to compute the coefficients for | 
| [in] | x | Coordinates of the simplex on which we compute coeffs. | 
Assume we have a non-degenerate Simplex<d> called \( S \) in \( \mathbb{R}^d \) defined by vertices \( x^j \in \mathbb{R}^d, j = 0, \dots, d \).
Then
\[ \forall x \in \mathbb{R}^d: x = x^0 + \sum_{j=1}^s \lambda_j (x^j - x^0) \]
 and \( \lambda_j, j=1,\dots,s \) with \( \lambda_0 := 1 - sum_{j=1}^s \) are called the  barycentric coordinates of \( x \) wrt. S . Since \( \lambda_0 \) is redundant, we just compute the coefficients \( \lambda_1, \dots, \lambda_s \). Note that the above equation can be rewritten as  
\[ \forall x \in \mathbb{R}^d: x = \sum_{j=0}^s \lambda_j x^j. \]
It is easy to see that
\[ x \in S \Leftrightarrow \forall j = 0, \dots, d: \lambda_j \in [0, 1] . \]
If \( \exists j \in \{ 0, \dots, s \}: \lambda_j < 0 \), then \( x \notin S \) and \( x \) lies on the far side of the plane defined by the facet opposite vertex \( j \). This makes the barycentric coordinates very handy for finding out in which direction of a given simplex a point lies.
Definition at line 69 of file inverse_mapping.hpp.
References FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::set_inverse().