4#ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_POWERGRIDFUNCTIONSPACE_HH
5#define DUNE_PDELAB_GRIDFUNCTIONSPACE_POWERGRIDFUNCTIONSPACE_HH
10#include <dune/typetree/powernode.hh>
12#include <dune/pdelab/gridfunctionspace/powercompositegridfunctionspacebase.hh>
13#include <dune/pdelab/gridfunctionspace/datahandleprovider.hh>
14#include <dune/pdelab/gridfunctionspace/tags.hh>
37 template<
typename T, std::size_t k,
39 typename OrderingTag = LexicographicOrderingTag>
43 PowerGridFunctionSpace<T, k, Backend, OrderingTag>,
44 typename T::Traits::EntitySet,
48 ,
public DataHandleProvider<PowerGridFunctionSpace<T,k,Backend,OrderingTag> >
53 typedef PowerGridFunctionSpaceTag ImplementationTag;
61 typename T::Traits::EntitySet,
69 typename T::Traits::EntitySet,
74 template<typename,typename>
75 friend class GridFunctionSpaceBase;
78 gfs_to_ordering<PowerGridFunctionSpace>
83 typedef typename ordering_transformation::Type Ordering;
89 typedef typename std::conditional<
91 typename T::template ConstraintsContainer<E>::Type,
96 typename Ordering::Traits::DOFIndex,
97 typename Ordering::Traits::ContainerIndex,
118 PowerGridFunctionSpace(T& c,
const Backend& backend = Backend(),
const OrderingTag ordering_tag = OrderingTag())
120 , ImplementationBase(backend,ordering_tag)
125 const Backend& backend = Backend(),
126 const OrderingTag ordering_tag = OrderingTag())
128 , ImplementationBase(backend,ordering_tag)
134 const Backend& backend = Backend(),
135 const OrderingTag ordering_tag = OrderingTag())
137 , ImplementationBase(backend,ordering_tag)
144 const Backend& backend = Backend(),
145 const OrderingTag ordering_tag = OrderingTag())
147 , ImplementationBase(backend,ordering_tag)
155 const Backend& backend = Backend(),
156 const OrderingTag ordering_tag = OrderingTag())
157 : BaseT(c0,c1,c2,c3,c4)
158 , ImplementationBase(backend,ordering_tag)
167 const Backend& backend = Backend(),
168 const OrderingTag ordering_tag = OrderingTag())
169 : BaseT(c0,c1,c2,c3,c4,c5)
170 , ImplementationBase(backend,ordering_tag)
180 const Backend& backend = Backend(),
181 const OrderingTag ordering_tag = OrderingTag())
182 : BaseT(c0,c1,c2,c3,c4,c5,c6)
183 , ImplementationBase(backend,ordering_tag)
194 const Backend& backend = Backend(),
195 const OrderingTag ordering_tag = OrderingTag())
196 : BaseT(c0,c1,c2,c3,c4,c5,c6,c7)
197 , ImplementationBase(backend,ordering_tag)
209 const Backend& backend = Backend(),
210 const OrderingTag ordering_tag = OrderingTag())
211 : BaseT(c0,c1,c2,c3,c4,c5,c6,c7,c8)
212 , ImplementationBase(backend,ordering_tag)
225 const Backend& backend = Backend(),
226 const OrderingTag ordering_tag = OrderingTag())
227 : BaseT(c0,c1,c2,c3,c4,c5,c6,c7,c8,c9)
228 , ImplementationBase(backend,ordering_tag)
231 template<
typename Child0,
typename... Children>
233 : BaseT(child0, children...)
234 , ImplementationBase(Backend(),OrderingTag())
240 if (!this->isRootSpace())
243 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
256 if (!this->isRootSpace())
259 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
272 if (!this->isRootSpace())
275 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
288 if (!this->isRootSpace())
291 "Ordering can only be obtained for root space in GridFunctionSpace tree.");
305 void create_ordering()
const
310 mutable std::shared_ptr<Ordering> _ordering;
Definition: exceptions.hh:36
Mixin class providing common functionality of PowerGridFunctionSpace and CompositeGridFunctionSpace.
Definition: powercompositegridfunctionspacebase.hh:73
base class for tuples of grid function spaces product of identical grid function spaces base class th...
Definition: powergridfunctionspace.hh:49
Ordering & ordering()
Direct access to the DOF ordering.
Definition: powergridfunctionspace.hh:254
PowerGridFunctionSpace(const std::array< std::shared_ptr< T >, k > &container, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
Construct a new Power Grid Function Space object.
Definition: powergridfunctionspace.hh:113
std::shared_ptr< const Ordering > orderingStorage() const
Direct access to the storage of the DOF ordering.
Definition: powergridfunctionspace.hh:270
ImplementationBase::Traits Traits
export traits class
Definition: powergridfunctionspace.hh:104
const Ordering & ordering() const
Direct access to the DOF ordering.
Definition: powergridfunctionspace.hh:238
std::shared_ptr< Ordering > orderingStorage()
Direct access to the storage of the DOF ordering.
Definition: powergridfunctionspace.hh:286
Collect k instances of type T within a dune-typetree.
Definition: powernode.hh:50
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
void update(bool force=false)
Update the indexing information of the GridFunctionSpace.
Definition: gridfunctionspacebase.hh:259
Dune namespace.
Definition: alignedallocator.hh:11
Indicate lexicographic ordering of the unknowns of non-leaf grid function spaces.
Definition: tags.hh:63
Trait class for the multi component grid function spaces.
Definition: powercompositegridfunctionspacebase.hh:35
extract type for storing constraints
Definition: powergridfunctionspace.hh:88