3#ifndef DUNE_PDELAB_ORDERING_TRANSFORMATIONS_HH
4#define DUNE_PDELAB_ORDERING_TRANSFORMATIONS_HH
8#include <dune/typetree/traversal.hh>
9#include <dune/typetree/accumulate_static.hh>
11#include <dune/pdelab/common/typetraits.hh>
12#include <dune/pdelab/common/multiindex.hh>
13#include <dune/pdelab/gridfunctionspace/tags.hh>
14#include <dune/pdelab/gridfunctionspace/tags.hh>
33 struct extract_max_container_depth
36 typedef std::size_t result_type;
38 template<
typename Node,
typename TreePath>
41 static const bool value =
true;
44 template<
typename Node,
typename TreePath>
47 static const std::size_t result = Node::Traits::Backend::Traits::max_blocking_depth;
54 template<
typename RootGFS>
55 struct gfs_to_ordering
57 static const std::size_t ci_depth =
58 TypeTree::AccumulateValue<RootGFS,
59 extract_max_container_depth,
60 TypeTree::max<std::size_t>,
62 TypeTree::plus<std::size_t>
65 typedef typename gfs_to_lfs<RootGFS>::DOFIndex DOFIndex;
66 typedef MultiIndex<std::size_t,ci_depth> ContainerIndex;
70 template<
typename GlobalTransformation>
71 struct gfs_to_local_ordering
73 typedef typename GlobalTransformation::DOFIndex DOFIndex;
74 typedef typename GlobalTransformation::ContainerIndex ContainerIndex;
80 template<
typename GFS,
typename Transformation,
typename OrderingTag>
81 struct power_gfs_to_ordering_descriptor
82 :
public TypeTree::meta_function
85 register_power_gfs_to_ordering_descriptor(
86 TypeTree::declptr<GFS>(),
87 TypeTree::declptr<Transformation>(),
88 TypeTree::declptr<OrderingTag>()
93 template<
typename Gr
idFunctionSpace,
typename Params>
94 power_gfs_to_ordering_descriptor<
96 gfs_to_ordering<Params>,
97 typename GridFunctionSpace::OrderingTag
104 template<
typename GFS,
typename Transformation,
typename OrderingTag>
105 struct leaf_gfs_to_ordering_descriptor
106 :
public TypeTree::meta_function
109 register_leaf_gfs_to_ordering_descriptor(
110 TypeTree::declptr<GFS>(),
111 TypeTree::declptr<Transformation>(),
112 TypeTree::declptr<OrderingTag>()
117 template<
typename Gr
idFunctionSpace,
typename Params>
118 leaf_gfs_to_ordering_descriptor<
120 gfs_to_ordering<Params>,
128 template<
typename GFS,
typename Transformation,
typename OrderingTag>
129 struct composite_gfs_to_ordering_descriptor
130 :
public TypeTree::meta_function
133 register_composite_gfs_to_ordering_descriptor(
134 TypeTree::declptr<GFS>(),
135 TypeTree::declptr<Transformation>(),
136 TypeTree::declptr<OrderingTag>()
141 template<
typename Gr
idFunctionSpace,
typename Params>
142 composite_gfs_to_ordering_descriptor<
144 gfs_to_ordering<Params>,
145 typename GridFunctionSpace::OrderingTag
152 template<
typename GFS,
typename Transformation,
typename OrderingTag>
153 struct power_gfs_to_local_ordering_descriptor;
155 template<
typename GFS,
typename Params>
156 power_gfs_to_local_ordering_descriptor<
158 gfs_to_local_ordering<Params>,
159 typename GFS::OrderingTag
166 template<
typename GFS,
typename Transformation,
typename OrderingTag>
167 struct leaf_gfs_to_local_ordering_descriptor;
169 template<
typename GFS,
typename Params>
170 leaf_gfs_to_local_ordering_descriptor<
172 gfs_to_local_ordering<Params>,
173 typename GFS::Traits::OrderingTag
180 template<
typename GFS,
typename Transformation,
typename OrderingTag>
181 struct composite_gfs_to_local_ordering_descriptor;
183 template<
typename GFS,
typename Params>
184 composite_gfs_to_local_ordering_descriptor<
186 gfs_to_local_ordering<Params>,
187 typename GFS::OrderingTag
O OrderingTag
tag describing the ordering.
Definition: gridfunctionspace.hh:164
Dune namespace.
Definition: alignedallocator.hh:13