#include <geometry.hh>
Defines the geometry part of a mesh entity. Works for all dimensions, element types and dim of world. Provides reference element and mapping between local and global coordinates.
mydim | dimension of the element (0 <= dim <= 3) | |
cdim | dimension of global coordinates | |
GridImp | grid implementation (always const AlbertaGrid< dim, dimworld >) |
Public Types | |
typedef Alberta::Real | ctype |
type of coordinates | |
Public Member Functions | |
AlbertaGridGeometry () | |
Default constructor. | |
GeometryType | type () const |
int | corners () const |
obtain the number of corners of this element | |
const GlobalVector & | operator[] (int i) const |
access to coordinates of corners. Index is the number of the corner | |
GlobalVector | global (const LocalVector &local) const |
LocalVector | local (const GlobalVector &global) const |
bool | checkInside (const LocalVector &local) const |
returns true if the point in local coordinates is inside reference element | |
ctype | integrationElement (const LocalVector &local) const |
const FieldMatrix< ctype, cdim, mydim > & | jacobianInverseTransposed (const LocalVector &local) const |
void | print (std::ostream &ss) const |
GeometryType Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::type | ( | ) | const [inline] |
return the element type identifier line , triangle or tetrahedron, depends on dim
AlbertaGridGeometry< mydim, cdim, GridImp >::GlobalVector Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::global | ( | const LocalVector & | local | ) | const [inline] |
maps a local coordinate within reference element to global coordinate in element
AlbertaGridGeometry< mydim, cdim, GridImp >::LocalVector Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::local | ( | const GlobalVector & | global | ) | const [inline] |
maps a global coordinate within the element to a local coordinate in its reference element
AlbertaGridGeometry< mydim, cdim, GridImp >::ctype Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::integrationElement | ( | const LocalVector & | local | ) | const [inline] |
Copy from sgrid.hh:
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:
where is the local to global mapping and
is the integration element.
For a general map involves partial derivatives of the map (surface element of the first kind if
, determinant of the Jacobian of the transformation for
,
for
).
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.
const FieldMatrix< Alberta::Real, cdim, mydim > & Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::jacobianInverseTransposed | ( | const LocalVector & | local | ) | const [inline] |
can only be called for dim=dimworld! Note that if both methods are called on the same element, then call jacobianInverseTransposed first because integration element is calculated during calculation of the transposed of the jacobianInverse
void Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::print | ( | std::ostream & | ss | ) | const [inline] |
print internal data no interface method
References Dune::AlbertaGridGeometry< mydim, cdim, GridImp >::corners().