Go to the documentation of this file.
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
const std::string & name() const
Definition: gridfunctionspacebase.hh:216
Mixin base class for specifying output hints to I/O routines like VTK.
Definition: function.hh:124
TypeTree::PowerNode< LeafGFS, k > BaseT
Definition: vectorgridfunctionspace.hh:110
Indicate lexicographic ordering of the unknowns of non-leaf grid function spaces.
Definition: gridfunctionspace/tags.hh:63
std::shared_ptr< Ordering > orderingStorage()
Direct access to the storage of the DOF ordering.
Definition: vectorgridfunctionspace.hh:233
tensorproduct space representing a vector valued function space
Definition: vectorgridfunctionspace.hh:57
Dune::PDELab::GridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, NoConstraints, LexicographicOrderingTag, DefaultLeafOrderingTag >, PowerCompositeGridFunctionSpaceTraits< impl::EntitySet< GV >, Backend, LexicographicOrderingTag, k > >::isRootSpace bool isRootSpace() const
Definition: gridfunctionspacebase.hh:246
std::shared_ptr< const Ordering > orderingStorage() const
Direct access to the storage of the DOF ordering.
Definition: vectorgridfunctionspace.hh:217
Ordering & ordering()
Direct access to the DOF ordering.
Definition: vectorgridfunctionspace.hh:201
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
const Ordering & ordering() const
Direct access to the DOF ordering.
Definition: vectorgridfunctionspace.hh:185
Mixin class providing common functionality of PowerGridFunctionSpace and CompositeGridFunctionSpace.
Definition: powercompositegridfunctionspacebase.hh:68
Definition: gridfunctionspacebase.hh:134
Dune::PDELab::GridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, NoConstraints, LexicographicOrderingTag, DefaultLeafOrderingTag >, PowerCompositeGridFunctionSpaceTraits< impl::EntitySet< GV >, Backend, LexicographicOrderingTag, k > >::update void update(bool force=false)
Update the indexing information of the GridFunctionSpace.
Definition: gridfunctionspacebase.hh:205
Definition: gridfunctionspace/tags.hh:28
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
LeafOrderingTag< EmptyParams > DefaultLeafOrderingTag
Definition: gridfunctionspace/tags.hh:187
A grid function space.
Definition: gridfunctionspace.hh:166
G EntitySet
Definition: powercompositegridfunctionspacebase.hh:45
TypeTree::TransformTree< VectorGridFunctionSpace, gfs_to_ordering< VectorGridFunctionSpace > > ordering_transformation
Definition: vectorgridfunctionspace.hh:128
Dune::PDELab::GridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, NoConstraints, LexicographicOrderingTag, DefaultLeafOrderingTag >, PowerCompositeGridFunctionSpaceTraits< impl::EntitySet< GV >, Backend, LexicographicOrderingTag, k > >::backend Traits::Backend & backend()
Definition: gridfunctionspacebase.hh:226
Definition: datahandleprovider.hh:187
Tag indicating a standard ordering for a leaf GridfunctionSpace.
Definition: gridfunctionspace/tags.hh:183
typename EntitySet::GridView GridView
Definition: powercompositegridfunctionspacebase.hh:47
std::string name() const
Definition: vectorgridfunctionspace.hh:168
Definition: exceptions.hh:34
PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace, impl::EntitySet< GV >, Backend, OrderingTag, k > ImplementationBase
Definition: vectorgridfunctionspace.hh:117
Dune::PDELab::PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, NoConstraints, LexicographicOrderingTag, DefaultLeafOrderingTag >, impl::EntitySet< GV >, Backend, LexicographicOrderingTag, k >::OrderingTag LexicographicOrderingTag OrderingTag
Definition: powercompositegridfunctionspacebase.hh:100
ordering_transformation::Type Ordering
Definition: vectorgridfunctionspace.hh:132
void name(std::string name)
Definition: vectorgridfunctionspace.hh:173
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
VectorGridFunctionSpaceTag ImplementationTag
Definition: vectorgridfunctionspace.hh:108
Trait class for the multi component grid function spaces.
Definition: powercompositegridfunctionspacebase.hh:34