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

#include <dune/grid/yaspgrid.hh>

Inheritance diagram for Dune::YaspSpecialGeometry< 0, cdim, GridImp >:
Inheritance graph

List of all members.

Public Types

enum  
 

export grid dimension

More...
enum  
 

export geometry dimension

More...
enum  
 

export coordinate dimension

More...
enum  
 

export dimension of world

More...
typedef FieldVector< ctype, mydim > LocalCoordinate
 type of local coordinates
typedef FieldVector< ctype, cdim > GlobalCoordinate
 type of the global coordinates
typedef FieldMatrix< ctype,
cdim, mydim > 
Jacobian
 type of jacobian (also of jacobian inverse transposed)
typedef FieldMatrix< ctype,
mydim, cdim > 
JacobianTransposed
 type of jacobian transposed

Public Member Functions

 YaspSpecialGeometry (const FieldVector< ctype, cdim > &p)
 YaspSpecialGeometry (const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &h, uint8_t &m)
 YaspSpecialGeometry ()
GeometryType type () const
 Return the name of the reference element. The type can be used to access the Dune::GenericReferenceElement.
bool affine () const
 Return true if the geometry mapping is affine and false otherwise.
int corners () const
 Return the number of corners of the reference element.
GlobalCoordinate corner (int i) const
 Obtain a corner of the geometry.
GlobalCoordinate global (const LocalCoordinate &local) const
 Evaluate the map $ g$.
LocalCoordinate local (const GlobalCoordinate &global) const
 Evaluate the inverse map $ g^{-1}$.
ctype integrationElement (const LocalCoordinate &local) const
 Return the factor appearing in the integral transformation formula.
ctype volume () const
 return volume of geometry
GlobalCoordinate center () const
 return center of geometry
const JacobianTransposedjacobianTransposed (const LocalCoordinate &local) const
 Return the transposed of the Jacobian.
const JacobianjacobianInverseTransposed (const LocalCoordinate &local) const
 Return inverse of transposed of Jacobian.

Protected Types

typedef YaspGeometry< mydim,
cdim, GridImp > 
ImplementationType

Protected Member Functions

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

Protected Attributes

YaspGeometry< mydim, cdim,
GridImp > 
realGeometry

Friends

class GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld, typename GridImp::ctype, typename GridImp::GridFamily >

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


Member Typedef Documentation

typedef FieldVector< ctype, cdim > Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::GlobalCoordinate [inherited]

type of the global coordinates

typedef YaspGeometry <mydim,cdim,GridImp> Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::ImplementationType [protected, inherited]
typedef FieldMatrix<ctype,cdim,mydim> Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::Jacobian [inherited]

type of jacobian (also of jacobian inverse transposed)

typedef FieldMatrix< ctype, mydim, cdim > Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::JacobianTransposed [inherited]

type of jacobian transposed

typedef FieldVector<ctype, mydim> Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::LocalCoordinate [inherited]

type of local coordinates


Member Enumeration Documentation

anonymous enum [inherited]

export grid dimension

anonymous enum [inherited]

export geometry dimension

anonymous enum [inherited]

export coordinate dimension

anonymous enum [inherited]

export dimension of world


Constructor & Destructor Documentation

template<int cdim, class GridImp >
Dune::YaspSpecialGeometry< 0, cdim, GridImp >::YaspSpecialGeometry ( const FieldVector< ctype, cdim > &  p  )  [inline]
template<int cdim, class GridImp >
Dune::YaspSpecialGeometry< 0, cdim, GridImp >::YaspSpecialGeometry ( const FieldVector< ctype, cdim > &  p,
const FieldVector< ctype, cdim > &  h,
uint8_t m 
) [inline]
template<int cdim, class GridImp >
Dune::YaspSpecialGeometry< 0, cdim, GridImp >::YaspSpecialGeometry (  )  [inline]

Member Function Documentation

bool Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::affine (  )  const [inline, inherited]

Return true if the geometry mapping is affine and false otherwise.

GlobalCoordinate Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::center (  )  const [inline, inherited]

return center of geometry

Note that this method is still subject to a change of name and semantics. At the moment, the center is not required to be the centroid of the geometry, or even the centroid of its corners. This makes the current default implementation acceptable, which maps the centroid of the reference element to the geometry. We may change the name (and semantic) of the method to centroid() if we find reasonably efficient ways to implement it properly.

GlobalCoordinate Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::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 )
Parameters:
[in] i number of the corner (with respect to the generic reference element)
Returns:
position of the i-th corner
int Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::corners (  )  const [inline, inherited]

Return the number of corners of the reference element.

Since a geometry 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 YaspGeometry <mydim,cdim,GridImp>& Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::getRealImp (  )  const [inline, protected, inherited]

return reference to the real implementation

YaspGeometry <mydim,cdim,GridImp>& Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::getRealImp (  )  [inline, protected, inherited]

return reference to the real implementation

GlobalCoordinate Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::global ( const LocalCoordinate local  )  const [inline, inherited]

Evaluate the map $ g$.

Parameters:
[in] local Position in the reference element $D$
Returns:
Position in $W$
ctype Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::integrationElement ( const LocalCoordinate 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}$.
const Jacobian& Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::jacobianInverseTransposed ( const LocalCoordinate local  )  const [inline, inherited]

Return inverse of transposed of Jacobian.

The Jacobian is defined in the documentation of 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)$, where $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 obtain

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

Note:
In the non-symmetric case $\textrm{cdim} \neq \textrm{mydim}$, the pseudoinverse of $J_g^T(x)$ is returned. This means that it is inverse for all tangential vectors in $g(x)$ while mapping all normal vectors to zero.
const JacobianTransposed& Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::jacobianTransposed ( const LocalCoordinate local  )  const [inline, inherited]

Return the transposed of the Jacobian.

The Jacobian is defined in the documentation of integrationElement.

Parameters:
[in] local position $x\in D$
Returns:
$J_g^T(x)$
LocalCoordinate Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::local ( const GlobalCoordinate global  )  const [inline, inherited]

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

Parameters:
[in] global Position in $W$
Returns:
Position in $D$ that maps to global
GeometryType Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::type (  )  const [inline, inherited]

Return the name of the reference element. The type can be used to access the Dune::GenericReferenceElement.

ctype Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::volume (  )  const [inline, inherited]

return volume of geometry


Friends And Related Function Documentation

friend class GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld,typename GridImp::ctype,typename GridImp::GridFamily > [friend, inherited]

Member Data Documentation

YaspGeometry <mydim,cdim,GridImp> Dune::Geometry< mydim, cdim, GridImp, YaspGeometry >::realGeometry [protected, inherited]

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].