Loading...
Searching...
No Matches
Function implementations
Functions

Concrete function implementations. More...

Collaboration diagram for Function implementations:

## Classes

struct | Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree >
| Function, which evaluates all monomials up to degree `maxDegree` in a given coordinate. More...
class | Dune::Functions::Polynomial< K, C >
| A univariate polynomial implementation. More...
class | Dune::Functions::TrigonometricFunction< K, sinFactor, cosFactor >
| A linear combination of trigonomic functions. More...
class | Dune::Functions::DifferentiableFunctionFromCallables< Range(Domain), DerivativeTraits, F >
| Wrap a list of callable objects as derivative sequence modelling Concept::DifferentiableFunction<Range(Domain), DerivativeTraits>. More...
class | Dune::Functions::DifferentiableFunctionFromCallables< Range(Domain), DerivativeTraits, F, DF, Derivatives... >
| Wrap a list of callable objects as derivative sequence modelling Concept::DifferentiableFunction<Range(Domain), DerivativeTraits>. More...
class | Dune::Functions::AnalyticGridViewFunction< Range(Domain), GV, F, DerivativeTraits >
| Class wrapping any differentiable function as grid function. More...
class | Dune::Functions::CoarseFunctionOnFineGridView< GridFunction, GV, DerivativeTraits >
| A wrapper representing a coarse grid function on a fine gridview. More...
class | Dune::Functions::ComposedGridFunction< OF, IF >
| Composition of grid functions with another function. More...
class | Dune::Functions::DiscreteGlobalBasisFunction< B, V, NTRE, R >
| A grid function induced by a global basis and a coefficient vector. More...
class | Dune::Functions::DiscreteGlobalBasisFunctionDerivative< DGBF >
| Derivative of a DiscreteGlobalBasisFunction. More...
class | Dune::Functions::FaceNormalGridFunction< GV >
| Grid function implementing the piecewise element face normal. More...
class | Dune::Functions::FineFunctionOnCoarseGridView< GridFunction, GV, DerivativeTraits >
| A wrapper representing a fine grid function on a gridview. More...

## Functions

template<class K, int sinFactor, int cosFactor>
TrigonometricFunction< K, -cosFactor, sinFactor > | Dune::Functions::derivative (const TrigonometricFunction< K, sinFactor, cosFactor > &f)
| Obtain derivative of TrigonometricFunction function.
template<class Signature, template< class > class DerivativeTraits, class... F>
DifferentiableFunctionFromCallables< Signature, DerivativeTraits, F... > | Dune::Functions::makeDifferentiableFunctionFromCallables (const SignatureTag< Signature, DerivativeTraits > &signatureTag, F &&... f)
| Create a DifferentiableFunction from callables.
template<class F, class GridView>
auto | Dune::Functions::makeAnalyticGridViewFunction (F &&f, const GridView &gridView)
| Create an AnalyticGridViewFunction from a function and a grid view.
template<class OF, class... IF>
auto | Dune::Functions::makeComposedGridFunction (OF &&outerFunction, IF &&... innerFunction)
| Create a ComposedGridFunction that composes grid-functions with another function.
template<typename R, typename B, typename V>
auto | Dune::Functions::makeDiscreteGlobalBasisFunction (B &&basis, V &&vector)
| Generate a DiscreteGlobalBasisFunction.
template<class F, class GridView>
auto | makeAnalyticGridViewFunction (F &&f, const GridView &gridView)
| Create an AnalyticGridViewFunction from a function and a grid view.
template<class OF, class... IF>
auto | makeComposedGridFunction (OF &&outerFunction, IF &&... innerFunction)
| Create a ComposedGridFunction that composes grid-functions with another function.
template<typename R, typename B, typename V>
auto | makeDiscreteGlobalBasisFunction (B &&basis, V &&vector)
| Generate a DiscreteGlobalBasisFunction.

## Friends

auto | Dune::Functions::Polynomial< K, C >::derivative (const Polynomial &p)
| Obtain derivative of Polynomial function.
Derivative | Dune::Functions::DifferentiableFunctionFromCallables< Range(Domain), DerivativeTraits, F >::derivative (const DifferentiableFunctionFromCallables &t)
| Get derivative of DifferentiableFunctionFromCallables.
Derivative | Dune::Functions::DifferentiableFunctionFromCallables< Range(Domain), DerivativeTraits, F, DF, Derivatives... >::derivative (const DifferentiableFunctionFromCallables &t)
| Get derivative of DifferentiableFunctionFromCallables.

## Detailed Description

Concrete function implementations.

## Function Documentation

## derivative()

template<class K, int sinFactor, int cosFactor>

TrigonometricFunction< K, -cosFactor, sinFactor > Dune::Functions::derivative | ( | const TrigonometricFunction< K, sinFactor, cosFactor > & | f | ) |

Obtain derivative of TrigonometricFunction function.

## makeAnalyticGridViewFunction() [1/2]

template<class F, class GridView>

auto makeAnalyticGridViewFunction | ( | F && | f,
|  | const GridView & | gridView )

related

Create an AnalyticGridViewFunction from a function and a grid view.

The returned function supports localFunction() and stores a copy of the original function.

Parameters

  f | A function object supporting evaluation with global coordinates of the passed gridView.
  gridView | The GridView the function should act on.

Returns
  A function that models the GridFunction interface.

## makeAnalyticGridViewFunction() [2/2]

template<class F, class GridView>

auto makeAnalyticGridViewFunction | ( | F && | f,
|  | const GridView & | gridView )

related

Create an AnalyticGridViewFunction from a function and a grid view.

The returned function supports localFunction() and stores a copy of the original function.

Parameters

  f | A function object supporting evaluation with global coordinates of the passed gridView.
  gridView | The GridView the function should act on.

Returns
  A function that models the GridFunction interface.

## makeComposedGridFunction() [1/2]

template<class OF, class... IF>

auto makeComposedGridFunction | ( | OF && | outerFunction,
|  | IF &&... | innerFunction )

related

Create a ComposedGridFunction that composes 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().

Parameters

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

Returns
  A grid-function defined on the same EntitySet as the input-functions.

## makeComposedGridFunction() [2/2]

template<class OF, class... IF>

auto makeComposedGridFunction | ( | OF && | outerFunction,
|  | IF &&... | innerFunction )

Create a ComposedGridFunction that composes 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().

Parameters

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

Returns
  A grid-function defined on the same EntitySet as the input-functions.

## makeDifferentiableFunctionFromCallables()

template<class Signature, template< class > class DerivativeTraits, class... F>

DifferentiableFunctionFromCallables< Signature, DerivativeTraits, F... > Dune::Functions::makeDifferentiableFunctionFromCallables | ( | const SignatureTag< Signature, DerivativeTraits > & | signatureTag,
|  | F &&... | f )

Create a DifferentiableFunction from callables.

This will return a wrapper modelling the DifferentiableFunction interface where the evaluation of the function and its derivatives are implemented by the given callable objects.

Parameters

  signatureTag | A dummy parameter to pass the signature and derivative traits
  f | Callable objects implementing the evaluation of the function and its derivatives

Returns
  Object modelling DifferentiableFunction interface

## makeDiscreteGlobalBasisFunction() [1/2]

template<typename R, typename B, typename V>

auto makeDiscreteGlobalBasisFunction | ( | B && | basis,
|  | V && | vector )

related

Generate a DiscreteGlobalBasisFunction.

Create a new DiscreteGlobalBasisFunction by wrapping the vector in a VectorBackend that allows the hierarchic resize and multi-index access in the DiscreteGlobalBasisFunction, if the vector does not yet fulfill the Concept::ConstVectorBackend concept.

Template Parameters

  R

  The range type this grid-function should represent when seen as a mapping R(Domain) with Domain the global coordinates of the associated GridView. This must be compatible with the basis and coefficients. See the documentation of DiscreteGlobalBasisFunction for more details. The type R must be default constructible and by this default construction provides a well resized container to be filled in the evaluation method of the grid function.

Parameters

  basis | The global basis or subspace basis associated with this grid-function
  vector | The coefficient vector to use in combination with the basis.

## makeDiscreteGlobalBasisFunction() [2/2]

template<typename R, typename B, typename V>

auto makeDiscreteGlobalBasisFunction | ( | B && | basis,
|  | V && | vector )

Generate a DiscreteGlobalBasisFunction.

Create a new DiscreteGlobalBasisFunction by wrapping the vector in a VectorBackend that allows the hierarchic resize and multi-index access in the DiscreteGlobalBasisFunction, if the vector does not yet fulfill the Concept::ConstVectorBackend concept.

Template Parameters

  R

  The range type this grid-function should represent when seen as a mapping R(Domain) with Domain the global coordinates of the associated GridView. This must be compatible with the basis and coefficients. See the documentation of DiscreteGlobalBasisFunction for more details. The type R must be default constructible and by this default construction provides a well resized container to be filled in the evaluation method of the grid function.

Parameters

  basis | The global basis or subspace basis associated with this grid-function
  vector | The coefficient vector to use in combination with the basis.

## Friends

## derivative [1/3]

template<class Range, class Domain, template< class > class DerivativeTraits, class F>

Derivative derivative | ( | const DifferentiableFunctionFromCallables< Range(Domain), DerivativeTraits, F > & | t | ) |

friend

Get derivative of DifferentiableFunctionFromCallables.

## derivative [2/3]

template<class Range, class Domain, template< class > class DerivativeTraits, class F, class DF, class... Derivatives>

Derivative derivative | ( | const DifferentiableFunctionFromCallables< Range(Domain), DerivativeTraits, F, DF, Derivatives... > & | t | ) |

friend

Get derivative of DifferentiableFunctionFromCallables.

## derivative [3/3]

template<class K, class C = std::vector<K>>

auto derivative | ( | const Polynomial< K, C > & | p | ) |

friend

Obtain derivative of Polynomial function.

The derivative contains its own coefficient list and is not updated if the original function is changed.