4 #ifndef DUNE_PDELAB_VECTORGRIDFUNCTIONSPACE_HH 5 #define DUNE_PDELAB_VECTORGRIDFUNCTIONSPACE_HH 10 #include <dune/common/shared_ptr.hh> 12 #include <dune/typetree/powernode.hh> 45 typename Constraints = NoConstraints,
46 typename OrderingTag = LexicographicOrderingTag,
49 :
public TypeTree::PowerNode<GridFunctionSpace<
94 template<
typename,
typename>
101 typedef TypeTree::PowerNode<LeafGFS,k>
BaseT;
111 VectorGridFunctionSpace,
117 typedef TypeTree::TransformTree<VectorGridFunctionSpace,
118 gfs_to_ordering<VectorGridFunctionSpace>
123 typedef typename ordering_transformation::Type
Ordering;
132 static typename BaseT::NodeStorage create_components(const typename Traits::EntitySet& es,
133 std::shared_ptr<const FEM> fem_ptr,
134 const LeafBackend& leaf_backend,
135 const LeafOrderingTag& leaf_ordering_tag)
137 typename BaseT::NodeStorage r;
138 for (std::size_t i = 0; i < k; ++i)
139 r[i] = std::make_shared<LeafGFS>(es,fem_ptr,leaf_backend,leaf_ordering_tag);
146 const Backend&
backend = Backend(),
const LeafBackend& leaf_backend = LeafBackend(),
147 const OrderingTag& ordering_tag =
OrderingTag(),
const LeafOrderingTag& leaf_ordering_tag = LeafOrderingTag())
148 : BaseT(create_components(typename
Traits::EntitySet(gv),stackobject_to_shared_ptr(fem),leaf_backend,leaf_ordering_tag))
149 , ImplementationBase(
backend,ordering_tag)
153 const Backend&
backend = Backend(),
const LeafBackend& leaf_backend = LeafBackend(),
154 const OrderingTag& ordering_tag =
OrderingTag(),
const LeafOrderingTag& leaf_ordering_tag = LeafOrderingTag())
155 : BaseT(create_components(es,stackobject_to_shared_ptr(fem),leaf_backend,leaf_ordering_tag))
156 , ImplementationBase(
backend,ordering_tag)
167 for (std::size_t i = 0; i < k; ++i)
169 std::stringstream ns;
170 ns << name <<
"_" << i;
171 this->child(i).name(ns.str());
181 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
197 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
213 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
229 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
243 void create_ordering()
const 245 _ordering = std::make_shared<Ordering>(ordering_transformation::transform(*
this));
248 mutable std::shared_ptr<Ordering> _ordering;
255 #endif // DUNE_PDELAB_VECTORGRIDFUNCTIONSPACE_HH
std::string name() const
Definition: vectorgridfunctionspace.hh:159
Dune::PDELab::GridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >, PowerCompositeGridFunctionSpaceTraits< impl::EntitySet< GV >, Backend, OrderingTag, k > >::backend Traits::Backend & backend()
Definition: gridfunctionspacebase.hh:227
Definition: exceptions.hh:34
LeafOrderingTag< EmptyParams > DefaultLeafOrderingTag
Definition: gridfunctionspace/tags.hh:225
const std::string & name() const
Definition: gridfunctionspacebase.hh:217
void name(std::string name)
Definition: vectorgridfunctionspace.hh:164
ordering_transformation::Type Ordering
Definition: vectorgridfunctionspace.hh:123
TypeTree::TransformTree< VectorGridFunctionSpace, gfs_to_ordering< VectorGridFunctionSpace > > ordering_transformation
Definition: vectorgridfunctionspace.hh:119
VectorGridFunctionSpaceTag ImplementationTag
Definition: vectorgridfunctionspace.hh:99
std::shared_ptr< const Ordering > orderingStorage() const
Direct access to the storage of the DOF ordering.
Definition: vectorgridfunctionspace.hh:208
Definition: adaptivity.hh:27
Definition: gridfunctionspace/tags.hh:28
PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace, impl::EntitySet< GV >, Backend, OrderingTag, k > ImplementationBase
Definition: vectorgridfunctionspace.hh:108
Definition: datahandleprovider.hh:188
std::shared_ptr< Ordering > orderingStorage()
Direct access to the storage of the DOF ordering.
Definition: vectorgridfunctionspace.hh:224
Mixin base class for specifying output hints to I/O routines like VTK.
Definition: function.hh:123
Trait class for the multi component grid function spaces.
Definition: powercompositegridfunctionspacebase.hh:34
VectorGridFunctionSpace(const typename Traits::GridView &gv, const FEM &fem, const Backend &backend=Backend(), const LeafBackend &leaf_backend=LeafBackend(), const OrderingTag &ordering_tag=OrderingTag(), const LeafOrderingTag &leaf_ordering_tag=LeafOrderingTag())
Definition: vectorgridfunctionspace.hh:145
TypeTree::PowerNode< LeafGFS, k > BaseT
Definition: vectorgridfunctionspace.hh:101
G EntitySet
Definition: powercompositegridfunctionspacebase.hh:45
typename EntitySet::GridView GridView
Definition: powercompositegridfunctionspacebase.hh:47
base class for tuples of grid function spaces product of identical grid function spaces base class th...
Definition: vectorgridfunctionspace.hh:48
Definition: gridfunctionspacebase.hh:134
Dune::PDELab::GridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >, PowerCompositeGridFunctionSpaceTraits< impl::EntitySet< GV >, Backend, OrderingTag, k > >::isRootSpace bool isRootSpace() const
Definition: gridfunctionspacebase.hh:247
const Ordering & ordering() const
Direct access to the DOF ordering.
Definition: vectorgridfunctionspace.hh:176
Mixin class providing common functionality of PowerGridFunctionSpace and CompositeGridFunctionSpace.
Definition: powercompositegridfunctionspacebase.hh:68
Dune::PDELab::GridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >, PowerCompositeGridFunctionSpaceTraits< impl::EntitySet< GV >, Backend, OrderingTag, k > >::update void update(bool force=false)
Update the indexing information of the GridFunctionSpace.
Definition: gridfunctionspacebase.hh:205
Ordering & ordering()
Direct access to the DOF ordering.
Definition: vectorgridfunctionspace.hh:192
VectorGridFunctionSpace(const typename Traits::EntitySet &es, const FEM &fem, const Backend &backend=Backend(), const LeafBackend &leaf_backend=LeafBackend(), const OrderingTag &ordering_tag=OrderingTag(), const LeafOrderingTag &leaf_ordering_tag=LeafOrderingTag())
Definition: vectorgridfunctionspace.hh:152
Dune::PDELab::PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >, impl::EntitySet< GV >, Backend, OrderingTag, k >::OrderingTag OrderingTag OrderingTag
Definition: powercompositegridfunctionspacebase.hh:100
A grid function space.
Definition: gridfunctionspace.hh:163