HyperHDG
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t > Class Template Reference

Mapping of a unit hypercube to a parallelotope — can also be used for simplices. More...

#include <linear.hxx>

Collaboration diagram for Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >:
Collaboration graph
[legend]

Public Member Functions

 Linear ()=default
 Construct affine-linear mapping. More...
 
 Linear (const Point< space_dimT, map_float_t > &translation, const SmallMat< space_dimT, hyEdge_dimT, map_float_t > &matrix)
 Construct affine-linear mapping. More...
 
map_float_t functional_determinant_hyEdge () const
 The functional determinant of the affine-linear mappring. More...
 
map_float_t functional_determinant_hyNode (const unsigned int index) const
 The functional determinant of the affine-linear mapping of a hypernode. More...
 
SmallVec< space_dimT, map_float_t > matrix_column (const unsigned int col) const
 Return vector representing matrix column of specified index. More...
 
template<unsigned int n_vec>
SmallMat< space_dimT, n_vec, map_float_t > map_reference_to_physical (const SmallMat< hyEdge_dimT, n_vec, map_float_t > &points) const
 Map n_vec points from reference to physical element. More...
 
template<unsigned int n_vec>
SmallMat< hyEdge_dimT, n_vec, map_float_t > map_physical_to_reference (const SmallMat< space_dimT, n_vec, map_float_t > &phy_points) const
 Map n_vec points from physical to element. More...
 
const SmallSquareMat< space_dimT, map_float_t > & mat_q () const
 Return matrix Q of the QR decomposition. More...
 
const SmallSquareMat< hyEdge_dimT, map_float_t > & mat_r () const
 Return matrix R of the QR decomposition. More...
 
SmallVec< hyEdge_dimT, map_float_t > local_normal (const unsigned int index) const
 Return local normal of given index. More...
 
SmallVec< space_dimT, map_float_t > inner_normal (const unsigned int index) const
 Return inner normal of given index. More...
 
SmallVec< space_dimT, map_float_t > outer_normal (const unsigned int index) const
 Return outer normal of given index. More...
 
const SmallMat< space_dimT, hyEdge_dimT, map_float_t > & matrix () const
 Return matrix associated to affine-linear transformation. More...
 
const SmallVec< space_dimT, map_float_t > & translation () const
 Return shifting vector associated to affine-linear transformation. More...
 

Static Public Member Functions

static constexpr unsigned int hyEdge_dim ()
 Returns the template parameter representing the dimension of a hyperedge. More...
 
static constexpr unsigned int space_dim ()
 Returns the template parameter representing the dimension of the space. More...
 

Private Attributes

SmallVec< space_dimT, map_float_t > translation_
 The translation of the affine mapping from reference to physical element. More...
 
SmallMat< space_dimT, hyEdge_dimT, map_float_t > matrix_
 The matrix of the affine mapping from reference to physical element. More...
 
SmallSquareMat< space_dimT, map_float_t > matrix_q_
 Matrix Q of QR decomposition of the matrix of the affine transformation. More...
 
SmallSquareMat< hyEdge_dimT, map_float_t > matrix_r_
 Matrix R of QR decomposition of the matrix of the affine transformation. More...
 

Detailed Description

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t>
class Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >

Mapping of a unit hypercube to a parallelotope — can also be used for simplices.


The affine-linear mapping of a hyEdge_dimT dimensional unit square to an parallelotope which lives in space_dimT dimensions.

Authors
Guido Kanschat, Heidelberg University, 2019–2020.
Andreas Rupp, Heidelberg University, 2019–2020.

Constructor & Destructor Documentation

◆ Linear() [1/2]

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::Linear ( )
default

Construct affine-linear mapping.


◆ Linear() [2/2]

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::Linear ( const Point< space_dimT, map_float_t > &  translation,
const SmallMat< space_dimT, hyEdge_dimT, map_float_t > &  matrix 
)
inline

Construct affine-linear mapping.


Parameters
translationThe translation of the afine-linear mapping.
matrixThe matrix of the affine-linear mapping.
Here is the call graph for this function:

Member Function Documentation

◆ functional_determinant_hyEdge()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
map_float_t Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::functional_determinant_hyEdge ( ) const
inline

The functional determinant of the affine-linear mappring.


The determinant, in general is only defined for square matrices. In our case, the determinant is related to the ratio of Lebesque measure of the reference cell and the Haussdorff measure of the physical cell. This induces a natural generalization to rectangular matrices (with at least as many rows as columns), where the generalized determinant can be defined as the product of the diagonal entries of matrix R of the QR decomposition if normalized as it is described above.

This determinant corresponds (up to its sign) to the general Haussdorff transformation formula of measures by a factor of g = sqrt( (D Phi)^T (D Phi) ). The difference in the sign will become important for the transformation of gradients.

Here is the call graph for this function:

◆ functional_determinant_hyNode()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
map_float_t Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::functional_determinant_hyNode ( const unsigned int  index) const
inline

The functional determinant of the affine-linear mapping of a hypernode.


For details consider the description of functional_determinant_hyEdge(), and that a hypernode is spanned by all, but one columns of the matrix for the affine-linear mapping.

Parameters
indexIndex of the vector in the matrix which is not related to the node.
Here is the call graph for this function:

◆ hyEdge_dim()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
static constexpr unsigned int Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::hyEdge_dim ( )
inlinestaticconstexpr

Returns the template parameter representing the dimension of a hyperedge.


Return values
hyEdge_dimTThe dimension of a hyperedge.

◆ inner_normal()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallVec<space_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::inner_normal ( const unsigned int  index) const
inline

Return inner normal of given index.


Return outer unit normal with respect to the hypernode which is spanned by all columns of the transformation matrix but the column of the given index. The vector has to be in the span of the columns of the transformation matrix. This is an element of the same dimension as the full space.

Parameters
indexIndex of the vector in the matrix which is not related to the node.
Here is the call graph for this function:

◆ local_normal()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallVec<hyEdge_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::local_normal ( const unsigned int  index) const
inline

Return local normal of given index.


Return outer unit normal with respect to the hypernode which is spanned by all columns of R, but the column of the given index. This is an element of the same dimension as the reference square.

Parameters
indexIndex of the vector in the matrix which is not related to the node.
Here is the call graph for this function:

◆ map_physical_to_reference()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
template<unsigned int n_vec>
SmallMat<hyEdge_dimT, n_vec, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::map_physical_to_reference ( const SmallMat< space_dimT, n_vec, map_float_t > &  phy_points) const
inline

Map n_vec points from physical to element.


Parameters
phy_pointsMatrix whose columns consist of the mapped points.
Return values
pointsMatrix whose columns consist of the points to be mapped.

◆ map_reference_to_physical()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
template<unsigned int n_vec>
SmallMat<space_dimT, n_vec, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::map_reference_to_physical ( const SmallMat< hyEdge_dimT, n_vec, map_float_t > &  points) const
inline

Map n_vec points from reference to physical element.


Parameters
pointsMatrix whose columns consist of the points to be mapped.
Return values
phy_pointsMatrix whose columns consist of the mapped points.

◆ mat_q()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
const SmallSquareMat<space_dimT, map_float_t>& Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::mat_q ( ) const
inline

Return matrix Q of the QR decomposition.


◆ mat_r()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
const SmallSquareMat<hyEdge_dimT, map_float_t>& Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::mat_r ( ) const
inline

Return matrix R of the QR decomposition.


◆ matrix()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
const SmallMat<space_dimT, hyEdge_dimT, map_float_t>& Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::matrix ( ) const
inline

Return matrix associated to affine-linear transformation.


◆ matrix_column()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallVec<space_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::matrix_column ( const unsigned int  col) const
inline

Return vector representing matrix column of specified index.


Parameters
colThe index of the column that is to be returned.
Here is the call graph for this function:

◆ outer_normal()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallVec<space_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::outer_normal ( const unsigned int  index) const
inline

Return outer normal of given index.


Return unit normal with respect to the hyperedge within the full space.

Parameters
indexIndex of the normal.

◆ space_dim()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
static constexpr unsigned int Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::space_dim ( )
inlinestaticconstexpr

Returns the template parameter representing the dimension of the space.


Return values
space_dimTThe dimension of the space.

◆ translation()

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
const SmallVec<space_dimT, map_float_t>& Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::translation ( ) const
inline

Return shifting vector associated to affine-linear transformation.


Member Data Documentation

◆ matrix_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallMat<space_dimT, hyEdge_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::matrix_
private

The matrix of the affine mapping from reference to physical element.


◆ matrix_q_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallSquareMat<space_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::matrix_q_
private

Matrix Q of QR decomposition of the matrix of the affine transformation.


This matrix is normalized to have det(Q) = +1.

◆ matrix_r_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallSquareMat<hyEdge_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::matrix_r_
private

Matrix R of QR decomposition of the matrix of the affine transformation.


This matrix actually is a rectangular matrix. Due to our assumption that the space dimension is larger than or equal to the dimension of a hyperedge, the matrix matrix and its R of the QR decomposition have at least as many rows, as they have columns. Nonetheless, R is an upper triangular matrix. This allows to remove the zero rows (actually below our saved R) without loss of generality, but saving some space.

This matrix is normalized to have non-negative diagonal entries, except for the very first.

◆ translation_

template<unsigned int hyEdge_dimT, unsigned int space_dimT, typename map_float_t >
SmallVec<space_dimT, map_float_t> Mapping::Linear< hyEdge_dimT, space_dimT, map_float_t >::translation_
private

The translation of the affine mapping from reference to physical element.



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