ug4
ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl > Class Template Reference

Base class for Reference mappings helping to implement interface. More...

#include <reference_mapping.h>

Public Member Functions

void global_to_local (MathVector< dim > &locPos, const MathVector< worldDim > &globPos, const size_t maxIter=1000, const number tol=1e-10) const
 map global coordinate to local coordinate More...
 
void global_to_local (MathVector< dim > *vLocPos, const MathVector< worldDim > *vGlobPos, size_t n, const size_t maxIter=1000, const number tol=1e-10) const
 map global coordinate to local coordinate for n local positions More...
 
void global_to_local (std::vector< MathVector< dim > > &vLocPos, const std::vector< MathVector< worldDim > > &vGlobPos, const size_t maxIter=1000, const number tol=1e-10) const
 map global coordinate to local coordinate for a vector of local positions More...
 
bool is_linear () const
 returns if mapping is affine More...
 
void jacobian (MathMatrix< worldDim, dim > &J, const MathVector< dim > &locPos) const
 returns jacobian More...
 
void jacobian (MathMatrix< worldDim, dim > *vJ, const MathVector< dim > *vLocPos, size_t n) const
 returns jacobian for n local positions More...
 
void jacobian (std::vector< MathMatrix< worldDim, dim > > &vJ, const std::vector< MathVector< dim > > &vLocPos) const
 returns jacobian for a vector of local positions More...
 
void jacobian_transposed (MathMatrix< dim, worldDim > *vJT, const MathVector< dim > *vLocPos, size_t n) const
 returns transposed of jacobian for n local positions More...
 
void jacobian_transposed (std::vector< MathMatrix< dim, worldDim > > &vJT, const std::vector< MathVector< dim > > &vLocPos) const
 returns transposed of jacobian for a vector of positions More...
 
number jacobian_transposed_inverse (MathMatrix< worldDim, dim > &JTInv, const MathVector< dim > &locPos) const
 returns transposed of the inverse of the jacobian More...
 
void jacobian_transposed_inverse (MathMatrix< worldDim, dim > *vJTInv, const MathVector< dim > *vLocPos, size_t n) const
 returns transposed of the inverse of the jacobian for n local positions More...
 
void jacobian_transposed_inverse (MathMatrix< worldDim, dim > *vJTInv, number *vDet, const MathVector< dim > *vLocPos, size_t n) const
 returns transposed of the inverse of the jacobian for n local positions More...
 
void jacobian_transposed_inverse (std::vector< MathMatrix< worldDim, dim > > &vJTInv, const std::vector< MathVector< dim > > &vLocPos) const
 returns transposed of the inverse of the jacobian for a vector of positions More...
 
void jacobian_transposed_inverse (std::vector< MathMatrix< worldDim, dim > > &vJTInv, std::vector< number > &vDet, const std::vector< MathVector< dim > > &vLocPos) const
 returns transposed of the inverse of the jacobian for a vector of positions More...
 
void local_to_global (MathVector< worldDim > *vGlobPos, const MathVector< dim > *vLocPos, size_t n) const
 map local coordinate to global coordinate for n local positions More...
 
void local_to_global (std::vector< MathVector< worldDim > > &vGlobPos, const std::vector< MathVector< dim > > &vLocPos) const
 map local coordinate to global coordinate for a vector of local positions More...
 
number sqrt_gram_det (const MathVector< dim > &locPos) const
 returns the determinate of the jacobian More...
 
void sqrt_gram_det (number *vDet, const MathVector< dim > *vLocPos, size_t n) const
 returns the determinate of the jacobian for n local positions More...
 
void sqrt_gram_det (std::vector< number > &vDet, const std::vector< MathVector< dim > > &vLocPos) const
 returns the determinate of the jacobian for a vector of local positions More...
 

Protected Member Functions

TImpl & getImpl ()
 access to implementation More...
 
const TImpl & getImpl () const
 const access to implementation More...
 

Detailed Description

template<int dim, int worldDim, bool isLinear, typename TImpl>
class ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >

Base class for Reference mappings helping to implement interface.

Member Function Documentation

◆ getImpl() [1/2]

◆ getImpl() [2/2]

template<int dim, int worldDim, bool isLinear, typename TImpl >
const TImpl& ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::getImpl ( ) const
inlineprotected

const access to implementation

◆ global_to_local() [1/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::global_to_local ( MathVector< dim > &  locPos,
const MathVector< worldDim > &  globPos,
const size_t  maxIter = 1000,
const number  tol = 1e-10 
) const
inline

map global coordinate to local coordinate

Parameters
locPos(o) for the computed local coordinates (i) specify the initial guess!
globPos(i) the global coordinates to transform
maxIter(i) maximum number of the Newton iterations
tol(i) tolerance (smalles possible correction in the Newton iterations)

References ug::DID_REFERENCE_MAPPING_GLOB_TO_LOC, dim, ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::getImpl(), ug::LeftInverse(), ug::MatVecMult(), UG_COND_THROW, UG_DLOG, UG_THROW, ug::VecAbsIsLess(), ug::VecScale(), ug::VecSubtract(), and ug::VecTwoNorm().

Referenced by ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::global_to_local().

◆ global_to_local() [2/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::global_to_local ( MathVector< dim > *  vLocPos,
const MathVector< worldDim > *  vGlobPos,
size_t  n,
const size_t  maxIter = 1000,
const number  tol = 1e-10 
) const
inline

map global coordinate to local coordinate for n local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::getImpl(), ug::LeftInverse(), ug::MatVecScaleMultAppend(), and ug::VecSubtract().

◆ global_to_local() [3/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::global_to_local ( std::vector< MathVector< dim > > &  vLocPos,
const std::vector< MathVector< worldDim > > &  vGlobPos,
const size_t  maxIter = 1000,
const number  tol = 1e-10 
) const
inline

map global coordinate to local coordinate for a vector of local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::global_to_local().

◆ is_linear()

template<int dim, int worldDim, bool isLinear, typename TImpl >
bool ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::is_linear ( ) const
inline

returns if mapping is affine

◆ jacobian() [1/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian ( MathMatrix< worldDim, dim > &  J,
const MathVector< dim > &  locPos 
) const
inline

◆ jacobian() [2/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian ( MathMatrix< worldDim, dim > *  vJ,
const MathVector< dim > *  vLocPos,
size_t  n 
) const
inline

returns jacobian for n local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::getImpl().

◆ jacobian() [3/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian ( std::vector< MathMatrix< worldDim, dim > > &  vJ,
const std::vector< MathVector< dim > > &  vLocPos 
) const
inline

returns jacobian for a vector of local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian().

◆ jacobian_transposed() [1/2]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed ( MathMatrix< dim, worldDim > *  vJT,
const MathVector< dim > *  vLocPos,
size_t  n 
) const
inline

◆ jacobian_transposed() [2/2]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed ( std::vector< MathMatrix< dim, worldDim > > &  vJT,
const std::vector< MathVector< dim > > &  vLocPos 
) const
inline

returns transposed of jacobian for a vector of positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed().

◆ jacobian_transposed_inverse() [1/5]

template<int dim, int worldDim, bool isLinear, typename TImpl >
number ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse ( MathMatrix< worldDim, dim > &  JTInv,
const MathVector< dim > &  locPos 
) const
inline

◆ jacobian_transposed_inverse() [2/5]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse ( MathMatrix< worldDim, dim > *  vJTInv,
const MathVector< dim > *  vLocPos,
size_t  n 
) const
inline

returns transposed of the inverse of the jacobian for n local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::getImpl().

◆ jacobian_transposed_inverse() [3/5]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse ( MathMatrix< worldDim, dim > *  vJTInv,
number vDet,
const MathVector< dim > *  vLocPos,
size_t  n 
) const
inline

returns transposed of the inverse of the jacobian for n local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::getImpl().

◆ jacobian_transposed_inverse() [4/5]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse ( std::vector< MathMatrix< worldDim, dim > > &  vJTInv,
const std::vector< MathVector< dim > > &  vLocPos 
) const
inline

returns transposed of the inverse of the jacobian for a vector of positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse().

◆ jacobian_transposed_inverse() [5/5]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse ( std::vector< MathMatrix< worldDim, dim > > &  vJTInv,
std::vector< number > &  vDet,
const std::vector< MathVector< dim > > &  vLocPos 
) const
inline

returns transposed of the inverse of the jacobian for a vector of positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse().

◆ local_to_global() [1/2]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::local_to_global ( MathVector< worldDim > *  vGlobPos,
const MathVector< dim > *  vLocPos,
size_t  n 
) const
inline

◆ local_to_global() [2/2]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::local_to_global ( std::vector< MathVector< worldDim > > &  vGlobPos,
const std::vector< MathVector< dim > > &  vLocPos 
) const
inline

map local coordinate to global coordinate for a vector of local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::local_to_global().

◆ sqrt_gram_det() [1/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
number ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::sqrt_gram_det ( const MathVector< dim > &  locPos) const
inline

◆ sqrt_gram_det() [2/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::sqrt_gram_det ( number vDet,
const MathVector< dim > *  vLocPos,
size_t  n 
) const
inline

returns the determinate of the jacobian for n local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::sqrt_gram_det().

◆ sqrt_gram_det() [3/3]

template<int dim, int worldDim, bool isLinear, typename TImpl >
void ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::sqrt_gram_det ( std::vector< number > &  vDet,
const std::vector< MathVector< dim > > &  vLocPos 
) const
inline

returns the determinate of the jacobian for a vector of local positions

References ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::sqrt_gram_det().


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