4 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_VECTORGRIDFUNCTIONSPACE_HH 5 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_VECTORGRIDFUNCTIONSPACE_HH 10 #include <dune/common/shared_ptr.hh> 12 #include <dune/typetree/powernode.hh> 54 typename Constraints = NoConstraints,
55 typename OrderingTag = LexicographicOrderingTag,
58 :
public TypeTree::PowerNode<GridFunctionSpace<
103 template<
typename,
typename>
110 typedef TypeTree::PowerNode<LeafGFS,k>
BaseT;
126 typedef TypeTree::TransformTree<VectorGridFunctionSpace,
127 gfs_to_ordering<VectorGridFunctionSpace>
132 typedef typename ordering_transformation::Type
Ordering;
141 static typename BaseT::NodeStorage create_components(const typename Traits::EntitySet& es,
142 std::shared_ptr<const FEM> fem_ptr,
143 const LeafBackend& leaf_backend,
144 const LeafOrderingTag& leaf_ordering_tag)
146 typename BaseT::NodeStorage r;
147 for (std::size_t i = 0; i < k; ++i)
148 r[i] = std::make_shared<LeafGFS>(es,fem_ptr,leaf_backend,leaf_ordering_tag);
155 const Backend&
backend = Backend(),
const LeafBackend& leaf_backend = LeafBackend(),
157 :
BaseT(create_components(typename
Traits::EntitySet(gv),stackobject_to_shared_ptr(fem),leaf_backend,leaf_ordering_tag))
162 const Backend&
backend = Backend(),
const LeafBackend& leaf_backend = LeafBackend(),
164 :
BaseT(create_components(es,stackobject_to_shared_ptr(fem),leaf_backend,leaf_ordering_tag))
176 for (std::size_t i = 0; i < k; ++i)
178 std::stringstream ns;
179 ns <<
name <<
"_" << i;
180 this->child(i).name(ns.str());
190 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
206 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
222 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
238 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
252 void create_ordering()
const 254 _ordering = std::make_shared<Ordering>(ordering_transformation::transform(*
this));
257 mutable std::shared_ptr<Ordering> _ordering;
264 #endif // DUNE_PDELAB_GRIDFUNCTIONSPACE_VECTORGRIDFUNCTIONSPACE_HH A grid function space.
Definition: gridfunctionspace.hh:166
const std::string & name() const
Definition: gridfunctionspacebase.hh:216
void name(std::string name)
Definition: vectorgridfunctionspace.hh:173
std::string name() const
Definition: vectorgridfunctionspace.hh:168
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:246
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:161
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
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
G EntitySet
Definition: powercompositegridfunctionspacebase.hh:45
std::shared_ptr< Ordering > orderingStorage()
Direct access to the storage of the DOF ordering.
Definition: vectorgridfunctionspace.hh:233
TypeTree::TransformTree< VectorGridFunctionSpace, gfs_to_ordering< VectorGridFunctionSpace > > ordering_transformation
Definition: vectorgridfunctionspace.hh:128
LeafOrderingTag< EmptyParams > DefaultLeafOrderingTag
Definition: gridfunctionspace/tags.hh:187
tensorproduct space representing a vector valued function space
Definition: vectorgridfunctionspace.hh:57
std::shared_ptr< const Ordering > orderingStorage() const
Direct access to the storage of the DOF ordering.
Definition: vectorgridfunctionspace.hh:217
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:226
Definition: gridfunctionspacebase.hh:134
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:154
Definition: gridfunctionspace/tags.hh:28
Trait class for the multi component grid function spaces.
Definition: powercompositegridfunctionspacebase.hh:34
ordering_transformation::Type Ordering
Definition: vectorgridfunctionspace.hh:132
PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace, impl::EntitySet< GV >, Backend, OrderingTag, k > ImplementationBase
Definition: vectorgridfunctionspace.hh:117
typename EntitySet::GridView GridView
Definition: powercompositegridfunctionspacebase.hh:47
Definition: datahandleprovider.hh:187
Mixin base class for specifying output hints to I/O routines like VTK.
Definition: function.hh:124
Tag indicating a standard ordering for a leaf GridfunctionSpace.
Definition: gridfunctionspace/tags.hh:183
Definition: exceptions.hh:34
TypeTree::PowerNode< LeafGFS, k > BaseT
Definition: vectorgridfunctionspace.hh:110
const Ordering & ordering() const
Direct access to the DOF ordering.
Definition: vectorgridfunctionspace.hh:185
Ordering & ordering()
Direct access to the DOF ordering.
Definition: vectorgridfunctionspace.hh:201
VectorGridFunctionSpaceTag ImplementationTag
Definition: vectorgridfunctionspace.hh:108
Mixin class providing common functionality of PowerGridFunctionSpace and CompositeGridFunctionSpace.
Definition: powercompositegridfunctionspacebase.hh:68
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