- Home
- About DUNE
- Download
- Documentation
- Community
- Development
caching implementation of a geometric mapping More...
#include <dune/grid/genericgeometry/cachedmapping.hh>
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 GlobalCoordinate & | corner (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 JacobianTransposed & | jacobianTransposed (const LocalCoordinate &x) const |
obtain the transposed of the Jacobian | |
FieldType | integrationElement (const LocalCoordinate &x) const |
obtain the integration element | |
const JacobianInverseTransposed & | jacobianInverseTransposed (const LocalCoordinate &x) const |
obtain the transposed of the Jacobian's inverse | |
FieldType | volume () const |
obtain the volume of the mapping's image | |
This * | clone () const |
This * | clone (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? |
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.
typedef GeometryTraits::Caching Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Caching |
typedef Traits::FieldType Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::FieldType |
typedef Traits::GlobalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::GlobalCoordinate |
typedef CachedJacobianInverseTransposed< dimension, GeometryTraits > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::JacobianInverseTransposed |
typedef CachedJacobianTransposed< dimension, GeometryTraits > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::JacobianTransposed |
typedef Traits::LocalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::LocalCoordinate |
typedef GenericGeometry::Mapping< typename GeometryTraits::CoordTraits, Topology, GeometryTraits::dimWorld, MappingImpl > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Mapping |
typedef GenericGeometry::ReferenceElement< Topology, FieldType > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::ReferenceElement |
typedef CachedStorage< dimension, GeometryTraits > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Storage |
typedef MappingTraits< typename GeometryTraits::CoordTraits, Topology::dimension, GeometryTraits::dimWorld > Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::Traits |
Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::CachedMapping | ( | const CoordVector & | coords | ) | [inline, explicit] |
Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::CachedMapping | ( | const std::pair< const CoordVector &, bool > & | coords | ) | [inline, explicit] |
bool Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::affine | ( | ) | const [inline] |
is this mapping affine?
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::alwaysAffine.
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::affine(), and Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::local().
GlobalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::center | ( | ) | const [inline] |
obtain the centroid of the mapping's image
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::global().
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::center().
static bool Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::checkInside | ( | const LocalCoordinate & | x | ) | [inline, static] |
check whether a point lies within the reference element
[in] | x | local coorinate of point to check |
References Dune::GenericGeometry::ReferenceElement< Topology, ctype >::checkInside().
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::checkInside().
This* Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::clone | ( | ) | const [inline] |
This* Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::clone | ( | char * | mappingStorage | ) | const [inline] |
const GlobalCoordinate& Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::corner | ( | int | i | ) | const [inline] |
References Dune::GenericGeometry::Mapping< CoordTraits, Topo, dimW, Impl >::corner().
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::corner(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::global(), and Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::local().
GlobalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::global | ( | const LocalCoordinate & | x | ) | const [inline] |
evaluate the mapping
[in] | x | local coordinate to map |
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::corner(), Dune::GenericGeometry::Mapping< CoordTraits, Topo, dimW, Impl >::global(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed(), and Dune::GenericGeometry::CachedJacobianTransposed< dim, GeometryTraits >::umtv().
Referenced by Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::center(), and Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::global().
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 is given by
[in] | x | local coordinate to evaluate the integration element in |
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().
const JacobianInverseTransposed& Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianInverseTransposed | ( | const LocalCoordinate & | x | ) | 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 , the following condition holds:
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::alwaysAffine, Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianInverseTransposed(), and Dune::GenericGeometry::PreCompute.
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::jacobianInverseTransposed(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianInverseTransposed(), and Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::local().
const JacobianTransposed& Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed | ( | const LocalCoordinate & | x | ) | const [inline] |
obtain the transposed of the Jacobian
[in] | x | local coordinate to evaluate Jacobian in |
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::alwaysAffine, Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed(), and Dune::GenericGeometry::PreCompute.
Referenced by Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::global(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::integrationElement(), Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::jacobianTransposed(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed(), and Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::local().
LocalCoordinate Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::local | ( | const GlobalCoordinate & | y | ) | const [inline] |
evaluate the inverse mapping
[in] | y | global coorindate to map |
(global( x ) - y).two_norm()
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::affine(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::corner(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianInverseTransposed(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed(), Dune::GenericGeometry::Mapping< CoordTraits, Topo, dimW, Impl >::local(), and Dune::GenericGeometry::CachedJacobianInverseTransposed< dim, GeometryTraits >::mtv().
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::local().
int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::numCorners | ( | ) | const [inline] |
obtain number of corners of the corresponding reference element
References Dune::GenericGeometry::ReferenceElement< Topology, ctype >::numCorners.
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::numCorners().
unsigned int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::topologyId | ( | ) | const [inline] |
obtain topology id of the corresponding reference element
References Dune::GenericGeometry::ReferenceElement< Topology, ctype >::topologyId.
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::topologyId().
TraceProvider< Topology, GeometryTraits, codim, hybrid >::Trace* Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::trace | ( | unsigned int | i, | |
char * | mappingStorage | |||
) | const [inline] |
FieldType Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::volume | ( | ) | const [inline] |
obtain the volume of the mapping's image
integrationElement( baryCenter() ) * ReferenceElement::volume()
References Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::integrationElement(), and Dune::GenericGeometry::ReferenceElement< Topology, ctype >::volume().
Referenced by Dune::GenericGeometry::VirtualMapping< Topology, GeometryTraits >::volume().
const bool Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::alwaysAffine = Mapping::alwaysAffine [static] |
can we safely assume that this mapping is always affine?
Referenced by Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::affine(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::CachedMapping(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::integrationElement(), Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianInverseTransposed(), and Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::jacobianTransposed().
const unsigned int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::dimension = Traits::dimension [static] |
const unsigned int Dune::GenericGeometry::CachedMapping< Topology, GeometryTraits >::dimWorld = Traits::dimWorld [static] |
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].