4 #ifndef DUNE_PDELAB_ORDERING_DECORATOR_HH
5 #define DUNE_PDELAB_ORDERING_DECORATOR_HH
7 #include <dune/typetree/typetree.hh>
24 template<
typename D,
typename U>
32 template<
typename DecoratedOrderingTag, std::
size_t level>
33 struct basetag_access_provider
38 template<
typename D,
typename U>
39 struct basetag_access_provider<decorated_ordering_tag<D,U>,0>
44 const BaseTag& baseTag()
const
56 template<
typename T, T v>
59 typedef integral_constant<T,v> type;
65 typedef integral_constant<std::size_t,D::level> type;
69 struct decoration_level
71 is_base_of<is_decorated, D>::value,
73 lazy_constant<std::size_t,0>
81 template<
typename D,
typename U>
84 , impl::basetag_access_provider<decorated_ordering_tag<D,U>,impl::decoration_level<U>::value>
99 #if HAVE_RVALUE_REFERENCES
105 #endif // HAVE_RVALUE_REFERENCES
110 template<
typename GFS,
typename Transformation,
typename Undecorated,
typename GlueTag,
typename Tag>
112 :
public TypeTree::meta_function
116 TypeTree::declptr<GFS>(),
117 TypeTree::declptr<Transformation>(),
118 TypeTree::declptr<Undecorated>(),
119 TypeTree::declptr<GlueTag>(),
120 TypeTree::declptr<Tag>()
126 template<
typename GFS,
typename Transformation,
typename OrderingTag>
132 typedef typename leaf_gfs_to_ordering_descriptor<
135 typename OrderingTag::Undecorated
145 typename OrderingTag::Decorator
153 return decorator_descriptor::transform(gfs,t,make_shared<undecorated_type>(undecorated_descriptor::transform(gfs,t)));
158 return decorator_descriptor::transform(gfs_pointer,t,undecorated_descriptor::transform(gfs_pointer,t));
163 template<
typename GFS,
typename Transformation,
typename D,
typename U>
164 leaf_gfs_to_decorated<GFS,Transformation,decorated_ordering_tag<D,U> >
168 template<
typename GFS,
typename Transformation,
typename OrderingTag>
174 template<
typename TC>
178 typedef typename power_gfs_to_ordering_descriptor<
181 typename OrderingTag::Undecorated
190 typename OrderingTag::Decorator
193 typedef typename decorator_descriptor::transformed_type
type;
194 typedef typename decorator_descriptor::transformed_storage_type
storage_type;
198 template<
typename TC>
199 static typename result<TC>::type transform(
const GFS& gfs,
const Transformation& t,
const array<shared_ptr<TC>,GFS::CHILDREN>& children)
204 template<
typename TC>
213 template<
typename GFS,
typename Transformation,
typename OrderingTag>
219 typedef typename power_gfs_to_ordering_descriptor<
222 typename OrderingTag::Undecorated
232 typename OrderingTag::Decorator
240 return decorator_descriptor::transform(gfs,t,make_shared<undecorated_type>(undecorated_descriptor::transform(gfs,t)));
245 return decorator_descriptor::transform(gfs_pointer,t,undecorated_descriptor::transform(gfs_pointer,t));
251 template<
typename GFS,
typename Transformation,
typename OrderingTag>
253 :
public std::conditional<
254 power_gfs_to_ordering_descriptor<
257 typename OrderingTag::Undecorated
259 recursive_power_gfs_to_decorated<
264 nonrecursive_power_gfs_to_decorated<
271 template<
typename GFS,
typename Transformation,
typename D,
typename U>
284 template<
typename GFS,
typename Transformation,
typename OrderingTag>
290 template<
typename... TC>
294 typedef typename composite_gfs_to_ordering_descriptor<
297 typename OrderingTag::Undecorated
306 typename OrderingTag::Decorator
309 typedef typename decorator_descriptor::transformed_type
type;
310 typedef typename decorator_descriptor::transformed_storage_type
storage_type;
314 template<
typename... TC>
315 static typename result<TC...>::type
transform(
const GFS& gfs,
const Transformation& t, shared_ptr<TC>... children)
320 template<
typename... TC>
321 static typename result<TC...>::storage_type
transform_storage(shared_ptr<const GFS> gfs_pointer,
const Transformation& t, shared_ptr<TC>... children)
329 template<
typename GFS,
typename Transformation,
typename OrderingTag>
335 typedef typename composite_gfs_to_ordering_descriptor<
338 typename OrderingTag::Undecorated
348 typename OrderingTag::Decorator
356 return decorator_descriptor::transform(gfs,t,make_shared<undecorated_type>(undecorated_descriptor::transform(gfs,t)));
361 return decorator_descriptor::transform(gfs_pointer,t,undecorated_descriptor::transform(gfs_pointer,t));
367 template<
typename GFS,
typename Transformation,
typename OrderingTag>
369 :
public std::conditional<
370 composite_gfs_to_ordering_descriptor<
373 typename OrderingTag::Undecorated
375 recursive_composite_gfs_to_decorated<
380 nonrecursive_composite_gfs_to_decorated<
388 template<
typename GFS,
typename Transformation,
typename D,
typename U>
399 #endif // DUNE_PDELAB_ORDERING_DECORATOR_HH
undecorated_descriptor::transformed_type undecorated_type
Definition: decorator.hh:341
decorator_descriptor::transformed_storage_type storage_type
Definition: decorator.hh:310
undecorated_descriptor::template result< TC >::type undecorated_type
Definition: decorator.hh:184
Definition: decorator.hh:127
undecorated_descriptor::transformed_type undecorated_type
Definition: decorator.hh:138
undecorated_descriptor::transformed_type undecorated_type
Definition: decorator.hh:225
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: decorator.hh:238
decorator_descriptor::transformed_type transformed_type
Definition: decorator.hh:351
Definition: decorator.hh:252
static result< TC >::storage_type transform_storage(shared_ptr< const GFS > gfs_pointer, const Transformation &t, const array< shared_ptr< TC >, GFS::CHILDREN > &children)
Definition: decorator.hh:205
decorator_descriptor::transformed_storage_type storage_type
Definition: decorator.hh:194
decorator_descriptor::transformed_type transformed_type
Definition: decorator.hh:148
decorated_ordering_tag()
Definition: decorator.hh:92
gfs_to_decorator_descriptor< GFS, Transformation, undecorated_type, OrderingTag, typename OrderingTag::Decorator >::type decorator_descriptor
Definition: decorator.hh:349
gfs_to_decorator_descriptor< GFS, Transformation, undecorated_type, OrderingTag, typename OrderingTag::Decorator >::type decorator_descriptor
Definition: decorator.hh:233
static transformed_storage_type transform(shared_ptr< const GFS > &gfs_pointer, const Transformation &t)
Definition: decorator.hh:243
composite_gfs_to_ordering_descriptor< GFS, Transformation, typename OrderingTag::Undecorated >::type undecorated_descriptor
Definition: decorator.hh:339
static result< TC...>::storage_type transform_storage(shared_ptr< const GFS > gfs_pointer, const Transformation &t, shared_ptr< TC >...children)
Definition: decorator.hh:321
Definition: decorator.hh:82
gfs_to_decorator_descriptor< GFS, Transformation, undecorated_type, OrderingTag, typename OrderingTag::Decorator >::type decorator_descriptor
Definition: decorator.hh:146
undecorated_descriptor::template result< TC...>::type undecorated_type
Definition: decorator.hh:300
Definition: decorator.hh:111
decorator_descriptor::transformed_type transformed_type
Definition: decorator.hh:235
static const bool recursive
Definition: decorator.hh:172
static result< TC >::type transform(const GFS &gfs, const Transformation &t, const array< shared_ptr< TC >, GFS::CHILDREN > &children)
Definition: decorator.hh:199
decorator_descriptor::transformed_storage_type transformed_storage_type
Definition: decorator.hh:236
leaf_gfs_to_decorated< GFS, Transformation, decorated_ordering_tag< D, U > > register_leaf_gfs_to_ordering_descriptor(GFS *, Transformation *, decorated_ordering_tag< D, U > *)
decorator_descriptor::transformed_storage_type transformed_storage_type
Definition: decorator.hh:149
D Decorator
Definition: decorator.hh:87
U Undecorated
Definition: decorator.hh:88
static const bool recursive
Definition: decorator.hh:288
gfs_to_permuted< GFS, Transformation, Undecorated, GlueTag > register_gfs_to_decorator_descriptor(GFS *, Transformation *, Undecorated *, GlueTag *, Permuted< UndecoratedTag > *)
composite_gfs_to_ordering_descriptor< GFS, Transformation, typename OrderingTag::Undecorated >::type undecorated_descriptor
Definition: decorator.hh:298
Definition: decorator.hh:291
static const bool recursive
Definition: decorator.hh:333
power_gfs_to_ordering_descriptor< GFS, Transformation, typename OrderingTag::Undecorated >::type undecorated_descriptor
Definition: decorator.hh:182
Definition: decorator.hh:169
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: decorator.hh:151
gfs_to_decorator_descriptor< GFS, Transformation, undecorated_type, OrderingTag, typename OrderingTag::Decorator >::type decorator_descriptor
Definition: decorator.hh:191
decorator_descriptor::transformed_storage_type transformed_storage_type
Definition: decorator.hh:352
Definition: decorator.hh:175
decorator_descriptor::transformed_type type
Definition: decorator.hh:193
static const unsigned int value
Definition: gridfunctionspace/tags.hh:175
leaf_gfs_to_ordering_descriptor< GFS, Transformation, typename OrderingTag::Undecorated >::type undecorated_descriptor
Definition: decorator.hh:136
power_gfs_to_ordering_descriptor< GFS, Transformation, typename OrderingTag::Undecorated >::type undecorated_descriptor
Definition: decorator.hh:223
decorated_ordering_tag(const Undecorated &u)
Definition: decorator.hh:95
Definition: decorator.hh:214
static transformed_storage_type transform(shared_ptr< const GFS > &gfs_pointer, const Transformation &t)
Definition: decorator.hh:156
static const bool recursive
Definition: decorator.hh:130
static const std::size_t level
Definition: decorator.hh:90
gfs_to_decorator_descriptor< GFS, Transformation, undecorated_type, OrderingTag, typename OrderingTag::Decorator >::type decorator_descriptor
Definition: decorator.hh:307
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: decorator.hh:354
static const bool recursive
Definition: decorator.hh:217
decorator_descriptor::transformed_type type
Definition: decorator.hh:309
power_gfs_to_decorated< GFS, Transformation, decorated_ordering_tag< D, U > > register_power_gfs_to_ordering_descriptor(GFS *, Transformation *, decorated_ordering_tag< D, U > *)
typedef DUNE_DECLTYPE(register_gfs_to_decorator_descriptor(TypeTree::declptr< GFS >(), TypeTree::declptr< Transformation >(), TypeTree::declptr< Undecorated >(), TypeTree::declptr< GlueTag >(), TypeTree::declptr< Tag >())) type
static result< TC...>::type transform(const GFS &gfs, const Transformation &t, shared_ptr< TC >...children)
Definition: decorator.hh:315
Definition: decorator.hh:330
Definition: decorator.hh:285
static transformed_storage_type transform(shared_ptr< const GFS > &gfs_pointer, const Transformation &t)
Definition: decorator.hh:359
composite_gfs_to_decorated< GFS, Transformation, decorated_ordering_tag< D, U > > register_composite_gfs_to_ordering_descriptor(GFS *, Transformation *, decorated_ordering_tag< D, U > *)
Definition: decorator.hh:368