5#ifndef DUNE_LOCALFUNCTIONS_COMMON_LOCALINTERPOLATION_HH
6#define DUNE_LOCALFUNCTIONS_COMMON_LOCALINTERPOLATION_HH
19 template<
class Domain,
class Range>
20 struct FunctionWithEvaluate
23 auto require(F&& f) ->
decltype(
24 f.evaluate(std::declval<Domain>(), std::declval<Range&>())
29 template<
class Domain>
30 struct FunctionWithCallOperator
33 auto require(F&& f) ->
decltype(
34 f(std::declval<Domain>())
40 template<
class Domain,
class F,
41 std::enable_if_t<models<FunctionWithCallOperator<Domain>, F>(),
int> = 0>
42 decltype(
auto) makeFunctionWithCallOperator(const F& f)
49 template<
class Domain,
class F,
50 std::enable_if_t<not models<FunctionWithCallOperator<std::decay_t<Domain> >, F>(),
int> = 0>
51#ifndef DUNE_DEPRECATED_INTERPOLATE_CHECK
52 [[deprecated(
"Passing functions only supporting 'f.evaluate(x,y)' to interpolate() is deprecated."
53 "Use functions supporting operator(), i.e. f(x) instead!")]]
55 decltype(
auto) makeFunctionWithCallOperator(
const F& f)
57 return [&](
auto&& x) {
58 typename std::decay_t<F>::Traits::RangeType y;
Infrastructure for concepts.
Dune namespace.
Definition: alignedallocator.hh:13