Dune Core Modules (2.3.1)
generic geometry implementation based on corner coordinates More...
#include <dune/geometry/multilineargeometry.hh>
Public Types | |
typedef ct | ctype |
coordinate type | |
typedef FieldVector< ctype, mydimension > | LocalCoordinate |
type of user data More... | |
typedef FieldVector< ctype, coorddimension > | GlobalCoordinate |
type of global coordinates | |
typedef FieldMatrix< ctype, mydimension, coorddimension > | JacobianTransposed |
type of jacobian transposed | |
typedef JacobianInverseTransposed | Jacobian |
For backward-compatibility, export the type JacobianInverseTransposed as Jacobian. More... | |
typedef Dune::ReferenceElement< ctype, mydimension > | ReferenceElement |
type of reference element | |
Public Member Functions | |
template<class Corners > | |
MultiLinearGeometry (const ReferenceElement &refElement, const Corners &corners) | |
constructor More... | |
template<class Corners > | |
MultiLinearGeometry (Dune::GeometryType gt, const Corners &corners) | |
constructor More... | |
bool | affine () const |
is this mapping affine? | |
Dune::GeometryType | type () const |
obtain the name of the reference element | |
int | corners () const |
obtain number of corners of the corresponding reference element | |
GlobalCoordinate | corner (int i) const |
obtain coordinates of the i-th corner | |
GlobalCoordinate | center () const |
obtain the centroid of the mapping's image | |
GlobalCoordinate | global (const LocalCoordinate &local) const |
evaluate the mapping More... | |
LocalCoordinate (const GlobalCoordinate &global) const | |
evaluate the inverse mapping More... | |
ctype | integrationElement (const LocalCoordinate &local) const |
obtain the integration element More... | |
ctype | volume () const |
obtain the volume of the mapping's image More... | |
const JacobianTransposed & | jacobianTransposed (const LocalCoordinate &local) const |
obtain the transposed of the Jacobian More... | |
const JacobianInverseTransposed & | jacobianInverseTransposed (const LocalCoordinate &local) const |
obtain the transposed of the Jacobian's inverse More... | |
Static Public Attributes | |
static const int | mydimension = mydim |
geometry dimension | |
static const int | coorddimension = cdim |
coordinate dimension | |
Detailed Description
class Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >
generic geometry implementation based on corner coordinates
Based on the recursive definition of the reference elements, the MultiLinearGeometry provides a generic implementation of a geometry given the corner coordinates.
The geometric mapping is multilinear in the classical sense only in the case of cubes; for simplices it is linear. The name is still justified, because the mapping satisfies the important property of begin linear along edges.
- Template Parameters
-
ct coordinate type mydim geometry dimension cdim coordinate dimension Traits traits allowing to tweak some implementation details (optional)
The requirements on the traits are documented along with their default, MultiLinearGeometryTraits.
As an additional feature, this class allows to attach arbitrary user data to each object. This is used in GeometryGrid to implement reference counting.
Member Typedef Documentation
◆ Jacobian
typedef JacobianInverseTransposed Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::Jacobian |
For backward-compatibility, export the type JacobianInverseTransposed as Jacobian.
- Deprecated:
- This typedef will be removed after the release of dune 2.3
◆ LocalCoordinate
typedef FieldVector< ctype, mydimension > Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::LocalCoordinate |
type of user data
For example, GeometryGrid uses this to implement reference counting. type of local coordinates
Constructor & Destructor Documentation
◆ MultiLinearGeometry() [1/2]
|
inline |
constructor
- Parameters
-
[in] refElement reference element for the geometry [in] corners corners to store internally
- Note
- The type of corners is actually a template argument. It is only required that the internal corner storage can be constructed from this object.
◆ MultiLinearGeometry() [2/2]
|
inline |
constructor
- Parameters
-
[in] gt geometry type [in] corners corners to store internally
- Note
- The type of corners is actually a template argument. It is only required that the internal corner storage can be constructed from this object.
Member Function Documentation
◆ global()
|
inline |
evaluate the mapping
- Parameters
-
[in] local local coordinate to map
- Returns
- corresponding global coordinate
Referenced by Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::center(), Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::global(), and Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::LocalCoordinate().
◆ integrationElement()
|
inline |
obtain the integration element
If the Jacobian of the mapping is denoted by $J(x)$, the integration integration element \(\mu(x)\) is given by
\[ \mu(x) = \sqrt{|\det (J^T(x) J(x))|}.\]
- Parameters
-
[in] local local coordinate to evaluate the integration element in
- Returns
- the integration element \(\mu(x)\).
- Note
- For affine mappings, it is more efficient to call jacobianInverseTransposed before integrationElement, if both are required.
References Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed().
Referenced by Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::integrationElement(), and Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::volume().
◆ jacobianInverseTransposed()
|
inline |
obtain the transposed of the Jacobian's inverse
The Jacobian's inverse is defined as a pseudo-inverse. If we denote the Jacobian by \(J(x)\), the following condition holds:
\[J^{-1}(x) J(x) = I.\]
Referenced by Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianInverseTransposed().
◆ jacobianTransposed()
|
inline |
obtain the transposed of the Jacobian
- Parameters
-
[in] local local coordinate to evaluate Jacobian in
- Returns
- a reference to the transposed of the Jacobian
- Note
- The returned reference is reused on the next call to JacobianTransposed, destroying the previous value.
Referenced by Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::integrationElement(), Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed(), and Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::LocalCoordinate().
◆ LocalCoordinate()
|
inline |
evaluate the inverse mapping
- Parameters
-
[in] global global coordinate to map
- Returns
- corresponding local coordinate
- Note
- For given global coordinate y the returned local coordinate x that minimizes the following function over the local coordinate space spanned by the reference element. (global( x ) - y).two_norm()GlobalCoordinate global(const LocalCoordinate &local) constevaluate the mappingDefinition: multilineargeometry.hh:260
References Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::global(), Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::jacobianTransposed(), Dune::ReferenceElement< ctype, dim >::position(), and Dune::DenseVector< V >::two_norm2().
◆ volume()
|
inline |
obtain the volume of the mapping's image
- Note
- The current implementation just returns which is wrong for n-linear surface maps and other nonlinear maps.integrationElement( refElement().position( 0, 0 ) ) * refElement().volume()ctype integrationElement(const LocalCoordinate &local) constobtain the integration elementDefinition: multilineargeometry.hh:309ctype volume() constobtain the volume of the reference elementDefinition: referenceelements.hh:280
References Dune::MultiLinearGeometry< ct, mydim, cdim, Traits >::integrationElement(), and Dune::ReferenceElement< ctype, dim >::volume().
Referenced by Dune::CachedMultiLinearGeometry< ct, mydim, cdim, Traits >::volume().
The documentation for this class was generated from the following file:
- dune/geometry/multilineargeometry.hh