Go to the documentation of this file.
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&>
83 virtual void evaluate(
const typename Traits::DomainType& x,
typename Traits::RangeType& y)
const = 0;
88 template<
typename Domain,
typename Range,
typename F>
89 class LambdaVirtualFunction final
90 :
public VirtualFunction<Domain, Range>
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)};
virtual ~VirtualFunction()
Definition: function.hh:76
Traits class containing raw types.
Definition: function.hh:42
Dune namespace.
Definition: alignedallocator.hh:9
Base class template for function classes.
Definition: function.hh:28
Function< const DomainType &, RangeType & >::Traits Traits
Definition: function.hh:74
Virtual base class template for function classes.
Definition: function.hh:70
RawRangeType RangeType
Raw type of input variable with removed reference and constness.
Definition: function.hh:36
Impl::LambdaVirtualFunction< Domain, Range, std::decay_t< F > > makeVirtualFunction(F &&f)
make VirtualFunction out of a function object
Definition: function.hh:133
void evaluate(const typename Traits::DomainType &x, typename Traits::RangeType &y) const
Function evaluation.
RawDomainType DomainType
Raw type of output variable with removed reference and constness.
Definition: function.hh:39
RawDomainType DomainType
Definition: function.hh:44
virtual void evaluate(const typename Traits::DomainType &x, typename Traits::RangeType &y) const =0
Function evaluation.
RawRangeType RangeType
Definition: function.hh:45
Traits for type conversions and type information.