dune-geometry 2.9.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits > Class Template Reference

Implement a MultiLinearGeometry with additional caching. More...

#include <dune/geometry/multilineargeometry.hh>

Inheritance diagram for Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >:
Inheritance graph

Public Types

typedef Base::ReferenceElement ReferenceElement
 
typedef Base::ctype ctype
 
typedef Base::LocalCoordinate LocalCoordinate
 
typedef Base::GlobalCoordinate GlobalCoordinate
 
typedef Base::Volume Volume
 
typedef Base::JacobianTransposed JacobianTransposed
 
typedef Base::JacobianInverseTransposed JacobianInverseTransposed
 
typedef Base::Jacobian Jacobian
 
typedef Base::JacobianInverse JacobianInverse
 

Public Member Functions

template<class CornerStorage >
 CachedMultiLinearGeometry (const ReferenceElement &referenceElement, const CornerStorage &cornerStorage)
 
template<class CornerStorage >
 CachedMultiLinearGeometry (Dune::GeometryType gt, const CornerStorage &cornerStorage)
 
bool affine () const
 is this mapping affine?
 
GlobalCoordinate center () const
 obtain the centroid of the mapping's image
 
GlobalCoordinate global (const LocalCoordinate &local) const
 evaluate the mapping
 
LocalCoordinate local (const GlobalCoordinate &global) const
 evaluate the inverse mapping
 
ctype integrationElement (const LocalCoordinate &local) const
 obtain the integration element
 
Volume volume () const
 obtain the volume of the mapping's image
 
JacobianTransposed jacobianTransposed (const LocalCoordinate &local) const
 obtain the transposed of the Jacobian
 
JacobianInverseTransposed jacobianInverseTransposed (const LocalCoordinate &local) const
 obtain the transposed of the Jacobian's inverse
 
Jacobian jacobian (const LocalCoordinate &local) const
 Obtain the Jacobian.
 
JacobianInverse jacobianInverse (const LocalCoordinate &local) const
 Obtain the Jacobian's inverse.
 
GlobalCoordinate corner (int i) const
 obtain coordinates of the i-th corner
 
Dune::GeometryType type () const
 obtain the name of the reference element
 
int corners () const
 obtain number of corners of the corresponding reference element
 

Static Public Attributes

static const int mydimension
 geometry dimension
 
static const int coorddimension
 coordinate dimension
 

Protected Types

typedef Base::MatrixHelper MatrixHelper
 
typedef Dune::ReferenceElements< ctype, mydimensionReferenceElements
 
typedef std::conditional< hasSingleGeometryType, std::integral_constant< unsignedint, Traits::templatehasSingleGeometryType< mydimension >::topologyId >, unsignedint >::type TopologyId
 

Protected Member Functions

ReferenceElement refElement () const
 
bool affine (JacobianTransposed &jacobianT) const
 
TopologyId topologyId () const
 

Static Protected Member Functions

template<int dim, class CornerIterator >
static bool affine (TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt)
 
template<class CornerIterator >
static bool affine (TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt)
 
template<bool add, int dim, class CornerIterator >
static void global (TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
 
template<bool add, class CornerIterator >
static void global (TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
 
template<bool add, int rows, int dim, class CornerIterator >
static void jacobianTransposed (TopologyId topologyId, std::integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
 
template<bool add, int rows, class CornerIterator >
static void jacobianTransposed (TopologyId topologyId, std::integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)
 

Detailed Description

template<class ct, int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
class Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >

Implement a MultiLinearGeometry with additional caching.

This class implements the same interface and functionality as MultiLinearGeometry. However, it additionally implements caching for various results.

Template Parameters
ctcoordinate type
mydimgeometry dimension
cdimcoordinate dimension
Traitstraits allowing to tweak some implementation details (optional)

Member Typedef Documentation

◆ ctype

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::ctype Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::ctype

◆ GlobalCoordinate

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::GlobalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::GlobalCoordinate

◆ Jacobian

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::Jacobian Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::Jacobian

◆ JacobianInverse

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::JacobianInverse Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverse

◆ JacobianInverseTransposed

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::JacobianInverseTransposed Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed

◆ JacobianTransposed

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::JacobianTransposed Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianTransposed

◆ LocalCoordinate

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::LocalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::LocalCoordinate

◆ MatrixHelper

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::MatrixHelper Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::MatrixHelper
protected

◆ ReferenceElement

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::ReferenceElement Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::ReferenceElement

◆ ReferenceElements

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Dune::ReferenceElements< ctype, mydimension > Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::ReferenceElements
protectedinherited

◆ TopologyId

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef std::conditional<hasSingleGeometryType,std::integral_constant<unsignedint,Traits::templatehasSingleGeometryType<mydimension>::topologyId>,unsignedint>::type Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::TopologyId
protectedinherited

◆ Volume

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::Volume Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::Volume

Constructor & Destructor Documentation

◆ CachedMultiLinearGeometry() [1/2]

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
template<class CornerStorage >
Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::CachedMultiLinearGeometry ( const ReferenceElement & referenceElement,
const CornerStorage & cornerStorage )
inline

◆ CachedMultiLinearGeometry() [2/2]

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
template<class CornerStorage >
Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::CachedMultiLinearGeometry ( Dune::GeometryType gt,
const CornerStorage & cornerStorage )
inline

Member Function Documentation

◆ affine() [1/4]

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
bool Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( ) const
inline

is this mapping affine?

◆ affine() [2/4]

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
bool Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( JacobianTransposed & jacobianT) const
inlineprotectedinherited

◆ affine() [3/4]

template<class ct , int mydim, int cdim, class Traits >
template<class CornerIterator >
bool Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( TopologyId topologyId,
std::integral_constant< int, 0 > ,
CornerIterator & cit,
JacobianTransposed & jt )
inlinestaticprotectedinherited

◆ affine() [4/4]

template<class ct , int mydim, int cdim, class Traits >
template<int dim, class CornerIterator >
bool Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( TopologyId topologyId,
std::integral_constant< int, dim > ,
CornerIterator & cit,
JacobianTransposed & jt )
inlinestaticprotectedinherited

◆ center()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
GlobalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::center ( ) const
inline

obtain the centroid of the mapping's image

◆ corner()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
GlobalCoordinate Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::corner ( int i) const
inline

obtain coordinates of the i-th corner

◆ corners()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
int Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::corners ( ) const
inlineinherited

obtain number of corners of the corresponding reference element

◆ global() [1/3]

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
GlobalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::global ( const LocalCoordinate & local) const
inline

evaluate the mapping

Parameters
[in]locallocal coordinate to map
Returns
corresponding global coordinate

◆ global() [2/3]

template<class ct , int mydim, int cdim, class Traits >
template<bool add, class CornerIterator >
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::global ( TopologyId topologyId,
std::integral_constant< int, 0 > ,
CornerIterator & cit,
const ctype & df,
const LocalCoordinate & x,
const ctype & rf,
GlobalCoordinate & y )
inlinestaticprotectedinherited

◆ global() [3/3]

template<class ct , int mydim, int cdim, class Traits >
template<bool add, int dim, class CornerIterator >
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::global ( TopologyId topologyId,
std::integral_constant< int, dim > ,
CornerIterator & cit,
const ctype & df,
const LocalCoordinate & x,
const ctype & rf,
GlobalCoordinate & y )
inlinestaticprotectedinherited

◆ integrationElement()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
ctype Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::integrationElement ( const LocalCoordinate & local) const
inline

obtain the integration element

If the Jacobian of the mapping is denoted by $J(x)$, the integration integration element $\mu(x)$ is given by

\[ \mu(x) = \sqrt{|\det (J^T(x) J(x))|}.\]

Parameters
[in]locallocal coordinate to evaluate the integration element in
Returns
the integration element $\mu(x)$.
Note
For affine mappings, it is more efficient to call jacobianInverseTransposed before integrationElement, if both are required.

◆ jacobian()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
Jacobian Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobian ( const LocalCoordinate & local) const
inline

Obtain the Jacobian.

Parameters
[in]locallocal coordinate to evaluate Jacobian in
Returns
a copy of the transposed of the Jacobian

◆ jacobianInverse()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
JacobianInverse Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianInverse ( const LocalCoordinate & local) const
inline

Obtain the Jacobian's inverse.

The Jacobian's inverse is defined as a pseudo-inverse. If we denote the Jacobian by $J(x)$, the following condition holds:

\[J^{-1}(x) J(x) = I.\]

◆ jacobianInverseTransposed()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
JacobianInverseTransposed Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianInverseTransposed ( const LocalCoordinate & local) const
inline

obtain the transposed of the Jacobian's inverse

The Jacobian's inverse is defined as a pseudo-inverse. If we denote the Jacobian by $J(x)$, the following condition holds:

\[J^{-1}(x) J(x) = I.\]

◆ jacobianTransposed() [1/3]

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
JacobianTransposed Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed ( const LocalCoordinate & local) const
inline

obtain the transposed of the Jacobian

Parameters
[in]locallocal coordinate to evaluate Jacobian in
Returns
a reference to the transposed of the Jacobian
Note
The returned reference is reused on the next call to JacobianTransposed, destroying the previous value.

◆ jacobianTransposed() [2/3]

template<class ct , int mydim, int cdim, class Traits >
template<bool add, int rows, class CornerIterator >
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed ( TopologyId topologyId,
std::integral_constant< int, 0 > ,
CornerIterator & cit,
const ctype & df,
const LocalCoordinate & x,
const ctype & rf,
FieldMatrix< ctype, rows, cdim > & jt )
inlinestaticprotectedinherited

◆ jacobianTransposed() [3/3]

template<class ct , int mydim, int cdim, class Traits >
template<bool add, int rows, int dim, class CornerIterator >
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed ( TopologyId topologyId,
std::integral_constant< int, dim > ,
CornerIterator & cit,
const ctype & df,
const LocalCoordinate & x,
const ctype & rf,
FieldMatrix< ctype, rows, cdim > & jt )
inlinestaticprotectedinherited

◆ local()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
LocalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::local ( const GlobalCoordinate & global) const
inline

evaluate the inverse mapping

Parameters
[in]globalglobal coordinate to map
Returns
corresponding local coordinate
Note
For given global coordinate y the returned local coordinate x that minimizes the following function over the local coordinate space spanned by the reference element.
(global( x ) - y).two_norm()
GlobalCoordinate global(const LocalCoordinate &local) const
evaluate the mapping
Definition multilineargeometry.hh:580

◆ refElement()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
ReferenceElement Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::refElement ( ) const
inlineprotected

◆ topologyId()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
TopologyId Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::topologyId ( ) const
inlineprotectedinherited

◆ type()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
Dune::GeometryType Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::type ( ) const
inlineinherited

obtain the name of the reference element

◆ volume()

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
Volume Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::volume ( ) const
inline

obtain the volume of the mapping's image

Member Data Documentation

◆ coorddimension

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
const int Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::coorddimension
static

coordinate dimension

◆ mydimension

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
const int Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::mydimension
static

geometry dimension


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