3 #ifndef DUNE_FUNCTION_HH 4 #define DUNE_FUNCTION_HH 27 template <
class Domain,
class Range>
30 typedef typename std::remove_cv<typename std::remove_reference< Domain >::type >::type RawDomainType;
31 typedef typename std::remove_cv<typename std::remove_reference< Range >::type >::type RawRangeType;
69 template <
class DomainType,
class RangeType>
71 public Function<const DomainType&, RangeType&>
88 template<
typename Domain,
typename Range,
typename F>
89 class LambdaVirtualFunction final
93 LambdaVirtualFunction(F&& f)
97 LambdaVirtualFunction(
const F& f)
101 void evaluate(
const Domain& x, Range& y)
const override 131 template<
typename Domain,
typename Range,
typename F>
132 Impl::LambdaVirtualFunction< Domain, Range, std::decay_t<F> >
135 return {std::forward<F>(f)};
RawDomainType DomainType
Definition: function.hh:44
Function< const DomainType &, RangeType & >::Traits Traits
Definition: function.hh:74
virtual ~VirtualFunction()
Definition: function.hh:76
void evaluate(const typename Traits::DomainType &x, typename Traits::RangeType &y) const
Function evaluation.
Traits class containing raw types.
Definition: function.hh:42
RawDomainType DomainType
Raw type of output variable with removed reference and constness.
Definition: function.hh:39
Impl::LambdaVirtualFunction< Domain, Range, std::decay_t< F > > makeVirtualFunction(F &&f)
make VirtualFunction out of a function object
Definition: function.hh:133
Dune namespace.
Definition: alignedallocator.hh:9
Base class template for function classes.
Definition: function.hh:28
RawRangeType RangeType
Raw type of input variable with removed reference and constness.
Definition: function.hh:36
Virtual base class template for function classes.
Definition: function.hh:70
Traits for type conversions and type information.
RawRangeType RangeType
Definition: function.hh:45