AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
Order.hpp
1 #pragma once
2 
3 #include <type_traits>
4 
5 #include <amdis/common/ConceptsBase.hpp>
6 
7 namespace AMDiS
8 {
10  template <class F>
11  auto order(F const& f)
12  -> decltype(&F::operator(), f.order())
13  {
14  return f.order();
15  }
16 
17  namespace Concepts
18  {
23  namespace Definition
24  {
25  struct Polynomial
26  {
27  template <class F>
28  auto require(F&& f) -> decltype(
29  order(f)
30  );
31  };
32 
33  } // end namespace Definition
34 
36  template <class F>
37  constexpr bool Polynomial = models<Definition::Polynomial(F)>;
38 
39  template <class F>
40  using Polynomial_t = models_t<Definition::Polynomial(F)>;
41 
44  } // end namespace Concepts
45 } // end namespace AMDiS
constexpr bool Polynomial
Funcion F has free function order(F)
Definition: Order.hpp:37
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
auto order(F const &f) -> decltype(&F::operator(), f.order())
polynomial order of functions
Definition: Order.hpp:11