AMDiS  2.10
The Adaptive Multi-Dimensional Simulation Toolbox
Order.hpp
1 #pragma once
2 
3 #include <amdis/Output.hpp>
4 #include <amdis/common/Math.hpp>
5 #include <amdis/common/Apply.hpp>
6 
7 namespace AMDiS
8 {
10  template <class N,
11  class = typename N::NodeTag>
12  int order(N const& node)
13  {
14  if constexpr (N::isLeaf)
15  return node.finiteElement().localBasis().order();
16  else if constexpr (N::isPower)
17  return order(node.child(0u));
18  else if constexpr (N::isComposite)
19  return Ranges::applyIndices<std::size_t(N::degree())>([&](auto... ii) {
20  return Math::max(order(node.child(ii))...);
21  });
22  else {
23  warning("Unknown basis-node type. Assuming polynomial degree 1.");
24  return 1;
25  }
26  }
27 
28 } // end namespace AMDiS
Definition: AdaptBase.hpp:6