Loading...
Searching...
No Matches
Dune::MappedGeometry< Map, Geo > Class Template Reference

Geometry parametrized by a LocalFunction and a LocalGeometry. More...

`#include <dune/geometry/mappedgeometry.hh>`

## Public Types

using | LocalCoordinate = typename Geo::LocalCoordinate
| type of local coordinates
using | GlobalCoordinate = std::remove_reference_t<decltype(std::declval<Map>()(std::declval<typename Geo::GlobalCoordinate>()))>
| type of global coordinates
using | ctype = typename Geo::ctype
| coordinate type
using | Volume = std::remove_reference_t<decltype(Dune::power(std::declval<ctype>(),mydimension))>
| type of volume
using | Jacobian = FieldMatrix<ctype, coorddimension, mydimension>
| type of jacobian
using | JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>
| type of jacobian transposed
using | JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>
| type of jacobian inverse
using | JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>
| type of jacobian inverse transposed

## Public Member Functions

template<class Geo_, class Map_, std::enable_if_t< Dune::IsInteroperable< Map, Map_ >::value, int > = 0, std::enable_if_t< Dune::IsInteroperable< Geo, Geo_ >::value, int > = 0>
| MappedGeometry (Map_ &&mapping, Geo_ &&geometry, bool affine=false)
| Constructor from mapping to parametrize the geometry.
bool | affine () const
| Is this mapping affine? Not in general, since we don't know anything about the mapping. The returned value can be given in the constructor of the class.
GeometryType | type () const
| Obtain the geometry type from 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
| Map the center of the wrapped geometry.
GlobalCoordinate | global (const LocalCoordinate &local) const
| Evaluate the coordinate mapping.
LocalCoordinate | local (const GlobalCoordinate &y, Impl::GaussNewtonOptions< ctype > opts={}) const
| Evaluate the inverse coordinate mapping.
ctype | integrationElement (const LocalCoordinate &local) const
| Obtain the integration element.
Volume | volume (Impl::ConvergenceOptions< ctype > opts={}) const
| Obtain the volume of the mapping's image.
Volume | volume (const QuadratureRule< ctype, mydimension > &quadRule) const
| Obtain the volume of the mapping's image by given quadrature rules.
Jacobian | jacobian (const LocalCoordinate &local) const
| Obtain the Jacobian.
JacobianTransposed | jacobianTransposed (const LocalCoordinate &local) const
| Obtain the transposed of the Jacobian.
JacobianInverse | jacobianInverse (const LocalCoordinate &local) const
| Obtain the Jacobian's inverse.
JacobianInverseTransposed | jacobianInverseTransposed (const LocalCoordinate &local) const
| Obtain the transposed of the Jacobian's inverse.

## Static Public Attributes

static constexpr int | mydimension = LocalCoordinate::size()
| geometry dimension
static constexpr int | coorddimension = GlobalCoordinate::size()
| coordinate dimension

## Protected Types

using | MatrixHelper = Impl::FieldMatrixHelper<ctype>
using | Mapping = Map
using | Geometry = Geo
using | DerivativeMapping = std::remove_reference_t<decltype(derivative(std::declval<Map>()))>

## Protected Member Functions

ReferenceElement | refElement () const

## Friends

ReferenceElement | referenceElement (const MappedGeometry &geometry)
| Obtain the reference-element related to this geometry.

## Detailed Description

template<class Map, class Geo>
class Dune::MappedGeometry< Map, Geo >

Geometry parametrized by a LocalFunction and a LocalGeometry.

This class represents a geometry that is parametrized by the chained mapping of a geometry g of type Geo and the given (differentiable) function f of type Map as f o g.

The geometry g: LG -> GG maps points from the local domain LG to its global domain GG. It must fulfill the dune-grid geometry-concept. Examples are the geometry of a grid element, the geometry of a `ReferenceElement` or any other geometry implementation in dune-geometry. The local domain LG represents the local coordinates of the MappedGeometry.

The function f: LF -> GF is a differentiable function in the sense of the dune-functions concept. It maps coordinates from the global domain of the geometry, LF=GG into the range type GF representing the global coordinates of the MappedGeometry.

Requirements: Let local be of type LG, g of type Geo and f of type Map.

- g must be a model of Concept::Geometry
- f must be a model of Concept::DifferentiableFunction<GF(LF)>

The following expressions must be valid:

- GG gg = g.global(local): the "evaluation" of the geometry in its local domain.
- GF gf = f(gg): the evaluation of the mapping f in its local domain that is the geometries' range.
- auto df = derivative(f), df(gg): The derivative of f w.r.t. its global coordinate GF evaluated at its local coordinated LF=GG.

Template Parameters

  Map | Differentiable mapping f: LF -> GF with LF = GG the range of the geometry g.
  Geo | A geometry type g: LG -> GG fulfilling the concept Concept::Geometry.

## Member Typedef Documentation

## ctype

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::ctype = typename Geo::ctype

coordinate type

## DerivativeMapping

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::DerivativeMapping = std::remove_reference_t<decltype(derivative(std::declval<Map>()))>

protected

## Geometry

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::Geometry = Geo

protected

## GlobalCoordinate

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::GlobalCoordinate = std::remove_reference_t<decltype(std::declval<Map>()(std::declval<typename Geo::GlobalCoordinate>()))>

type of global coordinates

## Jacobian

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::Jacobian = FieldMatrix<ctype, coorddimension, mydimension>

type of jacobian

## JacobianInverse

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>

type of jacobian inverse

## JacobianInverseTransposed

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>

type of jacobian inverse transposed

## JacobianTransposed

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>

type of jacobian transposed

## LocalCoordinate

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::LocalCoordinate = typename Geo::LocalCoordinate

type of local coordinates

## Mapping

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::Mapping = Map

protected

## MatrixHelper

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::MatrixHelper = Impl::FieldMatrixHelper<ctype>

protected

## Volume

template<class Map, class Geo>

using Dune::MappedGeometry< Map, Geo >::Volume = std::remove_reference_t<decltype(Dune::power(std::declval<ctype>(),mydimension))>

type of volume

## Constructor & Destructor Documentation

## MappedGeometry()

template<class Map, class Geo>
template<class Geo_, class Map_, std::enable_if_t< Dune::IsInteroperable< Map, Map_ >::value, int > = 0, std::enable_if_t< Dune::IsInteroperable< Geo, Geo_ >::value, int > = 0>

Dune::MappedGeometry< Map, Geo >::MappedGeometry | ( | Map_ && | mapping,
|  | Geo_ && | geometry,
|  | bool | affine = false )

inline

Constructor from mapping to parametrize the geometry.

Parameters

  [in] | mapping | A differentiable function for the parametrization of the geometry
  [in] | geometry | The geometry that is mapped
  [in] | affine | Flag indicating whether the MappedGeometry represents an affine mapping

## Member Function Documentation

## affine()

template<class Map, class Geo>

bool Dune::MappedGeometry< Map, Geo >::affine | ( |  | ) | const

inline

Is this mapping affine? Not in general, since we don't know anything about the mapping. The returned value can be given in the constructor of the class.

## center()

template<class Map, class Geo>

GlobalCoordinate Dune::MappedGeometry< Map, Geo >::center | ( |  | ) | const

inline

Map the center of the wrapped geometry.

## corner()

template<class Map, class Geo>

GlobalCoordinate Dune::MappedGeometry< Map, Geo >::corner | ( | int | i | ) | const

inline

Obtain coordinates of the i-th corner.

## corners()

template<class Map, class Geo>

int Dune::MappedGeometry< Map, Geo >::corners | ( |  | ) | const

inline

Obtain number of corners of the corresponding reference element.

## global()

template<class Map, class Geo>

GlobalCoordinate Dune::MappedGeometry< Map, Geo >::global | ( | const LocalCoordinate & | local | ) | const

inline

Evaluate the coordinate mapping.

Chained evaluation of the geometry and mapping from local coordinates in the reference element associated to the wrapped geometry.

Parameters

  [in] | local | local coordinates

Returns
  corresponding global coordinate

## integrationElement()

template<class Map, class Geo>

ctype Dune::MappedGeometry< Map, Geo >::integrationElement | ( | const LocalCoordinate & | local | ) | const

inline

Obtain the integration element.

If the Jacobian of the geometry is denoted by , the integration element is given by

Parameters

  [in] | local | local coordinate to evaluate the integration element in.

Returns
  the integration element .

## jacobian()

template<class Map, class Geo>

Jacobian Dune::MappedGeometry< Map, Geo >::jacobian | ( | const LocalCoordinate & | local | ) | const

inline

Obtain the Jacobian.

Parameters

  [in] | local | local coordinate to evaluate Jacobian in

Returns
  the matrix corresponding to the Jacobian

## jacobianInverse()

template<class Map, class Geo>

JacobianInverse Dune::MappedGeometry< Map, Geo >::jacobianInverse | ( | const LocalCoordinate & | local | ) | const

inline

Obtain the Jacobian's inverse.

The Jacobian's inverse is defined as a pseudo-inverse. If we denote the Jacobian by , the following condition holds:

## jacobianInverseTransposed()

template<class Map, class Geo>

JacobianInverseTransposed Dune::MappedGeometry< Map, Geo >::jacobianInverseTransposed | ( | const LocalCoordinate & | local | ) | const

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 , the following condition holds:

## jacobianTransposed()

template<class Map, class Geo>

JacobianTransposed Dune::MappedGeometry< Map, Geo >::jacobianTransposed | ( | const LocalCoordinate & | local | ) | const

inline

Obtain the transposed of the Jacobian.

Parameters

  [in] | local | local coordinate to evaluate Jacobian in

Returns
  the matrix corresponding to the transposed of the Jacobian

## local()

template<class Map, class Geo>

LocalCoordinate Dune::MappedGeometry< Map, Geo >::local | ( | const GlobalCoordinate & | y,
|  | Impl::GaussNewtonOptions< ctype > | opts = {} ) const

inline

Evaluate the inverse coordinate mapping.

Parameters

  [in] | y | Global coordinate to map
  [in] | opts | Parameters to control the behavior of the Gauss-Newton algorithm.

Returns
  For given global coordinate y the local coordinate x that minimizes the function (global(x) - y).two_norm2() over the local coordinate space spanned by the reference element.

Exceptions

  In | case of an error indicating that the local coordinate can not be obtained, a Dune::Exception is thrown, with an error code from `GaussNewtonErrorCode`.

Note
  It is not guaranteed that the resulting local coordinate is inside the reference element domain.

## refElement()

template<class Map, class Geo>

ReferenceElement Dune::MappedGeometry< Map, Geo >::refElement | ( |  | ) | const

inline protected

## type()

template<class Map, class Geo>

GeometryType Dune::MappedGeometry< Map, Geo >::type | ( |  | ) | const

inline

Obtain the geometry type from the reference element.

## volume() [1/2]

template<class Map, class Geo>

Volume Dune::MappedGeometry< Map, Geo >::volume | ( | const QuadratureRule< ctype, mydimension > & | quadRule | ) | const

inline

Obtain the volume of the mapping's image by given quadrature rules.

## volume() [2/2]

template<class Map, class Geo>

Volume Dune::MappedGeometry< Map, Geo >::volume | ( | Impl::ConvergenceOptions< ctype > | opts = {} | ) | const

inline

Obtain the volume of the mapping's image.

Calculates the volume of the entity by numerical integration. Since the polynomial order of the volume element is not known, iteratively compute numerical integrals with increasing order of the quadrature rules, until tolerance is reached.

Parameters

  opts | An optional control over the convergence, providing a break tolerance and a maximal iteration count.

## Friends And Related Symbol Documentation

## referenceElement

template<class Map, class Geo>

ReferenceElement referenceElement | ( | const MappedGeometry< Map, Geo > & | geometry | ) |

friend

Obtain the reference-element related to this geometry.

## Member Data Documentation

## coorddimension

template<class Map, class Geo>

int Dune::MappedGeometry< Map, Geo >::coorddimension = GlobalCoordinate::size()

static constexpr

coordinate dimension

## mydimension

template<class Map, class Geo>

int Dune::MappedGeometry< Map, Geo >::mydimension = LocalCoordinate::size()

static constexpr

geometry dimension

The documentation for this class was generated from the following file:

- mappedgeometry.hh