Dune Core Modules (2.9.0)
Concrete function implementations. 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 F > | |
CallableFunctionWrapper< F > | Dune::Functions::callable (const F &f) |
Create a callable object from some Dune::VirtualFunction. More... | |
template<class F > | |
CallableFunctionWrapper< F > | Dune::Functions::callable (const std::shared_ptr< F > &fp) |
Create a callable object from std::shared_ptr<F> More... | |
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. More... | |
template<class F , class GridView > | |
AnalyticGridViewFunction< typename std::invoke_result< F, typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate >::type(typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate), GridView, typename std::decay< F >::type > | Dune::Functions::makeAnalyticGridViewFunction (F &&f, const GridView &gridView) |
Create an AnalyticGridViewFunction from a function and a grid view. More... | |
template<class OF , class... IF> | |
auto | Dune::Functions::makeComposedGridFunction (OF &&outerFunction, IF &&... innerFunction) |
Create a ComposedGridFunction that composes grid-functions with another function. More... | |
template<typename R , typename B , typename V > | |
auto | Dune::Functions::makeDiscreteGlobalBasisFunction (B &&basis, V &&vector) |
Generate a DiscreteGlobalBasisFunction. More... | |
template<class F , class GridView > | |
AnalyticGridViewFunction< typename std::invoke_result< F, typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate >::type(typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate), GridView, typename std::decay< F >::type > | makeAnalyticGridViewFunction (F &&f, const GridView &gridView) |
Create an AnalyticGridViewFunction from a function and a grid view. More... | |
template<class OF , class... IF> | |
auto | makeComposedGridFunction (OF &&outerFunction, IF &&... innerFunction) |
Create a ComposedGridFunction that composes grid-functions with another function. More... | |
template<typename R , typename B , typename V > | |
auto | makeDiscreteGlobalBasisFunction (B &&basis, V &&vector) |
Generate a DiscreteGlobalBasisFunction. More... | |
Friends | |
Polynomial | Dune::Functions::Polynomial< K >::derivative (const Polynomial &p) |
Obtain derivative of Polynomial function. More... | |
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
◆ callable() [1/2]
CallableFunctionWrapper< F > Dune::Functions::callable | ( | const F & | f | ) |
Create a callable object from some Dune::VirtualFunction.
- Template Parameters
-
F Function type derived from Dune::VirtualFunction
- Parameters
-
f The function to be wrapper
The returned object will only be valid as long f is valid. You can e.g. do the following:
◆ callable() [2/2]
CallableFunctionWrapper< F > Dune::Functions::callable | ( | const std::shared_ptr< F > & | fp | ) |
Create a callable object from std::shared_ptr<F>
- Template Parameters
-
F Function type derived from Dune::VirtualFunction
- Parameters
-
fp std::shared_ptr<F> to the function to be wrapper
The returned object will share ownership of fp using a std::shared_ptr. You can e.g. do the following:
◆ makeAnalyticGridViewFunction() [1/2]
AnalyticGridViewFunction< typename std::invoke_result< F, typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate >::type(typename GridView::template Codim< 0 >::Geometry::GlobalCoordinate), GridView, typename std::decay< F >::type > makeAnalyticGridViewFunction | ( | F && | f, |
const GridView & | gridView | ||
) |
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]
|
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]
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. innerFunctions The inner grid-functions
- Returns
- A grid-function defined on the same
EntitySet
as the input-functions.
◆ makeComposedGridFunction() [2/2]
|
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. innerFunctions The inner grid-functions
- Returns
- A grid-function defined on the same
EntitySet
as the input-functions.
◆ makeDifferentiableFunctionFromCallables()
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]
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 ConstVectorBackend concept.
- Template Parameters
-
R The range type this grid-function should represent when seen as a mapping R(Domain)
withDomain
the global coordinates of the associated GridView. This must be compatible with the basis and coefficients. See the documentation of DiscreteGlobalBasisFunction for more details.
- 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]
|
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 ConstVectorBackend concept.
- Template Parameters
-
R The range type this grid-function should represent when seen as a mapping R(Domain)
withDomain
the global coordinates of the associated GridView. This must be compatible with the basis and coefficients. See the documentation of DiscreteGlobalBasisFunction for more details.
- Parameters
-
basis The global basis or subspace basis associated with this grid-function vector The coefficient vector to use in combination with the basis
.
References Dune::Functions::istlVectorBackend().
Friends
◆ derivative
|
friend |
Obtain derivative of Polynomial function.
The derivative contains its own coefficient list and is not updated if the original function is changed.