Dune::YaspSpecialGeometry< mydim, cdim, GridImp > Class Template Reference

#include <yaspgrid.hh>

Inheritance diagram for Dune::YaspSpecialGeometry< mydim, cdim, GridImp >:

Dune::Geometry< mydim, cdim, GridImp, GeometryImp >

List of all members.


Detailed Description

template<int mydim, int cdim, class GridImp>
class Dune::YaspSpecialGeometry< mydim, cdim, GridImp >

YaspGeometry realizes the concept of the geometric part of a mesh entity.

We have specializations for dim==dimworld (elements), dim = dimworld-1 (faces) and dim=0 (vertices). The general version throws a GridError on construction.

Public Types

enum  { dimension = GridImp::dimension }
 export grid dimension More...
enum  { mydimension = mydim }
 export geometry dimension More...
enum  { coorddimension = cdim }
 export coordinate dimension More...
enum  { dimensionworld = GridImp::dimensionworld }
 export dimension of world More...

Public Member Functions

GeometryType type () const
 Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
int corners () const
 Return the number of corners of the reference element. Since this is a convex polytope the number of corners is a well-defined concept. The method is redundant because this information is also available via the reference element. It is here for efficiency and ease of use.
const FieldVector< ctype, cdim > & operator[] (int i) const
 Access to corners of the geometry.
FieldVector< ctype, cdim > corner (int i) const
FieldVector< ctype, cdim > global (const FieldVector< ctype, mydim > &local) const
 Evaluate the map $ g$.
FieldVector< ctype, mydim > local (const FieldVector< ctype, cdim > &global) const
 Evaluate the inverse map $ g^{-1}$.
bool checkInside (const FieldVector< ctype, mydim > &local) const
 Return true if the point is in the reference element $D$ of the map.
ctype integrationElement (const FieldVector< ctype, mydim > &local) const
 Return the factor appearing in the integral transformation formula.
ctype volume () const
 return volume of geometry
const FieldMatrix< ctype, cdim,
mydim > & 
jacobianInverseTransposed (const FieldVector< ctype, mydim > &local) const
 Return inverse of transposed of Jacobian.

Protected Member Functions

GeometryImp< mydim, cdim,
GridImp > & 
getRealImp ()
 return reference to the real implementation
const GeometryImp< mydim, cdim,
GridImp > & 
getRealImp () const
 return reference to the real implementation


Member Enumeration Documentation

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
anonymous enum [inherited]

export grid dimension

Enumerator:
dimension  grid dimension

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
anonymous enum [inherited]

export geometry dimension

Enumerator:
mydimension  geometry dimension

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
anonymous enum [inherited]

export coordinate dimension

Enumerator:
coorddimension  dimension of embedding coordsystem

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
anonymous enum [inherited]

export dimension of world

Enumerator:
dimensionworld  dimension of world


Member Function Documentation

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
const FieldVector< ctype, cdim >& Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::operator[] ( int  i  )  const [inline, inherited]

Access to corners of the geometry.

Parameters:
[in] i The number of the corner
Returns:
const reference to a vector containing the position $g(c_i)$ where $c_i$ is the position of the i'th corner of the reference element.
Deprecated:

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
FieldVector< ctype, cdim > Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::corner ( int  i  )  const [inline, inherited]

Obtain a corner of the geometry

This method is for convenient access to the corners of the geometry. The same result could be achieved by by calling

  global( genericReferenceElement.position( i, mydimension )

Note:
This method replaces the deprecated operator[]. Yet, there are two differences:
  • operator[] returns a reference instead of an object
  • operator[] uses the old sub entity numbering
Parameters:
[in] i number of the corner (with respect to the generic reference element)
Returns:
position of the i'th corner

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
FieldVector<ctype, cdim> Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::global ( const FieldVector< ctype, mydim > &  local  )  const [inline, inherited]

Evaluate the map $ g$.

Parameters:
[in] local Position in the reference element $D$
Returns:
Position in $W$

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
FieldVector<ctype, mydim> Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::local ( const FieldVector< ctype, cdim > &  global  )  const [inline, inherited]

Evaluate the inverse map $ g^{-1}$.

Parameters:
[in] global Position in $W$
Returns:
Position in $D$ that maps to global

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
ctype Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::integrationElement ( const FieldVector< ctype, mydim > &  local  )  const [inline, inherited]

Return the factor appearing in the integral transformation formula.

Let $ g : D \to W$ denote the transformation described by the Geometry. Then the jacobian of the transformation is defined as the $\textrm{cdim}\times\textrm{mydim}$ matrix

\[ J_g(x) = \left( \begin{array}{ccc} \frac{\partial g_0}{\partial x_0} & \cdots & \frac{\partial g_0}{\partial x_{n-1}} \\ \vdots & \ddots & \vdots \\ \frac{\partial g_{m-1}}{\partial x_0} & \cdots & \frac{\partial g_{m-1}}{\partial x_{n-1}} \end{array} \right).\]

Here we abbreviated $m=\textrm{cdim}$ and $n=\textrm{mydim}$ for ease of readability.

The integration element $\mu(x)$ for any $x\in D$ is then defined as

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

Parameters:
[in] local Position $x\in D$
Returns:
integration element $\mu(x)$
Note:
Each implementation computes the integration element with optimal efficieny. For example in an equidistant structured mesh it may be as simple as $h^\textrm{mydim}$.

template<int mydim, int cdim, class GridImp, template< int, int, class > class GeometryImp>
const FieldMatrix<ctype,cdim,mydim>& Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::jacobianInverseTransposed ( const FieldVector< ctype, mydim > &  local  )  const [inline, inherited]

Return inverse of transposed of Jacobian.

The jacobian is defined in the documentation of Dune::Geometry::integrationElement().

Parameters:
[in] local Position $x\in D$
Returns:
$J_g^{-T}(x)$
The use of this function is to compute the gradient of some function $ f : W \to \textbf{R} $ at some position $y=g(x)$ with $x\in D$ and $g$ the transformation of the Geometry. When we set $\hat{f}(x) = f(g(x))$ and apply the chain rule we get

\[\nabla f (g(x)) = J_g^{-T}(x) \nabla \hat{f}(x). \]

Note:
This function may only be called in the case $\textrm{cdim}=\textrm{mydim}$ because otherwise the inverse is not defined.


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

Generated on Tue Jul 28 22:28:47 2009 for dune-grid by  doxygen 1.5.6