4 #ifndef DUNE_PDELAB_ORDERING_ENTITYBLOCKEDLOCALORDERING_HH
5 #define DUNE_PDELAB_ORDERING_ENTITYBLOCKEDLOCALORDERING_HH
11 #include <dune/common/classname.hh>
12 #include <dune/common/exceptions.hh>
13 #include <dune/common/stdstreams.hh>
14 #include <dune/common/typetraits.hh>
15 #include <dune/common/deprecated.hh>
17 #include <dune/typetree/compositenodemacros.hh>
18 #include <dune/typetree/powernode.hh>
19 #include <dune/typetree/traversal.hh>
20 #include <dune/typetree/visitor.hh>
30 template<
typename ChildOrdering, std::
size_t k>
32 :
public TypeTree::PowerNode<ChildOrdering,k>
34 typename ChildOrdering::Traits::DOFIndex,
35 typename ChildOrdering::Traits::ContainerIndex>
38 typedef TypeTree::PowerNode<ChildOrdering,k> NodeT;
40 typename ChildOrdering::Traits::DOFIndex,
41 typename ChildOrdering::Traits::ContainerIndex>
BaseT;
50 : NodeT(child_storage)
51 ,
BaseT(*this,container_blocked,nullptr)
56 return this->child(0).gridView();
61 template<
typename GFS,
typename Transformation>
65 static const bool recursive =
true;
75 static typename result<TC>::type transform(
const GFS& gfs,
const Transformation& t,
const array<shared_ptr<TC>,GFS::CHILDREN>& children)
83 return make_shared<typename result<TC>::type>(children,gfs->backend().blocked(*gfs));
90 template<
typename GFS,
typename Transformation>
105 transformed_type r(make_tuple(make_shared<LocalOrdering>(LocalOrderingTransformation::transform(gfs,gfs_to_local_ordering<Transformation>()))),gfs.backend().blocked(gfs),
const_cast<GFS*
>(&gfs));
111 transformed_storage_type r(make_shared<transformed_type>(make_tuple(LocalOrderingTransformation::transform_storage(gfs,gfs_to_local_ordering<Transformation>())),gfs->backend().blocked(*gfs),
const_cast<GFS*
>(gfs.get())));
117 template<
typename GFS,
typename Transformation>
118 power_gfs_to_entityblocked_ordering_descriptor<GFS,Transformation>
123 template<DUNE_TYPETREE_COMPOSITENODE_TEMPLATE_CHILDREN>
125 :
public DUNE_TYPETREE_COMPOSITENODE_BASETYPE
126 ,
public LocalOrderingBase<typename DUNE_TYPETREE_COMPOSITENODE_FIRST_CHILD::Traits::GridView,
127 typename DUNE_TYPETREE_COMPOSITENODE_FIRST_CHILD::Traits::DOFIndex,
128 typename DUNE_TYPETREE_COMPOSITENODE_FIRST_CHILD::Traits::ContainerIndex>
131 typedef DUNE_TYPETREE_COMPOSITENODE_BASETYPE Node;
132 typedef LocalOrderingBase<
typename DUNE_TYPETREE_COMPOSITENODE_FIRST_CHILD::Traits::GridView,
133 typename DUNE_TYPETREE_COMPOSITENODE_FIRST_CHILD::Traits::DOFIndex,
134 typename DUNE_TYPETREE_COMPOSITENODE_FIRST_CHILD::Traits::ContainerIndex>
Base;
143 : Node(DUNE_TYPETREE_COMPOSITENODE_CHILDVARIABLES)
144 ,
Base(*this,container_blocked,nullptr)
149 return this->
template child<0>().
gridView();
155 template<
typename GFS,
typename Transformation>
159 static const bool recursive =
true;
161 template<
typename... TC>
168 template<
typename... TC>
169 static typename result<TC...>::type
transform(
const GFS& gfs,
const Transformation& t, shared_ptr<TC>... children)
174 template<
typename... TC>
175 static typename result<TC...>::storage_type
transform_storage(shared_ptr<const GFS> gfs,
const Transformation& t, shared_ptr<TC>... children)
177 return make_shared<
typename result<TC...>::type>(gfs.backend().blocked(*gfs),children...);
182 template<
typename GFS,
typename Transformation>
197 transformed_type r(make_tuple(make_shared<LocalOrdering>(LocalOrderingTransformation::transform(gfs,gfs_to_local_ordering<Transformation>()))),gfs.backend().blocked(gfs),
const_cast<GFS*
>(&gfs));
203 transformed_storage_type r(make_shared<transformed_type>(make_tuple(LocalOrderingTransformation::transform_storage(gfs,gfs_to_local_ordering<Transformation>())),gfs->backend().blocked(*gfs)),const_cast<GFS*>(gfs.get()));
209 template<
typename GFS,
typename Transformation>
210 composite_gfs_to_entityblocked_ordering_descriptor<GFS,Transformation>
218 #endif // DUNE_PDELAB_ORDERING_ENTITYBLOCKEDORDERING_HH
Indicate blocking of the unknowns by grid entity.
Definition: gridfunctionspace/tags.hh:49
LocalOrderingTransformation::Type LocalOrdering
Definition: entityblockedlocalordering.hh:189
static result< TC >::storage_type transform_storage(shared_ptr< const GFS > gfs, const Transformation &t, const array< shared_ptr< TC >, GFS::CHILDREN > &children)
Definition: entityblockedlocalordering.hh:81
static const bool recursive
Definition: entityblockedlocalordering.hh:94
const Traits::GridView & gridView() const
Definition: entityblockedlocalordering.hh:54
static result< TC...>::type transform(const GFS &gfs, const Transformation &t, shared_ptr< TC >...children)
Definition: entityblockedlocalordering.hh:169
LocalOrderingTransformation::Type LocalOrdering
Definition: entityblockedlocalordering.hh:97
Definition: ordering/utility.hh:208
composite_gfs_to_entityblocked_ordering_descriptor< GFS, Transformation > register_composite_gfs_to_ordering_descriptor(GFS *, Transformation *, EntityBlockedOrderingTag *)
power_gfs_to_entityblocked_ordering_descriptor< GFS, Transformation > register_power_gfs_to_ordering_descriptor(GFS *, Transformation *, EntityBlockedOrderingTag *)
TypeTree::TransformTree< GFS, gfs_to_local_ordering< Transformation > > LocalOrderingTransformation
Definition: entityblockedlocalordering.hh:188
shared_ptr< type > storage_type
Definition: entityblockedlocalordering.hh:71
const Traits::GridView & gridView() const
Definition: entityblockedlocalordering.hh:147
shared_ptr< transformed_type > transformed_storage_type
Definition: entityblockedlocalordering.hh:193
Definition: entityblockedlocalordering.hh:156
Definition: localorderingbase.hh:20
CompositeEntityBlockedLocalOrdering(bool container_blocked, DUNE_TYPETREE_COMPOSITENODE_STORAGE_CONSTRUCTOR_SIGNATURE)
Definition: entityblockedlocalordering.hh:142
Definition: entityblockedlocalordering.hh:124
Definition: entityblockedlocalordering.hh:31
shared_ptr< type > storage_type
Definition: entityblockedlocalordering.hh:165
PowerEntityBlockedLocalOrdering< TC, GFS::CHILDREN > type
Definition: entityblockedlocalordering.hh:70
CompositeEntityBlockedLocalOrdering< TC...> type
Definition: entityblockedlocalordering.hh:164
GV GridView
Definition: ordering/utility.hh:214
static const bool consume_tree_index
Definition: entityblockedlocalordering.hh:45
TypeTree::TransformTree< GFS, gfs_to_local_ordering< Transformation > > LocalOrderingTransformation
Definition: entityblockedlocalordering.hh:96
BaseT::Traits Traits
Definition: entityblockedlocalordering.hh:47
static transformed_storage_type transform_storage(shared_ptr< const GFS > gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:109
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:195
Definition: entityblockedlocalordering.hh:183
Base::Traits Traits
Definition: entityblockedlocalordering.hh:138
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:103
Definition: entityblockedlocalordering.hh:91
static result< TC >::type transform(const GFS &gfs, const Transformation &t, const array< shared_ptr< TC >, GFS::CHILDREN > &children)
Definition: entityblockedlocalordering.hh:75
GridViewOrdering< LocalOrdering > transformed_type
Definition: entityblockedlocalordering.hh:191
static const bool consume_tree_index
Definition: entityblockedlocalordering.hh:140
static const bool recursive
Definition: entityblockedlocalordering.hh:186
PowerEntityBlockedLocalOrdering(const typename NodeT::NodeStorage &child_storage, bool container_blocked)
Definition: entityblockedlocalordering.hh:49
shared_ptr< transformed_type > transformed_storage_type
Definition: entityblockedlocalordering.hh:101
Definition: gridviewordering.hh:420
GridViewOrdering< LocalOrdering > transformed_type
Definition: entityblockedlocalordering.hh:99
static result< TC...>::storage_type transform_storage(shared_ptr< const GFS > gfs, const Transformation &t, shared_ptr< TC >...children)
Definition: entityblockedlocalordering.hh:175
static transformed_storage_type transform_storage(shared_ptr< const GFS > gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:201