Loading...
Searching...
No Matches
Dune::LocalFiniteElementGeometry< LFE, cdim > Class Template Reference

Geometry implementation based on local-basis function parametrization. More...

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

## Public Types

using | ctype = typename LocalBasisTraits::DomainFieldType
| coordinate type
using | LocalCoordinate = FieldVector<ctype, mydimension>
| type of local coordinates
using | GlobalCoordinate = FieldVector<ctype, coorddimension>
| type of global coordinates
using | Volume = decltype(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
using | ReferenceElements = Dune::ReferenceElements<ctype, mydimension>
| type of reference element
using | ReferenceElement = typename ReferenceElements::ReferenceElement

## Public Member Functions

| LocalFiniteElementGeometry ()=default
| Default constructed geometry results in an empty/invalid representation.
| LocalFiniteElementGeometry (const ReferenceElement &refElement, const LocalFiniteElement &localFE, std::vector< GlobalCoordinate > vertices)
| Constructor from a vector of coefficients of the LocalBasis parametrizing the geometry.
template<class Param, std::enable_if_t< std::is_invocable_r_v< GlobalCoordinate, Param, LocalCoordinate >, int > = 0>
| LocalFiniteElementGeometry (const ReferenceElement &refElement, const LocalFiniteElement &localFE, Param &&parametrization)
| Constructor from a local parametrization function, mapping local to (curved) global coordinates.
template<class... Args>
| LocalFiniteElementGeometry (GeometryType gt, Args &&... args)
| Constructor, forwarding to the other constructors that take a reference-element.
int | order () const
| Obtain the (highest) polynomial order of the parametrization.
bool | affine () const
| Is this mapping affine? Geometries of order 1 might be affine, but it needs to be checked on non-simplex geometries.
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 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.
const LocalFiniteElement & | finiteElement () const
| Obtain the local finite-element.
const std::vector< GlobalCoordinate > & | coefficients () const
| Obtain the coefficients of the parametrization.
const LocalBasis & | localBasis () const
| The local basis of the stored local finite-element.

## Static Public Attributes

static const int | mydimension = LocalBasisTraits::dimDomain
| geometry dimension
static const int | coorddimension = cdim
| coordinate dimension

## Protected Types

using | MatrixHelper = Impl::FieldMatrixHelper<ctype>

## Friends

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

## Detailed Description

template<class LFE, int cdim>
class Dune::LocalFiniteElementGeometry< LFE, cdim >

Geometry implementation based on local-basis function parametrization.

Parametrization of the geometry by any localfunction interpolated into a local finite-element space.

Template Parameters

  LFE | Type of a local finite-element.
  cdim | Coordinate dimension.

## Member Typedef Documentation

## ctype

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::ctype = typename LocalBasisTraits::DomainFieldType

coordinate type

## GlobalCoordinate

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::GlobalCoordinate = FieldVector<ctype, coorddimension>

type of global coordinates

## Jacobian

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::Jacobian = FieldMatrix<ctype, coorddimension, mydimension>

type of jacobian

## JacobianInverse

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::JacobianInverse = FieldMatrix<ctype, mydimension, coorddimension>

type of jacobian inverse

## JacobianInverseTransposed

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::JacobianInverseTransposed = FieldMatrix<ctype, coorddimension, mydimension>

type of jacobian inverse transposed

## JacobianTransposed

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::JacobianTransposed = FieldMatrix<ctype, mydimension, coorddimension>

type of jacobian transposed

## LocalCoordinate

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::LocalCoordinate = FieldVector<ctype, mydimension>

type of local coordinates

## MatrixHelper

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::MatrixHelper = Impl::FieldMatrixHelper<ctype>

protected

## ReferenceElement

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::ReferenceElement = typename ReferenceElements::ReferenceElement

## ReferenceElements

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::ReferenceElements = Dune::ReferenceElements<ctype, mydimension>

type of reference element

## Volume

template<class LFE, int cdim>

using Dune::LocalFiniteElementGeometry< LFE, cdim >::Volume = decltype(power(std::declval<ctype>(),mydimension))

type of volume

## Constructor & Destructor Documentation

## LocalFiniteElementGeometry() [1/4]

template<class LFE, int cdim>

Dune::LocalFiniteElementGeometry< LFE, cdim >::LocalFiniteElementGeometry | ( |  | ) |

default

Default constructed geometry results in an empty/invalid representation.

## LocalFiniteElementGeometry() [2/4]

template<class LFE, int cdim>

Dune::LocalFiniteElementGeometry< LFE, cdim >::LocalFiniteElementGeometry | ( | const ReferenceElement & | refElement,
|  | const LocalFiniteElement & | localFE,
|  | std::vector< GlobalCoordinate > | vertices )

inline

Constructor from a vector of coefficients of the LocalBasis parametrizing the geometry.

Parameters

  [in] | refElement | reference element for the geometry
  [in] | localFE | Local finite-element to use for the parametrization
  [in] | vertices | Coefficients of the local interpolation into the basis

The vertices are the coefficients of a local interpolation in the local finite-element. For Lagrange local bases, these correspond to vertices on the curved geometry in the local Lagrange nodes.

Note
  The vertices are stored internally, so if possible move an external vertex storage to this constructor

## LocalFiniteElementGeometry() [3/4]

template<class LFE, int cdim>
template<class Param, std::enable_if_t< std::is_invocable_r_v< GlobalCoordinate, Param, LocalCoordinate >, int > = 0>

Dune::LocalFiniteElementGeometry< LFE, cdim >::LocalFiniteElementGeometry | ( | const ReferenceElement & | refElement,
|  | const LocalFiniteElement & | localFE,
|  | Param && | parametrization )

inline

Constructor from a local parametrization function, mapping local to (curved) global coordinates.

Parameters

  [in] | refElement | reference element for the geometry
  [in] | localFE | Local finite-element to use for the parametrization
  [in] | parametrization | parametrization function with signature GlobalCoordinate(LocalCoordinate)

The parametrization function is not stored in the class, but interpolated into the local finite-element basis and the computed interpolation coefficients are stored.

## LocalFiniteElementGeometry() [4/4]

template<class LFE, int cdim>
template<class... Args>

Dune::LocalFiniteElementGeometry< LFE, cdim >::LocalFiniteElementGeometry | ( | GeometryType | gt,
|  | Args &&... | args )

inline explicit

Constructor, forwarding to the other constructors that take a reference-element.

Parameters

  [in] | gt | geometry type
  [in] | args... | arguments passed to the other constructors

## Member Function Documentation

## affine()

template<class LFE, int cdim>

bool Dune::LocalFiniteElementGeometry< LFE, cdim >::affine | ( |  | ) | const

inline

Is this mapping affine? Geometries of order 1 might be affine, but it needs to be checked on non-simplex geometries.

## center()

template<class LFE, int cdim>

GlobalCoordinate Dune::LocalFiniteElementGeometry< LFE, cdim >::center | ( |  | ) | const

inline

Obtain the centroid of the mapping's image.

## coefficients()

template<class LFE, int cdim>

const std::vector< GlobalCoordinate > & Dune::LocalFiniteElementGeometry< LFE, cdim >::coefficients | ( |  | ) | const

inline

Obtain the coefficients of the parametrization.

## corner()

template<class LFE, int cdim>

GlobalCoordinate Dune::LocalFiniteElementGeometry< LFE, cdim >::corner | ( | int | i | ) | const

inline

Obtain coordinates of the i-th corner.

## corners()

template<class LFE, int cdim>

int Dune::LocalFiniteElementGeometry< LFE, cdim >::corners | ( |  | ) | const

inline

Obtain number of corners of the corresponding reference element.

## finiteElement()

template<class LFE, int cdim>

const LocalFiniteElement & Dune::LocalFiniteElementGeometry< LFE, cdim >::finiteElement | ( |  | ) | const

inline

Obtain the local finite-element.

## global()

template<class LFE, int cdim>

GlobalCoordinate Dune::LocalFiniteElementGeometry< LFE, cdim >::global | ( | const LocalCoordinate & | local | ) | const

inline

Evaluate the coordinate mapping.

Implements a linear combination of local basis functions scaled by the vertices as coefficients.

Parameters

  [in] | local | local coordinate to map

Returns
  corresponding global coordinate

## integrationElement()

template<class LFE, int cdim>

ctype Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

Jacobian Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

JacobianInverse Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

JacobianInverseTransposed Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

JacobianTransposed Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

LocalCoordinate Dune::LocalFiniteElementGeometry< LFE, cdim >::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.

## localBasis()

template<class LFE, int cdim>

const LocalBasis & Dune::LocalFiniteElementGeometry< LFE, cdim >::localBasis | ( |  | ) | const

inline

The local basis of the stored local finite-element.

## order()

template<class LFE, int cdim>

int Dune::LocalFiniteElementGeometry< LFE, cdim >::order | ( |  | ) | const

inline

Obtain the (highest) polynomial order of the parametrization.

## type()

template<class LFE, int cdim>

GeometryType Dune::LocalFiniteElementGeometry< LFE, cdim >::type | ( |  | ) | const

inline

Obtain the name of the reference element.

## volume() [1/2]

template<class LFE, int cdim>

Volume Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

Volume Dune::LocalFiniteElementGeometry< LFE, cdim >::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 LFE, int cdim>

ReferenceElement referenceElement | ( | const LocalFiniteElementGeometry< LFE, cdim > & | geometry | ) |

friend

Obtain the reference-element related to this geometry.

## Member Data Documentation

## coorddimension

template<class LFE, int cdim>

const int Dune::LocalFiniteElementGeometry< LFE, cdim >::coorddimension = cdim

static

coordinate dimension

## mydimension

template<class LFE, int cdim>

const int Dune::LocalFiniteElementGeometry< LFE, cdim >::mydimension = LocalBasisTraits::dimDomain

static

geometry dimension

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

- localfiniteelementgeometry.hh