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/compositenode.hh> 18 #include <dune/typetree/powernode.hh> 19 #include <dune/typetree/traversal.hh> 20 #include <dune/typetree/visitor.hh> 21 #include <dune/typetree/typetraits.hh> 31 template<
typename ChildOrdering, std::
size_t k>
33 :
public TypeTree::PowerNode<ChildOrdering,k>
35 typename ChildOrdering::Traits::DOFIndex,
36 typename ChildOrdering::Traits::ContainerIndex>
39 typedef TypeTree::PowerNode<ChildOrdering,k> NodeT;
41 typename ChildOrdering::Traits::DOFIndex,
42 typename ChildOrdering::Traits::ContainerIndex>
BaseT;
51 : NodeT(child_storage)
52 , BaseT(*this,container_blocked,nullptr)
57 return this->child(0).entitySet();
62 template<
typename GFS,
typename Transformation>
66 static const bool recursive =
true;
84 return std::make_shared<typename result<TC>::type>(children,gfs->backend().blocked(*gfs));
91 template<
typename GFS,
typename Transformation>
95 static const bool recursive =
false;
104 static transformed_type
transform(
const GFS& gfs,
const Transformation& t)
106 transformed_type r(make_tuple(std::make_shared<LocalOrdering>(LocalOrderingTransformation::transform(gfs,gfs_to_local_ordering<Transformation>()))),gfs.backend().blocked(gfs),
const_cast<GFS*
>(&gfs));
110 static transformed_storage_type
transform_storage(std::shared_ptr<const GFS> gfs,
const Transformation& t)
112 transformed_storage_type r(std::make_shared<transformed_type>(make_tuple(LocalOrderingTransformation::transform_storage(gfs,gfs_to_local_ordering<Transformation>())),gfs->backend().blocked(*gfs),
const_cast<GFS*
>(gfs.get())));
118 template<
typename GFS,
typename Transformation>
124 template<
typename... Children>
126 :
public TypeTree::CompositeNode<Children...>
127 ,
public LocalOrderingBase<typename first_type<Children...>::type::Traits::EntitySet,
128 typename first_type<Children...>::type::Traits::DOFIndex,
129 typename first_type<Children...>::type::Traits::ContainerIndex>
132 typedef TypeTree::CompositeNode<Children...> Node;
133 typedef LocalOrderingBase<
typename first_type<Children...>::type::Traits::EntitySet,
134 typename first_type<Children...>::type::Traits::DOFIndex,
135 typename first_type<Children...>::type::Traits::ContainerIndex>
Base;
145 , Base(*this,container_blocked,nullptr)
150 return this->
template child<0>().
entitySet();
156 template<
typename GFS,
typename Transformation>
160 static const bool recursive =
true;
162 template<
typename... TC>
169 template<
typename... TC>
170 static typename result<TC...>::type
transform(
const GFS& gfs,
const Transformation& t, std::shared_ptr<TC>... children)
175 template<
typename... TC>
176 static typename result<TC...>::storage_type
transform_storage(std::shared_ptr<const GFS> gfs,
const Transformation& t, std::shared_ptr<TC>... children)
178 return std::make_shared<
typename result<TC...>::type>(gfs.backend().blocked(*gfs),children...);
183 template<
typename GFS,
typename Transformation>
187 static const bool recursive =
false;
196 static transformed_type
transform(
const GFS& gfs,
const Transformation& t)
198 transformed_type r(make_tuple(std::make_shared<LocalOrdering>(LocalOrderingTransformation::transform(gfs,gfs_to_local_ordering<Transformation>()))),gfs.backend().blocked(gfs),
const_cast<GFS*
>(&gfs));
202 static transformed_storage_type
transform_storage(std::shared_ptr<const GFS> gfs,
const Transformation& t)
204 transformed_storage_type r(std::make_shared<transformed_type>(make_tuple(LocalOrderingTransformation::transform_storage(gfs,gfs_to_local_ordering<Transformation>())),gfs->backend().blocked(*gfs)),const_cast<GFS*>(gfs.get()));
210 template<
typename GFS,
typename Transformation>
219 #endif // DUNE_PDELAB_ORDERING_ENTITYBLOCKEDLOCALORDERING_HH Definition: ordering/utility.hh:208
Definition: entityblockedlocalordering.hh:32
CompositeEntityBlockedLocalOrdering< TC... > type
Definition: entityblockedlocalordering.hh:165
BaseT::Traits Traits
Definition: entityblockedlocalordering.hh:48
LocalOrderingTransformation::Type LocalOrdering
Definition: entityblockedlocalordering.hh:98
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:196
Definition: entityblockedlocalordering.hh:157
const Traits::EntitySet & entitySet() const
Definition: entityblockedlocalordering.hh:55
TypeTree::TransformTree< GFS, gfs_to_local_ordering< Transformation > > LocalOrderingTransformation
Definition: entityblockedlocalordering.hh:97
std::shared_ptr< type > storage_type
Definition: entityblockedlocalordering.hh:72
TypeTree::TransformTree< GFS, gfs_to_local_ordering< Transformation > > LocalOrderingTransformation
Definition: entityblockedlocalordering.hh:189
Indicate blocking of the unknowns by grid entity.
Definition: gridfunctionspace/tags.hh:53
static result< TC... >::type transform(const GFS &gfs, const Transformation &t, std::shared_ptr< TC >... children)
Definition: entityblockedlocalordering.hh:170
static result< TC >::type transform(const GFS &gfs, const Transformation &t, const std::array< std::shared_ptr< TC >, TypeTree::StaticDegree< GFS >::value > &children)
Definition: entityblockedlocalordering.hh:76
static const bool consume_tree_index
Definition: entityblockedlocalordering.hh:46
std::shared_ptr< type > storage_type
Definition: entityblockedlocalordering.hh:166
static transformed_storage_type transform_storage(std::shared_ptr< const GFS > gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:110
static result< TC... >::storage_type transform_storage(std::shared_ptr< const GFS > gfs, const Transformation &t, std::shared_ptr< TC >... children)
Definition: entityblockedlocalordering.hh:176
LocalOrderingTransformation::Type LocalOrdering
Definition: entityblockedlocalordering.hh:190
static result< TC >::storage_type transform_storage(std::shared_ptr< const GFS > gfs, const Transformation &t, const std::array< std::shared_ptr< TC >, TypeTree::StaticDegree< GFS >::value > &children)
Definition: entityblockedlocalordering.hh:82
power_gfs_to_entityblocked_ordering_descriptor< GFS, Transformation > register_power_gfs_to_ordering_descriptor(GFS *, Transformation *, EntityBlockedOrderingTag *)
static transformed_type transform(const GFS &gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:104
PowerEntityBlockedLocalOrdering(const typename NodeT::NodeStorage &child_storage, bool container_blocked)
Definition: entityblockedlocalordering.hh:50
Definition: localorderingbase.hh:19
const Traits::EntitySet & entitySet() const
Definition: entityblockedlocalordering.hh:148
std::shared_ptr< transformed_type > transformed_storage_type
Definition: entityblockedlocalordering.hh:194
Definition: entityblockedlocalordering.hh:184
GridViewOrdering< LocalOrdering > transformed_type
Definition: entityblockedlocalordering.hh:192
Definition: gridviewordering.hh:430
Definition: entityblockedlocalordering.hh:125
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
static transformed_storage_type transform_storage(std::shared_ptr< const GFS > gfs, const Transformation &t)
Definition: entityblockedlocalordering.hh:202
composite_gfs_to_entityblocked_ordering_descriptor< GFS, Transformation > register_composite_gfs_to_ordering_descriptor(GFS *, Transformation *, EntityBlockedOrderingTag *)
std::shared_ptr< transformed_type > transformed_storage_type
Definition: entityblockedlocalordering.hh:102
GridViewOrdering< LocalOrdering > transformed_type
Definition: entityblockedlocalordering.hh:100
Base::Traits Traits
Definition: entityblockedlocalordering.hh:139
PowerEntityBlockedLocalOrdering< TC, TypeTree::StaticDegree< GFS >::value > type
Definition: entityblockedlocalordering.hh:71
ES EntitySet
Definition: ordering/utility.hh:214
CompositeEntityBlockedLocalOrdering(bool container_blocked, std::shared_ptr< Children >... children)
Definition: entityblockedlocalordering.hh:143
Definition: entityblockedlocalordering.hh:92