6#include <amdis/common/Index.hpp>
7#include <amdis/common/ConceptsBase.hpp>
17 template <
class F,
int... I>
18 auto require(F&& f, std::integer_sequence<int,I...>) ->
decltype( order(f, I...) );
22 template <
class F,
int N>
25 template <
class F,
int N>
26 using HasFunctorOrder_t = bool_t<HasFunctorOrder<F,N>>;
36 template <
class T, T value>
39 template <
class... Ts>
40 constexpr T operator()(Ts
const&... )
const
49 template <
class T, T value,
class... Int>
55 template <
class T, T value, std::
size_t J>
56 constexpr auto partial(StaticConstant<T,value>
const&, index_t<J>)
67 constexpr T
const& operator()(T
const& x)
const
72 friend constexpr int order(
Id const&,
int d)
77 friend auto partial(
Id const&, index_t<0>)
93 template <
class... Ts>
94 constexpr T
const& operator()(Ts
const&... )
const
103 template <
class T,
class... Int>
109 template <
class T, std::
size_t J>
110 constexpr auto partial(Constant<T>
const&, index_t<J>)
125 template <
class... Ts>
126 constexpr T
const& operator()(Ts
const&... )
const
135 template <
class T,
class... Int>
141 template <
class T, std::
size_t J>
142 constexpr auto partial(Reference<T>
const&, index_t<J>)
150 template <
class T0,
class... Ts>
151 inline constexpr decltype(
auto) get_element(index_t<0>, T0&& t0, Ts&&... )
156 template <std::size_t J,
class T0,
class... Ts>
157 inline constexpr decltype(
auto) get_element(index_t<J>, T0&& , Ts&&... ts)
159 static_assert(J <=
sizeof...(Ts),
"");
160 return get_element(index_t<J-1>{}, FWD(ts)...);
163 template <std::
size_t I>
166 template <
class... Ts>
167 constexpr auto&& operator()(Ts&&... args)
const
169 return get_element(index_t<I>{}, FWD(args)...);
173 template <std::size_t I,
class... Int>
174 constexpr int order(
Arg<I> const&, Int... orders)
176 return get_element(index_t<I>{}, orders...);
179 template <std::
size_t I, std::
size_t J>
180 constexpr auto partial(Arg<I>
const&, index_t<J>)
182 return StaticConstant<
int,(I==J ? 1 : 0)>{};
187 template <std::
size_t I>
190 template <
class T,
int N>
191 constexpr T
const& operator()(Dune::FieldVector<T,N>
const& vec)
const
196 friend constexpr int order(
Get const&,
int d)
204 explicit constexpr Get_(std::size_t i)
208 template <
class T,
int N>
209 constexpr T
const& operator()(Dune::FieldVector<T,N>
const& vec)
const
214 friend constexpr int order(
Get_ const&,
int d)
Definition: Basic.hpp:165
Functor representing a constant value.
Definition: Basic.hpp:88
Definition: Basic.hpp:203
Definition: Basic.hpp:189
(Unary-)Functor representing the identity
Definition: Basic.hpp:65
Functor representing a constant value.
Definition: Basic.hpp:120
Functor representing a static constant value.
Definition: Basic.hpp:38