3 #ifndef DUNE_LOCALFUNCTIONS_COMMON_LOCALINTERPOLATION_HH
4 #define DUNE_LOCALFUNCTIONS_COMMON_LOCALINTERPOLATION_HH
8 #include <dune/common/concept.hh>
17 template<
class Domain,
class Range>
18 struct FunctionWithEvaluate
21 auto require(F&& f) -> decltype(
22 f.evaluate(std::declval<Domain>(), std::declval<Range&>())
27 template<
class Domain>
28 struct FunctionWithCallOperator
31 auto require(F&& f) -> decltype(
32 f(std::declval<Domain>())
38 template<
class Domain,
class F,
39 std::enable_if_t<models<FunctionWithCallOperator<Domain>, F>(),
int> = 0>
40 decltype(
auto) makeFunctionWithCallOperator(const F& f)
47 template<
class Domain,
class F,
48 std::enable_if_t<not models<FunctionWithCallOperator<std::decay_t<Domain> >, F>(),
int> = 0>
49 #ifndef DUNE_DEPRECATED_INTERPOLATE_CHECK
50 [[deprecated(
"Passing functions only supporting 'f.evaluate(x,y)' to interpolate() is deprecated."
51 "Use functions supporting operator(), i.e. f(x) instead!")]]
53 decltype(
auto) makeFunctionWithCallOperator(const F& f)
55 return [&](
auto&& x) {
56 typename std::decay_t<F>::Traits::RangeType y;
Definition: bdfmcube.hh:16