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

specialization for dim=0, this is a vertex More...

#include <dune/grid/sgrid.hh>

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

List of all members.

Public Types

typedef GridImp::ctype ctype
 define type used for coordinates in grid module

Public Member Functions

GeometryType type () const
 return the element type identifier
bool affine () const
 here we have always an affine geometry
int corners () const
 return the number of corners of this element. Corners are numbered 0...n-1
FieldVector< ctype, cdim > corner (const int i) const
 return i'th corner of the geometry
FieldVector< ctype, cdim > center () const
 return center of the geometry
void print (std::ostream &ss, int indent) const
 print internal data
void make (FieldMatrix< ctype, 1, cdim > &__As)
 constructor, makes element from position and direction vectors
FieldVector< ctype, cdim > global (const FieldVector< ctype, 0 > &local) const
 maps a local coordinate within reference element to global coordinate in element
FieldVector< ctype, 0 > local (const FieldVector< ctype, cdim > &global) const
 maps a global coordinate within the element to a local coordinate in its reference element
 SGeometry ()
 constructor with bool argument makes reference element if true, uninitialized else
ctype volume () const
 This dummy routine always returns 1.0.
ctype integrationElement (const FieldVector< ctype, 0 > &local) const
 This dummy routine always returns 1.0.
const FieldMatrix< ctype,
0, cdim > & 
jacobianTransposed (const FieldVector< ctype, 0 > &local) const
const FieldMatrix< ctype, cdim, 0 > & jacobianInverseTransposed (const FieldVector< ctype, 0 > &local) const

Protected Attributes

FieldVector< ctype, cdim > s
 position of element

Detailed Description

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

specialization for dim=0, this is a vertex


Member Typedef Documentation

template<int cdim, class GridImp >
typedef GridImp::ctype Dune::SGeometry< 0, cdim, GridImp >::ctype

define type used for coordinates in grid module

Reimplemented from Dune::GeometryDefaultImplementation< 0, cdim, GridImp, SGeometry >.


Constructor & Destructor Documentation

template<int cdim, class GridImp >
Dune::SGeometry< 0, cdim, GridImp >::SGeometry (  )  [inline]

constructor with bool argument makes reference element if true, uninitialized else

Integration over a general element is done by integrating over the reference element and using the transformation from the reference element to the global element as follows:

\[\int\limits_{\Omega_e} f(x) dx = \int\limits_{\Omega_{ref}} f(g(l)) A(l) dl \]

where $g$ is the local to global mapping and $A(l)$ is the integration element.

For a general map $g(l)$ involves partial derivatives of the map (surface element of the first kind if $d=2,w=3$, determinant of the Jacobian of the transformation for $d=w$, $\|dg/dl\|$ for $d=1$).

For linear elements, the derivatives of the map with respect to local coordinates do not depend on the local coordinates and are the same over the whole element.

For a structured mesh where all edges are parallel to the coordinate axes, the computation is the length, area or volume of the element is very simple to compute.

Each grid module implements the integration element with optimal efficieny. This will directly translate in substantial savings in the computation of finite element stiffness matrices. For this specialisation the integrationElement is always 1.


Member Function Documentation

template<int cdim, class GridImp >
bool Dune::SGeometry< 0, cdim, GridImp >::affine (  )  const [inline]

here we have always an affine geometry

template<int cdim, class GridImp >
FieldVector<ctype, cdim > Dune::SGeometry< 0, cdim, GridImp >::center (  )  const [inline]

return center of the geometry

Reimplemented from Dune::GeometryDefaultImplementation< 0, cdim, GridImp, SGeometry >.

template<int cdim, class GridImp >
FieldVector<ctype, cdim > Dune::SGeometry< 0, cdim, GridImp >::corner ( const int  i  )  const [inline]

return i'th corner of the geometry

template<int cdim, class GridImp >
int Dune::SGeometry< 0, cdim, GridImp >::corners (  )  const [inline]

return the number of corners of this element. Corners are numbered 0...n-1

template<int cdim, class GridImp >
FieldVector<ctype, cdim> Dune::SGeometry< 0, cdim, GridImp >::global ( const FieldVector< ctype, 0 > &  local  )  const [inline]

maps a local coordinate within reference element to global coordinate in element

References Dune::SGeometry< mydim, cdim, GridImp >::corner().

template<int cdim, class GridImp >
ctype Dune::SGeometry< 0, cdim, GridImp >::integrationElement ( const FieldVector< ctype, 0 > &  local  )  const [inline]

This dummy routine always returns 1.0.

This routine exists so that algorithms that integrate over grid boundaries can also be compiled for 1d-grids.

References Dune::SGeometry< mydim, cdim, GridImp >::volume().

template<int cdim, class GridImp >
const FieldMatrix<ctype,cdim,0>& Dune::SGeometry< 0, cdim, GridImp >::jacobianInverseTransposed ( const FieldVector< ctype, 0 > &  local  )  const [inline]
template<int cdim, class GridImp >
const FieldMatrix<ctype, 0, cdim >& Dune::SGeometry< 0, cdim, GridImp >::jacobianTransposed ( const FieldVector< ctype, 0 > &  local  )  const [inline]
template<int cdim, class GridImp >
FieldVector<ctype, 0> Dune::SGeometry< 0, cdim, GridImp >::local ( const FieldVector< ctype, cdim > &  global  )  const [inline]

maps a global coordinate within the element to a local coordinate in its reference element

template<int cdim, class GridImp >
void Dune::SGeometry< 0, cdim, GridImp >::make ( FieldMatrix< ctype, 1, cdim > &  __As  ) 

constructor, makes element from position and direction vectors

template<int cdim, class GridImp >
void Dune::SGeometry< 0, cdim, GridImp >::print ( std::ostream &  ss,
int  indent 
) const

print internal data

template<int cdim, class GridImp >
GeometryType Dune::SGeometry< 0, cdim, GridImp >::type (  )  const [inline]

return the element type identifier

template<int cdim, class GridImp >
ctype Dune::SGeometry< 0, cdim, GridImp >::volume (  )  const [inline]

This dummy routine always returns 1.0.

This routine exists so that algorithms that integrate over grid boundaries can also be compiled for 1d-grids.

Reimplemented from Dune::GeometryDefaultImplementation< 0, cdim, GridImp, SGeometry >.


Member Data Documentation

template<int cdim, class GridImp >
FieldVector<ctype, cdim> Dune::SGeometry< 0, cdim, GridImp >::s [protected]

position of element


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