Dune Core Modules (2.9.0)

Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize > Class Template Reference

Class storing differentiable functions using type erasure. More...

#include <dune/functions/common/differentiablefunction.hh>

Public Member Functions

template<class F , disableCopyMove< DifferentiableFunction, F > = 0>
 DifferentiableFunction (F &&f)
 Construct from function. More...
 
 DifferentiableFunction ()=default
 Default constructor.
 
Range operator() (const Domain &x) const
 Evaluation of wrapped function.
 

Friends

DerivativeInterface derivative (const DifferentiableFunction &t)
 Get derivative of wrapped function. More...
 

Detailed Description

template<class Range, class Domain, template< class > class DerivativeTraits, size_t bufferSize>
class Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >

Class storing differentiable functions using type erasure.

Template Parameters
RangeRange type
DomainDomain type
DerivativeTraitsTraits class to determine range of derivative (defaults to DefaultDerivativeTraits)
bufferSizeSize of stack buffer for small object optimization (defaults to 56)

This models the Concept::DifferentiableFunction<Range(Domain), DerivativeTraits> concept. Small object optimization is used to store the given function. If its size exceed bufferSize, memory will be allocated dynamically.

Constructor & Destructor Documentation

◆ DifferentiableFunction()

template<class Range , class Domain , template< class > class DerivativeTraits, size_t bufferSize>
template<class F , disableCopyMove< DifferentiableFunction, F > = 0>
Dune::Functions::DifferentiableFunction< Range(Domain), DerivativeTraits, bufferSize >::DifferentiableFunction ( F &&  f)
inline

Construct from function.

Template Parameters
FFunction type
Parameters
fFunction of type F

Calling derivative(DifferentiableFunction) will result in an exception if the passed function does provide a free derivative() function found via ADL.

References Dune::Functions::Concept::isFunction().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 27, 22:29, 2024)