3#ifndef DUNE_FUNCTIONS_COMMON_CALLABLE_HH
4#define DUNE_FUNCTIONS_COMMON_CALLABLE_HH
9#include <dune/common/function.hh>
10#include <dune/common/shared_ptr.hh>
39 using Range =
typename F::RangeType;
40 using Domain =
typename F::DomainType;
52 f_ = Dune::stackobject_to_shared_ptr(f);
78 std::shared_ptr<const F> f_;
CallableFunctionWrapper< F > callable(const F &f)
Create a callable object from some Dune::VirtualFunction.
Definition: callable.hh:105
Definition: polynomial.hh:10
Wrap a Dune::VirtualFunction into a callable object.
Definition: callable.hh:38
Range operator()(const Domain &x) const
Forward operator() to F::evaluate()
Definition: callable.hh:70
CallableFunctionWrapper(const F &f)
Instantiate from reference to f.
Definition: callable.hh:50
CallableFunctionWrapper(const std::shared_ptr< const F > &f)
Instantiate from std::shared_ptr to f.
Definition: callable.hh:61