Loading...
Searching...
No Matches
Dune::Functions::GeometryInAncestor< Element > Class Template Reference
Functions » Function related utilities

A geometry embedding a descendent element into an ancestor. More...

`#include <dune/functions/common/geometryinancestor.hh>`

## Public Types

using | LocalCoordinate = typename Element::Geometry::LocalCoordinate
| Type of local coordinate (local within fine element).
using | GlobalCoordinate = typename Element::Geometry::LocalCoordinate
| Type of global coordinate (local within coarse element).

## Public Member Functions

| GeometryInAncestor ()=default
| GeometryInAncestor (GeometryInAncestor &&)=delete
| GeometryInAncestor (const GeometryInAncestor &other)
| Copy constructor.
| GeometryInAncestor (const GeometryInAncestor &other, const Element &fineElement)
| Copy construction setting an external fine element.
template<class F> requires (std::is_invocable_r_v<bool,F,Element>)
const Element & | bind (const Element &fineElement, F &&includeFather)
| Bind this GeometryInAncestor to a fine element and search coarse element.
template<class F> requires (std::is_invocable_r_v<bool,F,Element>)
const Element & | bind (Element &&fineElement, F &&includeFather)
| Bind this GeometryInAncestor to a fine element and search coarse element.
const Element & | fineElement () const
| Return the fine element.
const Element & | coarseElement () const
| Return the coarse element.
GlobalCoordinate | global (LocalCoordinate x) const
| Map local coordinate in fine element into coarse element.
LocalCoordinate | local (GlobalCoordinate x) const
| Map local coordinate in coarse element into fine element.

## Detailed Description

template<class Element>
class Dune::Functions::GeometryInAncestor< Element >

A geometry embedding a descendent element into an ancestor.

Template Parameters

  Element | Type of elements considered by this embedding

This class will store a chain of geometryInFather objects connecting a coarse element with a fine element. The global() and local() methods of the GeometryInAncestor simply chain those stored geometryInFather objects. Since this requires that objects of type GeometryInAncestor allocate dynamic memory, they are not intended to be created on the fly within a hot loop. Instead one reused a single GeometryInAncestor object by binding if to a new element.

Currently this only provides the local() and global() methods of the geometry interface.

## Member Typedef Documentation

## GlobalCoordinate

template<class Element>

using Dune::Functions::GeometryInAncestor< Element >::GlobalCoordinate = typename Element::Geometry::LocalCoordinate

Type of global coordinate (local within coarse element).

## LocalCoordinate

template<class Element>

using Dune::Functions::GeometryInAncestor< Element >::LocalCoordinate = typename Element::Geometry::LocalCoordinate

Type of local coordinate (local within fine element).

## Constructor & Destructor Documentation

## GeometryInAncestor() [1/4]

template<class Element>

Dune::Functions::GeometryInAncestor< Element >::GeometryInAncestor | ( |  | ) |

default

## GeometryInAncestor() [2/4]

template<class Element>

Dune::Functions::GeometryInAncestor< Element >::GeometryInAncestor | ( | GeometryInAncestor< Element > && |  | ) |

delete

## GeometryInAncestor() [3/4]

template<class Element>

Dune::Functions::GeometryInAncestor< Element >::GeometryInAncestor | ( | const GeometryInAncestor< Element > & | other | ) |

inline

Copy constructor.

If the original GeometryInAncestor holds a pointer to an external fine Element, the new GeometryInAncestor points to the same external fine Element.

## GeometryInAncestor() [4/4]

template<class Element>

Dune::Functions::GeometryInAncestor< Element >::GeometryInAncestor | ( | const GeometryInAncestor< Element > & | other,
|  | const Element & | fineElement )

inline

Copy construction setting an external fine element.

This copies the original GeometryInAncestor and sets the pointer to the external fine element passed additionally.

## Member Function Documentation

## bind() [1/2]

template<class Element>
template<class F>
requires (std::is_invocable_r_v<bool,F,Element>)

const Element & Dune::Functions::GeometryInAncestor< Element >::bind | ( | const Element & | fineElement,
|  | F && | includeFather )

inline

Bind this GeometryInAncestor to a fine element and search coarse element.

Parameters

  fineElement | The fine element to be bound to
  includeFather | Unary predicate indicating whether father element should be traversed

Build the geometry information by traversing the fathers starting from the given fineElement as long as includeFather(element) returns true to obtain a chain of geometryInFather objects connecting the fineElement with a coarseElement. The coarseElement is the first element where includeFather(coarseElement) returns false.

This overload for an l-value fineElement will store a pointer to fineElement.

## bind() [2/2]

template<class Element>
template<class F>
requires (std::is_invocable_r_v<bool,F,Element>)

const Element & Dune::Functions::GeometryInAncestor< Element >::bind | ( | Element && | fineElement,
|  | F && | includeFather )

inline

Bind this GeometryInAncestor to a fine element and search coarse element.

Parameters

  fineElement | The fine element to be bound to
  includeFather | Unary predicate indicating whether father element should be traversed

Build the geometry information by traversing the fathers starting from the given fineElement as long as includeFather(element) returns true to obtain a chain of geometryInFather objects connecting the fineElement with a coarseElement. The coarseElement is the first element where includeFather(coarseElement) returns false.

This overload for an r-value fineElement will store a copy of the fineElement.

## coarseElement()

template<class Element>

const Element & Dune::Functions::GeometryInAncestor< Element >::coarseElement | ( |  | ) | const

inline

Return the coarse element.

## fineElement()

template<class Element>

const Element & Dune::Functions::GeometryInAncestor< Element >::fineElement | ( |  | ) | const

inline

Return the fine element.

## global()

template<class Element>

GlobalCoordinate Dune::Functions::GeometryInAncestor< Element >::global | ( | LocalCoordinate | x | ) | const

inline

Map local coordinate in fine element into coarse element.

## local()

template<class Element>

LocalCoordinate Dune::Functions::GeometryInAncestor< Element >::local | ( | GlobalCoordinate | x | ) | const

inline

Map local coordinate in coarse element into fine element.

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

- geometryinancestor.hh