dune-functions 2.9.0
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | Related Functions | List of all members
Dune::Functions::ComposedGridFunction< OF, IF > Class Template Reference

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 >()(std::declval< IF >()(std::declval< Domain >())...))
 

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. More...
 
Range operator() (const Domain &x) const
 Evaluation of the composed grid function in coordinates x More...
 
const EntitySetentitySet () const
 Return the EntitySet associated to this composed grid-function. More...
 

Protected Member Functions

InnerLocalFunctions innerLocalFunctions () const
 

Protected Attributes

OuterFunction outerFunction_
 
InnerFunctions innerFunctions_
 

Friends

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

Related Functions

(Note that these are not member functions.)

template<class OF , class... IF>
auto makeComposedGridFunction (OF &&outerFunction, IF &&... innerFunction)
 Create a ComposedGridFunction that composes grid-functions with another function. More...
 

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
OFType of outer function. std::reference_wrapper is supported.
IFTypes 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>()(std::declval<IF>()(std::declval<Domain>())...))

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
outerFunctionThe outer function to be composed with the grid functions.
innerFunctionsThe 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
inlineprotected

◆ 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 Function 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: