AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
EntitySet.hpp
1#pragma once
2
3#include <dune/common/typeutilities.hh>
4#include <amdis/linearalgebra/Traits.hpp>
5
6namespace AMDiS
7{
8 namespace Impl
9 {
10 template <class Basis>
11 auto entitySetImpl(Basis const& basis, Dune::PriorityTag<2>)
12 -> decltype(basis.entitySet())
13 {
14 return basis.entitySet();
15 }
16
17 template <class Basis>
18 auto entitySetImpl(Basis const& basis, Dune::PriorityTag<1>)
19 {
20 return elements(basis.gridView(), BackendTraits::PartitionSet{});
21 }
22
23 } // end namespace Impl
24
26
32 template <class Basis>
33 auto entitySet(Basis const& basis)
34 {
35 return Impl::entitySetImpl(basis, Dune::PriorityTag<5>{});
36 }
37
38} // end namespace AMDiS