template<class Range, class Domain, class LocalContext, template< class > class DerivativeTraits, size_t bufferSize>
class Dune::Functions::LocalFunction< Range(Domain), LocalContext, DerivativeTraits, bufferSize >
Class storing local functions using type erasure.
- Template Parameters
-
Range | Range type |
Domain | Domain type |
LocalContext | Type of local context where this function is defined on |
DerivativeTraits | Traits class to determine range of derivative. |
bufferSize | Size of stack buffer for small object optimization (defaults to 56) |
This models the Concept::LocalFunction<Range(Domain), LocalContext, DerivativeTraits> concept. Objects of this type are returned as local functions by the GridFunction wrapper. Notice that the DerivativeTraits type used here should normally be LocalDerivativeTraits<E,GDE> where GDE is the DerivativeTraits type of the corresponding global function. Small object optimization is used to store the given function. If its size exceed bufferSize
, memory will be allocated dynamically.
template<class Range , class Domain , class LocalContext , template< class > class DerivativeTraits, size_t bufferSize>
template<class F , disableCopyMove< LocalFunction, F > = 0>
Construct from function.
- Template Parameters
-
- Parameters
-
Calling derivative(DifferentiableFunction) will result in an exception if the passed function does provide a free derivative() function found via ADL.