4#ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_TAGS_HH
5#define DUNE_PDELAB_GRIDFUNCTIONSPACE_TAGS_HH
7#include <dune/grid/common/gridenums.hh>
8#include <dune/typetree/utility.hh>
10#include <dune/pdelab/common/dofindex.hh>
11#include <dune/pdelab/common/simpledofindex.hh>
22 struct FunctionSpaceTag {};
24 struct GridFunctionSpaceTag :
public FunctionSpaceTag {};
26 struct PowerGridFunctionSpaceTag :
public GridFunctionSpaceTag {};
28 struct VectorGridFunctionSpaceTag :
public PowerGridFunctionSpaceTag {};
30 struct CompositeGridFunctionSpaceTag :
public GridFunctionSpaceTag {};
32 struct LeafGridFunctionSpaceTag :
public GridFunctionSpaceTag {};
34 template<
typename ProxiedGFSTag>
35 struct GridFunctionSubSpaceTag
36 :
public ProxiedGFSTag
102 : _offsets(sizes.size() + 1,0)
104 std::partial_sum(sizes.begin(),sizes.end(),_offsets.begin() + 1);
109 : _offsets(sizes.size() + 1,0)
111 std::partial_sum(sizes.begin(),sizes.end(),_offsets.begin() + 1);
115 const std::vector<std::size_t>&
offsets()
const
122 std::vector<std::size_t> _offsets;
129 static const bool no_const_ordering_size = v;
137 struct shift_if_nonnegative
139 static const unsigned int value = 1 << i;
143 struct shift_if_nonnegative<-1>
145 static const unsigned int value = 0;
155 template<
int p0 = -1,
int p1 = -1,
int p2 = -1,
int p3 = -1,
int p4 = -1>
159 static const unsigned int partition_mask =
160 shift_if_nonnegative<p0>::value |
161 shift_if_nonnegative<p1>::value |
162 shift_if_nonnegative<p2>::value |
163 shift_if_nonnegative<p3>::value |
164 shift_if_nonnegative<p4>::value;
182 template<
typename Params>
218 namespace Experimental {
220 struct DuneFunctionsCacheTag {};
224 template<
typename GFS,
typename Tag>
225 struct _build_dof_index_type
230 template<
typename GFS>
231 struct _build_dof_index_type<GFS,SingleCodimMapper>
233 typedef SimpleDOFIndex<typename GFS::Traits::SizeType> type;
237 template<
typename GFS>
238 struct build_dof_index_type
240 typedef typename _build_dof_index_type<GFS,typename GFS::OrderingTag>::type type;
262 template<
typename GFS>
267 typedef typename build_dof_index_type<GFS>::type DOFIndex;
A multi-index representing a degree of freedom in a GridFunctionSpace.
Definition: dofindex.hh:148
Dune namespace.
Definition: alignedallocator.hh:11
Tag for the intermediate base class of the CompositeGridFunctionSpace.
Definition: tags.hh:40
Tag denoting a CompositeLocalFunctionSpace.
Definition: tags.hh:197
Indicate blocking of the unknowns by grid entity.
Definition: tags.hh:53
Indicate interleaved ordering of the unknowns of non-leaf grid function spaces according to a given b...
Definition: tags.hh:79
InterleavedOrderingTag(std::vector< std::size_t > sizes)
Constructs an InterleavedOrderingTag with a block structure given by the std::vector sizes.
Definition: tags.hh:108
const std::vector< std::size_t > & offsets() const
Returns a list of offsets for the child blocks.
Definition: tags.hh:115
InterleavedOrderingTag(std::initializer_list< std::size_t > sizes)
Constructs an InterleavedOrderingTag with a block structure given by the initializer list sizes.
Definition: tags.hh:101
Tag denoting a LeafLocalFunctionSpace.
Definition: tags.hh:200
Tag indicating a standard ordering for a leaf GridfunctionSpace.
Definition: tags.hh:185
Indicate lexicographic ordering of the unknowns of non-leaf grid function spaces.
Definition: tags.hh:63
Mixin indicating whether a leaf GridFunctionSpace should never assume a const ordering size.
Definition: tags.hh:128
Helper for building the bitmask describing the grid partitions contained in a GFS.
Definition: tags.hh:157
Tag denoting a PowerLocalFunctionSpace.
Definition: tags.hh:194