dune-grid
2.3beta2
|
Wrapper class for geometries. More...
#include <dune/grid/common/geometry.hh>
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... | |
typedef GridImp::ctype | ctype |
define type used for coordinates in grid module | |
typedef FieldVector< ctype, mydim > | LocalCoordinate |
type of local coordinates | |
typedef FieldVector< ctype, cdim > | GlobalCoordinate |
type of the global coordinates | |
typedef Implementation::JacobianInverseTransposed | JacobianInverseTransposed |
type of jacobian inverse transposed | |
typedef JacobianInverseTransposed | Jacobian |
typedef Implementation::JacobianTransposed | JacobianTransposed |
type of jacobian transposed |
Public Member Functions | |
GeometryType | type () const |
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement. | |
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 ![]() | |
LocalCoordinate | local (const GlobalCoordinate &global) const |
Evaluate the inverse map ![]() | |
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 JacobianTransposed & | jacobianTransposed (const LocalCoordinate &local) const |
Return the transposed of the Jacobian. | |
const JacobianInverseTransposed & | jacobianInverseTransposed (const LocalCoordinate &local) const |
Return inverse of transposed of Jacobian. | |
Geometry (const Implementation &impl) | |
copy constructor from implementation |
Protected Types | |
typedef GeometryImp< mydim, cdim, GridImp > | Implementation |
Protected Member Functions | |
const Implementation & | impl () const |
return reference to the implementation |
Protected Attributes | |
conditional< storeReference, const Implementation &, Implementation >::type | realGeometry |
Static Protected Attributes | |
static const bool | storeReference = FacadeOptions::StoreGeometryReference< mydim, cdim, GridImp, GeometryImp >::v |
Friends | |
class | GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld, typename GridImp::ctype, typename GridImp::GridFamily > |
Wrapper class for geometries.
mydim | Dimension of the domain |
cdim | Dimension of the range |
GridImp | Type that is a model of Dune::Grid |
GeometryImp | Class template that is a model of Dune::Geometry |
A Geometry defines a map
where and
. The domain
is one of a set of predefined convex polytopes, the so-called reference elements (
mydim
. In general The Geometry class template wraps an object of type GeometryImp and forwards all member function calls to corresponding members of this class. In that sense Geometry defines the interface and GeometryImp supplies the implementation.
The grid manager can instruct this facade class to either itself store an instance of the implementation class or keep a reference to an instance stored elsewhere as determined by FacadeOptions::StoreGeometryReference. In any case it is guaranteed that instances of Geometry are valid until the grid is changed (via any of adapt(), loadBalance() or globalRefine()).
typedef GridImp::ctype Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::ctype |
define type used for coordinates in grid module
typedef FieldVector< ctype, cdim > Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::GlobalCoordinate |
type of the global coordinates
|
protected |
typedef JacobianInverseTransposed Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::Jacobian |
typedef for backward compatibility
typedef Implementation::JacobianInverseTransposed Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::JacobianInverseTransposed |
type of jacobian inverse transposed
typedef Implementation::JacobianTransposed Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::JacobianTransposed |
type of jacobian transposed
typedef FieldVector<ctype, mydim> Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::LocalCoordinate |
type of local coordinates
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
|
inlineexplicit |
copy constructor from implementation
|
inline |
Return true if the geometry mapping is affine and false otherwise.
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
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.
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
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 calling
[in] | i | number of the corner (with respect to the reference element) |
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
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.
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
Evaluate the map .
[in] | local | Position in the reference element ![]() |
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
Referenced by Dune::HierarchicSearch< Grid, IS >::findEntity().
|
inlineprotected |
return reference to the implementation
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::realGeometry.
Referenced by Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::affine(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::center(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::corner(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::corners(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::global(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::integrationElement(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::jacobianInverseTransposed(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::jacobianTransposed(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::local(), Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::type(), and Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::volume().
|
inline |
Return the factor appearing in the integral transformation formula.
Let denote the transformation described by the Geometry. Then the jacobian of the transformation is defined as the
matrix
Here we abbreviated and
for ease of readability.
The integration element for any
is then defined as
[in] | local | Position ![]() |
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
Return inverse of transposed of Jacobian.
The Jacobian is defined in the documentation of integrationElement.
[in] | local | position ![]() |
The use of this function is to compute the gradient of some function at some position
, where
and
the transformation of the Geometry. When we set
and apply the chain rule we obtain
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
Return the transposed of the Jacobian.
The Jacobian is defined in the documentation of integrationElement.
[in] | local | position ![]() |
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
inline |
Evaluate the inverse map .
[in] | global | Position in ![]() |
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
Referenced by Dune::HierarchicSearch< Grid, IS >::findEntity().
|
inline |
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
Referenced by Dune::HierarchicSearch< Grid, IS >::findEntity().
|
inline |
return volume of geometry
References Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
friend |
|
protected |
Referenced by Dune::Geometry< mydim, cdim, GridImp, GeometryImp >::impl().
|
staticprotected |