dune-grid  2.1.1
Public Types | Public Member Functions | Static Public Attributes | Protected Types
Dune::MockGeometry< ctype, mydim, coorddim > Class Template Reference

Grid-independent geometry. More...

#include <dune/grid/utility/mockgeometry.hh>

Inheritance diagram for Dune::MockGeometry< ctype, mydim, coorddim >:
Inheritance graph

List of all members.

Public Types

typedef FieldMatrix< ctype,
coorddim, mydim > 
Jacobian
 type of jacobian (also of jacobian inverse transposed)
typedef FieldMatrix< ctype,
mydim, coorddim > 
JacobianTransposed
 type of jacobian transposed
typedef CoordTraits::ctype ctype
 Type used for coordinate components.
typedef FieldVector< ctype,
mydimension
LocalCoordinate
 Type used for parameter coordinates.
typedef FieldVector< ctype,
coorddimension
GlobalCoordinate
 Type used for world coordinates.

Public Member Functions

 MockGeometry ()
 Default constructor.
template<class CoordVector >
 MockGeometry (const GeometryType &type, const CoordVector &coords)
 Constructor using a GeometryType and a list of corner coordinates.
template<int fatherdim>
 MockGeometry (const MockGeometry< ctype, fatherdim, coorddim > &father, int i)
 obtain a geometry for a subentity
JacobianTransposed jacobianTransposed (const typename Base::LocalCoordinate &local) const
 Return the transposed of the Jacobian.
Jacobian jacobianInverseTransposed (const typename Base::LocalCoordinate &local) const
 Return inverse of transposed of Jacobian.
bool operator! () const
 Test whether this BasicGeometry is properly set up.
GeometryType type () const
 Return the topological type of this geometry.
int corners () const
 Return the number of corners.
const GlobalCoordinateoperator[] (int i) const
 Return the world coordinates of the i-th corner.
GlobalCoordinate corner (const int i) const
 Return the world coordinates of the i-th corner.
GlobalCoordinate global (const LocalCoordinate &local) const
 Map local to global coordinates.
LocalCoordinate local (const GlobalCoordinate &global) const
 Map global to local coordinates.
GlobalCoordinate center () const
 return center of element
bool affine () const
 Return true if this is an affine geometry.
ctype integrationElement (const LocalCoordinate &local) const
 Return the factor $|det F|$ that appears in the integral transformation formula.
ctype volume () const
 Return the volume of the element.
const JacobianTransposedjacobianTransposed (const LocalCoordinate &local) const
 Compute the transpose of the Jacobian matrix of the transformation from the reference element into the world space.
const JacobianInverseTransposedjacobianInverseTransposed (const LocalCoordinate &local) const
 Compute the transpose of the inverse Jacobian matrix of the transformation from the reference element into the world space.
GlobalCoordinate normal (int face, const LocalCoordinate &local) const
 compute an outer normal to an element face

Static Public Attributes

static const int mydimension
 The dimension of the parameter space of this geometry.
static const int coorddimension
 The dimension of the world space of this geometry.

Protected Types

typedef MappingProvider::Mapping Mapping

Detailed Description

template<class ctype, std::size_t mydim, std::size_t coorddim>
class Dune::MockGeometry< ctype, mydim, coorddim >

Grid-independent geometry.

This geometry can be used when somewhing mostly like a Dune::Geometry is required, but a full grid is a little bit too much. It provides the full interface of Dune::Geometry, except for the grid-specific member constants dimension and dimensionworld.

One further difference is that the jacobian methods return by value instead of by reference. The Jacobian depends on the local coordinate; returning it by reference is asking for trouble.

Template Parameters:
ctypeField type for coordinates.
mydimDimension of the local coordinates.
coorddimDimension of the global coordinates.

Member Typedef Documentation

Type used for coordinate components.

typedef FieldVector< ctype, coorddimension > Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::GlobalCoordinate [inherited]

Type used for world coordinates.

template<class ctype, std::size_t mydim, std::size_t coorddim>
typedef FieldMatrix<ctype, coorddim, mydim> Dune::MockGeometry< ctype, mydim, coorddim >::Jacobian

type of jacobian (also of jacobian inverse transposed)

template<class ctype, std::size_t mydim, std::size_t coorddim>
typedef FieldMatrix<ctype, mydim, coorddim> Dune::MockGeometry< ctype, mydim, coorddim >::JacobianTransposed
typedef FieldVector< ctype, mydimension > Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::LocalCoordinate [inherited]

Type used for parameter coordinates.

typedef MappingProvider::Mapping Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::Mapping [protected, inherited]

Constructor & Destructor Documentation

template<class ctype, std::size_t mydim, std::size_t coorddim>
Dune::MockGeometry< ctype, mydim, coorddim >::MockGeometry ( ) [inline]

Default constructor.

template<class ctype, std::size_t mydim, std::size_t coorddim>
template<class CoordVector >
Dune::MockGeometry< ctype, mydim, coorddim >::MockGeometry ( const GeometryType &  type,
const CoordVector &  coords 
) [inline]

Constructor using a GeometryType and a list of corner coordinates.

template<class ctype, std::size_t mydim, std::size_t coorddim>
template<int fatherdim>
Dune::MockGeometry< ctype, mydim, coorddim >::MockGeometry ( const MockGeometry< ctype, fatherdim, coorddim > &  father,
int  i 
) [inline]

obtain a geometry for a subentity


Member Function Documentation

bool Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::affine ( ) const [inline, inherited]

Return true if this is an affine geometry.

GlobalCoordinate Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::center ( ) const [inline, inherited]

return center of element

GlobalCoordinate Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::corner ( const int  i) const [inline, inherited]

Return the world coordinates of the i-th corner.

int Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::corners ( ) const [inline, inherited]

Return the number of corners.

GlobalCoordinate Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::global ( const LocalCoordinate local) const [inline, inherited]

Map local to global coordinates.

ctype Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::integrationElement ( const LocalCoordinate local) const [inline, inherited]

Return the factor $|det F|$ that appears in the integral transformation formula.

template<class ctype, std::size_t mydim, std::size_t coorddim>
Jacobian Dune::MockGeometry< ctype, mydim, coorddim >::jacobianInverseTransposed ( const typename Base::LocalCoordinate local) const [inline]

Return inverse of transposed of Jacobian.

References Dune::GenericGeometry::BasicGeometry< mydim, Traits >::jacobianInverseTransposed().

Compute the transpose of the inverse Jacobian matrix of the transformation from the reference element into the world space.

template<class ctype, std::size_t mydim, std::size_t coorddim>
JacobianTransposed Dune::MockGeometry< ctype, mydim, coorddim >::jacobianTransposed ( const typename Base::LocalCoordinate local) const [inline]

Return the transposed of the Jacobian.

References Dune::GenericGeometry::BasicGeometry< mydim, Traits >::jacobianTransposed().

const JacobianTransposed& Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::jacobianTransposed ( const LocalCoordinate local) const [inline, inherited]

Compute the transpose of the Jacobian matrix of the transformation from the reference element into the world space.

LocalCoordinate Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::local ( const GlobalCoordinate global) const [inline, inherited]

Map global to local coordinates.

GlobalCoordinate Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::normal ( int  face,
const LocalCoordinate local 
) const [inline, inherited]

compute an outer normal to an element face

Parameters:
[in]facenumber of the face (in generic numbering)
[in]localpoint to compute the normal in (in local coordinates with respect to the element, *not* the face)
Returns:
an outer normal to the given face at the given point
Note:
Though the local coordinates are given with respect to geometry's reference domain, the point is required to be on the given face.
Deprecated:

References Dune::GenericGeometry::BasicGeometry< mydim, Traits >::integrationElement(), Dune::GenericGeometry::BasicGeometry< mydim, Traits >::jacobianInverseTransposed(), Dune::GenericGeometry::BasicGeometry< mydim, Traits >::local(), Dune::GenericGeometry::BasicGeometry< mydim, Traits >::normal(), Dune::GenericReferenceElement< ctype, dim >::size(), Dune::GenericGeometry::BasicGeometry< mydim, Traits >::type(), and Dune::GenericReferenceElement< ctype, dim >::volumeOuterNormal().

bool Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::operator! ( ) const [inline, inherited]

Test whether this BasicGeometry is properly set up.

Todo:
Please doc me better!
const GlobalCoordinate& Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::operator[] ( int  i) const [inline, inherited]

Return the world coordinates of the i-th corner.

GeometryType Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::type ( ) const [inline, inherited]

Return the topological type of this geometry.

References Dune::GenericGeometry::BasicGeometry< mydim, Traits >::mydimension.

ctype Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::volume ( ) const [inline, inherited]

Return the volume of the element.


Member Data Documentation

const int Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::coorddimension [static, inherited]

The dimension of the world space of this geometry.

const int Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::mydimension [static, inherited]

The dimension of the parameter space of this geometry.


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