dune-geometry  2.3beta2
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | 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::JacobianTransposed JacobianTransposed
typedef
Base::JacobianInverseTransposed 
JacobianInverseTransposed
typedef JacobianInverseTransposed Jacobian
 For backward-compatibility, export the type JacobianInverseTransposed as Jacobian.

Public Member Functions

template<class CornerStorage >
 CachedMultiLinearGeometry (const ReferenceElement &refElement, 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
ctype volume () const
 obtain the volume of the mapping's image
const JacobianTransposedjacobianTransposed (const LocalCoordinate &local) const
 obtain the transposed of the Jacobian
const JacobianInverseTransposedjacobianInverseTransposed (const LocalCoordinate &local) const
 obtain the transposed of the Jacobian's inverse
Dune::GeometryType type () const
 obtain the name of the reference element
int corners () const
 obtain number of corners of the corresponding reference element
GlobalCoordinate corner (int i) const
 obtain coordinates of the i-th corner

Static Public Attributes

static const int mydimension = mydim
 geometry dimension
static const int coorddimension = cdim
 coordinate dimension

Protected Types

typedef Base::MatrixHelper MatrixHelper
typedef conditional
< hasSingleGeometryType,
integral_constant< unsigned
int, Traits::template
hasSingleGeometryType
< mydimension >::topologyId >
, unsigned int >::type 
TopologyId
typedef
Dune::ReferenceElements< ctype,
mydimension
ReferenceElements

Protected Member Functions

const ReferenceElementrefElement () const
TopologyId topologyId () const
TopologyId topologyId (integral_constant< bool, true >) const
unsigned int topologyId (integral_constant< bool, false >) const

Static Protected Member Functions

template<int dim>
static bool affine (TopologyId topologyId, integral_constant< int, dim >, CornerIterator &cit, JacobianTransposed &jt)
static bool affine (TopologyId topologyId, integral_constant< int, 0 >, CornerIterator &cit, JacobianTransposed &jt)
template<bool add, int dim>
static void global (TopologyId topologyId, integral_constant< int, dim >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
template<bool add>
static void global (TopologyId topologyId, integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, GlobalCoordinate &y)
template<bool add, int rows, int dim>
static void jacobianTransposed (TopologyId topologyId, 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>
static void jacobianTransposed (TopologyId topologyId, integral_constant< int, 0 >, CornerIterator &cit, const ctype &df, const LocalCoordinate &x, const ctype &rf, FieldMatrix< ctype, rows, cdim > &jt)

Protected Attributes

JacobianTransposed jacobianTransposed_
JacobianInverseTransposed jacobianInverseTransposed_

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

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::ctype Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::ctype
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::GlobalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::GlobalCoordinate
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef JacobianInverseTransposed Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::Jacobian
inherited

For backward-compatibility, export the type JacobianInverseTransposed as Jacobian.

Deprecated:
This typedef will be removed after the release of dune 2.3
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::JacobianInverseTransposed Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::JacobianTransposed Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianTransposed
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::LocalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::LocalCoordinate
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::MatrixHelper Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::MatrixHelper
protected
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Base::ReferenceElement Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::ReferenceElement
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef Dune::ReferenceElements< ctype, mydimension > Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::ReferenceElements
protectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
typedef conditional< hasSingleGeometryType, integral_constant< unsigned int, Traits::template hasSingleGeometryType< mydimension >::topologyId >, unsigned int >::type Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::TopologyId
protectedinherited

Constructor & Destructor Documentation

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
template<class CornerStorage >
Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::CachedMultiLinearGeometry ( const ReferenceElement refElement,
const CornerStorage &  cornerStorage 
)
inline
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

template<class ct , int mydim, int cdim, class Traits >
template<int dim>
bool Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( TopologyId  topologyId,
integral_constant< int, dim >  ,
CornerIterator &  cit,
JacobianTransposed jt 
)
inlinestaticprotectedinherited
template<class ct , int mydim, int cdim, class Traits >
bool Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( TopologyId  topologyId,
integral_constant< int, 0 >  ,
CornerIterator &  cit,
JacobianTransposed jt 
)
inlinestaticprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
bool Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::affine ( ) const
inline
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
GlobalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::center ( ) const
inline
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
GlobalCoordinate Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::corner ( int  i) const
inlineinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
int Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::corners ( ) const
inlineinherited
template<class ct , int mydim, int cdim, class Traits >
template<bool add, int dim>
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::global ( TopologyId  topologyId,
integral_constant< int, dim >  ,
CornerIterator &  cit,
const ctype df,
const LocalCoordinate x,
const ctype rf,
GlobalCoordinate y 
)
inlinestaticprotectedinherited
template<class ct , int mydim, int cdim, class Traits >
template<bool add>
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::global ( TopologyId  topologyId,
integral_constant< int, 0 >  ,
CornerIterator &  cit,
const ctype df,
const LocalCoordinate x,
const ctype rf,
GlobalCoordinate y 
)
inlinestaticprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
GlobalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::global ( const LocalCoordinate local) const
inline
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.

Reimplemented from Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >.

References Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::affine(), Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed::detInv(), Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::integrationElement(), Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianInverseTransposed_, Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed_, and Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::JacobianInverseTransposed::setupDeterminant().

Referenced by Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::volume().

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
const JacobianInverseTransposed& Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianInverseTransposed ( const LocalCoordinate local) const
inline
template<class ct , int mydim, int cdim, class Traits >
template<bool add, int rows, int dim>
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed ( TopologyId  topologyId,
integral_constant< int, dim >  ,
CornerIterator &  cit,
const ctype df,
const LocalCoordinate x,
const ctype rf,
FieldMatrix< ctype, rows, cdim > &  jt 
)
inlinestaticprotectedinherited
template<class ct , int mydim, int cdim, class Traits >
template<bool add, int rows>
void Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed ( TopologyId  topologyId,
integral_constant< int, 0 >  ,
CornerIterator &  cit,
const ctype df,
const LocalCoordinate x,
const ctype rf,
FieldMatrix< ctype, rows, cdim > &  jt 
)
inlinestaticprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
const 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.

Reimplemented from Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >.

References Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::affine(), Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed(), and Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed_.

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
LocalCoordinate Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::local ( const GlobalCoordinate global) const
inline
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
const ReferenceElement& Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::refElement ( ) const
inlineprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
TopologyId Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::topologyId ( ) const
inlineprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
TopologyId Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::topologyId ( integral_constant< bool, true >  ) const
inlineprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
unsigned int Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::topologyId ( integral_constant< bool, false >  ) const
inlineprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
Dune::GeometryType Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::type ( ) const
inlineinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
ctype Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::volume ( ) const
inline

Member Data Documentation

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

coordinate dimension

template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
JacobianInverseTransposed Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianInverseTransposed_
mutableprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
JacobianTransposed Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed_
mutableprotectedinherited
template<class ct , int mydim, int cdim, class Traits = MultiLinearGeometryTraits< ct >>
const int Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::mydimension = mydim
staticinherited

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