Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits > Class Template Reference
[Generic Geometry Implementations]

caching implementation of a geometric mapping More...

#include <dune/grid/genericgeometry/cachedmapping.hh>

List of all members.

Classes

struct  Codim

Public Types

typedef MappingTraits
< typename
GeometryTraits::CoordTraits,
Topology::dimension,
GeometryTraits::dimWorld > 
Traits
typedef
GenericGeometry::Mapping
< typename
GeometryTraits::CoordTraits,
Topology,
GeometryTraits::dimWorld,
MappingImpl > 
Mapping
typedef Traits::FieldType FieldType
typedef Traits::LocalCoordinate LocalCoordinate
typedef Traits::GlobalCoordinate GlobalCoordinate
typedef CachedStorage
< dimension, GeometryTraits > 
Storage
typedef
CachedJacobianTransposed
< dimension, GeometryTraits > 
JacobianTransposed
typedef
CachedJacobianInverseTransposed
< dimension, GeometryTraits > 
JacobianInverseTransposed
typedef
GenericGeometry::ReferenceElement
< Topology, FieldType
ReferenceElement
typedef GeometryTraits::Caching Caching

Public Member Functions

template<class CoordVector >
 CachedMapping (const CoordVector &coords)
template<class CoordVector >
 CachedMapping (const std::pair< const CoordVector &, bool > &coords)
unsigned int topologyId () const
 obtain topology id of the corresponding reference element
const GlobalCoordinatecorner (int i) const
int numCorners () const
 obtain number of corners of the corresponding reference element
GlobalCoordinate center () const
 obtain the centroid of the mapping's image
bool affine () const
 is this mapping affine?
GlobalCoordinate global (const LocalCoordinate &x) const
 evaluate the mapping
LocalCoordinate local (const GlobalCoordinate &y) const
 evaluate the inverse mapping
const JacobianTransposedjacobianTransposed (const LocalCoordinate &x) const
 obtain the transposed of the Jacobian
FieldType integrationElement (const LocalCoordinate &x) const
 obtain the integration element
const JacobianInverseTransposedjacobianInverseTransposed (const LocalCoordinate &x) const
 obtain the transposed of the Jacobian's inverse
FieldType volume () const
 obtain the volume of the mapping's image
Thisclone () const
Thisclone (char *mappingStorage) const
template<unsigned int codim, bool hybrid>
TraceProvider< Topology,
GeometryTraits, codim, hybrid >
::Trace * 
trace (unsigned int i, char *mappingStorage) const

Static Public Member Functions

static bool checkInside (const LocalCoordinate &x)
 check whether a point lies within the reference element

Static Public Attributes

static const unsigned int dimension = Traits::dimension
static const unsigned int dimWorld = Traits::dimWorld
static const bool alwaysAffine = Mapping::alwaysAffine
 can we safely assume that this mapping is always affine?

Detailed Description

template<class Topology, class GeometryTraits>
class Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >

caching implementation of a geometric mapping

This is the first user-visible class of the generic geometry implementation and the last class that explicitly depends on the topology.

All functions required for a mapping (that should be used as a Geometry) are implemented. Moreover, a caching mechanism is added to speed up affine mappings.


Member Typedef Documentation

template<class Topology , class GeometryTraits >
typedef GeometryTraits::Caching Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Caching
template<class Topology , class GeometryTraits >
typedef Traits::FieldType Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::FieldType
template<class Topology , class GeometryTraits >
typedef Traits::GlobalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::GlobalCoordinate
template<class Topology , class GeometryTraits >
typedef CachedJacobianInverseTransposed< dimension, GeometryTraits > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::JacobianInverseTransposed
template<class Topology , class GeometryTraits >
typedef CachedJacobianTransposed< dimension, GeometryTraits > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::JacobianTransposed
template<class Topology , class GeometryTraits >
typedef Traits::LocalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::LocalCoordinate
template<class Topology , class GeometryTraits >
typedef GenericGeometry::Mapping< typename GeometryTraits::CoordTraits, Topology, GeometryTraits::dimWorld, MappingImpl > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Mapping
template<class Topology , class GeometryTraits >
typedef GenericGeometry::ReferenceElement< Topology, FieldType > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::ReferenceElement
template<class Topology , class GeometryTraits >
typedef CachedStorage< dimension, GeometryTraits > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Storage
template<class Topology , class GeometryTraits >
typedef MappingTraits< typename GeometryTraits::CoordTraits, Topology::dimension, GeometryTraits::dimWorld > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Traits

Constructor & Destructor Documentation

template<class Topology , class GeometryTraits >
template<class CoordVector >
Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::CachedMapping ( const CoordVector &  coords  )  [inline, explicit]
template<class Topology , class GeometryTraits >
template<class CoordVector >
Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::CachedMapping ( const std::pair< const CoordVector &, bool > &  coords  )  [inline, explicit]

Member Function Documentation

template<class Topology , class GeometryTraits >
GlobalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::center (  )  const [inline]

obtain the centroid of the mapping's image

Note:
Currently, this method is defined to return the image of the reference element's barycenter.

References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::global().

Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::center().

template<class Topology , class GeometryTraits >
static bool Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::checkInside ( const LocalCoordinate x  )  [inline, static]

check whether a point lies within the reference element

Parameters:
[in] x local coorinate of point to check
Note:
Historically, this method was part of the geometry interface. It is still required for the GenericReferenceElement.

References Dune::GenericGeometry::ReferenceElement< Topology, ctype >::checkInside().

Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::checkInside().

template<class Topology , class GeometryTraits >
This* Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::clone (  )  const [inline]
template<class Topology , class GeometryTraits >
This* Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::clone ( char *  mappingStorage  )  const [inline]
template<class Topology , class GeometryTraits >
FieldType Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::integrationElement ( const LocalCoordinate x  )  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] x local 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.

References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::alwaysAffine, Dune::GenericGeometry::CachedJacobianTransposed< dim, GeometryTraits >::det(), Dune::GenericGeometry::CachedStorage< dim, GeometryTraits >::integrationElement, Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed(), and Dune::GenericGeometry::PreCompute.

Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::integrationElement(), and Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::volume().

template<class Topology , class GeometryTraits >
int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::numCorners (  )  const [inline]
template<class Topology , class GeometryTraits >
unsigned int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::topologyId (  )  const [inline]
template<class Topology , class GeometryTraits >
template<unsigned int codim, bool hybrid>
TraceProvider< Topology, GeometryTraits, codim, hybrid >::Trace* Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::trace ( unsigned int  i,
char *  mappingStorage 
) const [inline]
template<class Topology , class GeometryTraits >
FieldType Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::volume (  )  const [inline]

obtain the volume of the mapping's image

Note:
The current implementation just returns which is wrong for n-linear surface maps and other nonlinear maps.

References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::integrationElement(), and Dune::GenericGeometry::ReferenceElement< Topology, ctype >::volume().

Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::volume().


Member Data Documentation

template<class Topology , class GeometryTraits >
const unsigned int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::dimension = Traits::dimension [static]
template<class Topology , class GeometryTraits >
const unsigned int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::dimWorld = Traits::dimWorld [static]

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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].