Commit 71cbbe25 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

range-type implementation updated

parent 429b8e53
......@@ -11,10 +11,12 @@ namespace AMDiS
namespace Impl
template <class Node, class R, bool isLeaf, bool isPower, bool isComposite>
template <class> struct always_false : std::false_type {};
template <class Node, class R, class NodeTag>
struct RangeTypeImpl
static_assert( isLeaf || isPower || isComposite, "Unknown node-type for range definition" );
static_assert( always_false<NodeTag>::value, "Unknown node-type for range definition" );
......@@ -31,14 +33,14 @@ namespace AMDiS
template <class Node, class R = double>
using RangeType_t =
typename Impl::RangeTypeImpl<Node, R, Node::isLeaf, Node::isPower, Node::isComposite>::type;
typename Impl::RangeTypeImpl<Node, R, typename Node::NodeTag>::type;
namespace Impl
// Leaf node
template <class Node, class R>
struct RangeTypeImpl<Node, R, true, false, false>
struct RangeTypeImpl<Node, R, Dune::TypeTree::LeafNodeTag>
using LocalBasis = typename Node::FiniteElement::Traits::LocalBasisType;
using T = typename LocalBasis::Traits::RangeType;
......@@ -47,7 +49,7 @@ namespace AMDiS
// Power node
template <class Node, class R>
struct RangeTypeImpl<Node, R, false, true, false>
struct RangeTypeImpl<Node, R, Dune::TypeTree::PowerNodeTag>
using ChildNode = typename Node::template Child<0>::type;
......@@ -66,7 +68,7 @@ namespace AMDiS
// Composite node
template <class Node, class R>
struct RangeTypeImpl<Node, R, false, false, true>
struct RangeTypeImpl<Node, R, Dune::TypeTree::CompositeNodeTag>
template <class Idx> struct RangeTypeGenerator;
template <std::size_t... I>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment