Loading...
Searching...
No Matches
Dune::Functions::ComposedGridFunction< OF, IF > Class Template Reference
Functions » Function implementations

Composition of grid functions with another function. More...

`#include <dune/functions/gridfunctions/composedgridfunction.hh>`

## Public Types

using | EntitySet = typename InnerFunction<0>::EntitySet
using | Element = typename EntitySet::Element
using | Domain = typename EntitySet::GlobalCoordinate
using | LocalDomain = typename EntitySet::LocalCoordinate
using | Range = decltype(std::declval<OF>()(localFunction(std::declval<IF>())(std::declval<LocalDomain>())...))

## Public Member Functions

template<class OFT, class... IFT, disableCopyMove< ComposedGridFunction, OFT > = 0, std::enable_if_t<(sizeof...(IFT) > 0), int > = 0>
| ComposedGridFunction (OFT &&outerFunction, IFT &&... innerFunctions)
| Create ComposedGridFunction.
Range | operator() (const Domain &x) const
| Evaluation of the composed grid function in coordinates x.
const EntitySet & | entitySet () const
| Return the EntitySet associated to this composed grid-function.

## Protected Member Functions

InnerLocalFunctions | innerLocalFunctions () const

## Protected Attributes

OuterFunction | outerFunction_
InnerFunctions | innerFunctions_

## Friends

Traits::DerivativeInterface | derivative (const ComposedGridFunction &t)
| Not implemented.
LocalFunction | localFunction (const ComposedGridFunction &cgf)
| Create a local-function of this composed grid-function.

## Related Symbols

(Note that these are not member symbols.)
template<class OF, class... IF>
auto | makeComposedGridFunction (OF &&outerFunction, IF &&... innerFunction)
| Create a ComposedGridFunction that composes grid-functions with another function.

## Detailed Description

template<class OF, class... IF>
class Dune::Functions::ComposedGridFunction< OF, IF >

Composition of grid functions with another function.

For given inner grid functions g0, ..., gn and an outer function f this creates a grid function representing f(g0(x), ..., gn(x)). The only assumption made, is that the range types of the inner functions can be passed to the outer ones, and that all grid functions are defined on the same EntitySet.

Notice that all functions are captured by value. To store references you can pass std::ref().

Template Parameters

  OF | Type of outer function. std::reference_wrapper is supported.
  IF | Types of inner outer functions. std::reference_wrapper is supported.

## Member Typedef Documentation

## Domain

template<class OF, class... IF>

using Dune::Functions::ComposedGridFunction< OF, IF >::Domain = typename EntitySet::GlobalCoordinate

## Element

template<class OF, class... IF>

using Dune::Functions::ComposedGridFunction< OF, IF >::Element = typename EntitySet::Element

## EntitySet

template<class OF, class... IF>

using Dune::Functions::ComposedGridFunction< OF, IF >::EntitySet = typename InnerFunction<0>::EntitySet

## LocalDomain

template<class OF, class... IF>

using Dune::Functions::ComposedGridFunction< OF, IF >::LocalDomain = typename EntitySet::LocalCoordinate

## Range

template<class OF, class... IF>

using Dune::Functions::ComposedGridFunction< OF, IF >::Range = decltype(std::declval<OF>()(localFunction(std::declval<IF>())(std::declval<LocalDomain>())...))

## Constructor & Destructor Documentation

## ComposedGridFunction()

template<class OF, class... IF>
template<class OFT, class... IFT, disableCopyMove< ComposedGridFunction, OFT > = 0, std::enable_if_t<(sizeof...(IFT) > 0), int > = 0>

Dune::Functions::ComposedGridFunction< OF, IF >::ComposedGridFunction | ( | OFT && | outerFunction,
|  | IFT &&... | innerFunctions )

inline

Create ComposedGridFunction.

Outer and inner functions will be captured by value. To store references you can pass std::ref().

Parameters

  outerFunction | The outer function to be composed with the grid functions.
  innerFunctions | The inner grid functions

## Member Function Documentation

## entitySet()

template<class OF, class... IF>

const EntitySet & Dune::Functions::ComposedGridFunction< OF, IF >::entitySet | ( |  | ) | const

inline

Return the EntitySet associated to this composed grid-function.

It is implicitly assumed that all inner-functions can be bound to the same set of entities. Thus, the EntitySet is either of the EntitySets of the inner-function, e.g., the one from the first inner-function.

Requirements:

- Number of inner-functions > 0

## innerLocalFunctions()

template<class OF, class... IF>

InnerLocalFunctions Dune::Functions::ComposedGridFunction< OF, IF >::innerLocalFunctions | ( |  | ) | const

inline protected

## operator()()

template<class OF, class... IF>

Range Dune::Functions::ComposedGridFunction< OF, IF >::operator() | ( | const Domain & | x | ) | const

inline

Evaluation of the composed grid function in coordinates x.

## Friends And Related Symbol Documentation

## derivative

template<class OF, class... IF>

Traits::DerivativeInterface derivative | ( | const ComposedGridFunction< OF, IF > & | t | ) |

friend

Not implemented.

## localFunction

template<class OF, class... IF>

LocalFunction localFunction | ( | const ComposedGridFunction< OF, IF > & | cgf | ) |

friend

Create a local-function of this composed grid-function.

The LocalFunction is defined by composition of the outer-function with the corresponding local-functions of the inner-functions.

## Member Data Documentation

## innerFunctions_

template<class OF, class... IF>

InnerFunctions Dune::Functions::ComposedGridFunction< OF, IF >::innerFunctions_

protected

## outerFunction_

template<class OF, class... IF>

OuterFunction Dune::Functions::ComposedGridFunction< OF, IF >::outerFunction_

protected

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

- composedgridfunction.hh