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

#include <yaspgrid.hh>

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

Dune::Geometry< mydim, cdim, GridImp, YaspGeometry > 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  
 export grid dimension
enum  
 export geometry dimension
enum  
 export coordinate dimension
enum  
 export dimension of world

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< ct, cdim > & operator[] (int i) const
 Access to corners of the geometry.
FieldVector< ct, cdim > global (const FieldVector< ct, mydim > &local) const
 Evaluate the map $ g$.
FieldVector< ct, mydim > local (const FieldVector< ct, cdim > &global) const
 Evaluate the inverse map $ g^{-1}$.
bool checkInside (const FieldVector< ct, mydim > &local) const
 Return true if the point is in the reference element $D$ of the map.
ct integrationElement (const FieldVector< ct, mydim > &local) const
 Return the factor appearing in the integral transformation formula.
ct volume () const
 return volume of geometry
const FieldMatrix< ct, mydim,
mydim > & 
jacobianInverseTransposed (const FieldVector< ct, mydim > &local) const
 Return inverse of transposed of Jacobian.

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

Member Function Documentation

const FieldVector<ct, cdim>& Dune::Geometry< mydim, cdim, GridImp , YaspGeometry >::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.

FieldVector<ct, cdim> Dune::Geometry< mydim, cdim, GridImp , YaspGeometry >::global ( const FieldVector< ct, mydim > &  local  )  const [inline, inherited]

Evaluate the map $ g$.

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

FieldVector<ct, mydim> Dune::Geometry< mydim, cdim, GridImp , YaspGeometry >::local ( const FieldVector< ct, 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

ct Dune::Geometry< mydim, cdim, GridImp , YaspGeometry >::integrationElement ( const FieldVector< ct, 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}$.

const FieldMatrix<ct,mydim,mydim>& Dune::Geometry< mydim, cdim, GridImp , YaspGeometry >::jacobianInverseTransposed ( const FieldVector< ct, 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 9 Apr 2008 with Doxygen (ver 1.5.2) [logfile].