4 #ifndef DUNE_PDELAB_ORDERING_UTILITY_HH 5 #define DUNE_PDELAB_ORDERING_UTILITY_HH 36 struct update_direct_children
37 :
public TypeTree::DirectChildrenVisitor
38 ,
public TypeTree::DynamicTraversal
41 template<
typename GFS,
typename Child,
typename TreePath,
typename ChildIndex>
42 void afterChild(
const GFS& gfs, Child& child, TreePath tp, ChildIndex childIndex)
const 57 template<
typename DOFIndex,
typename SizeType,
typename IndexType>
58 static typename enable_if<
61 store(
DOFIndex& dof_index,
const GeometryType& gt, SizeType entity_index, IndexType tree_index)
64 dof_index.
entityIndex()[0] = GlobalGeometryTypeIndex::index(gt);
66 dof_index.
treeIndex().push_back(tree_index);
69 template<
typename DOFIndex,
typename SizeType,
typename IndexType>
70 static typename enable_if<
73 store(
DOFIndex& dof_index,
const GeometryType& gt, SizeType entity_index, IndexType tree_index)
75 dof_index.
entityIndex()[0] = GlobalGeometryTypeIndex::index(gt);
80 template<
typename DOFIndex,
typename SizeType,
typename IndexType>
81 static typename enable_if<
84 store(
DOFIndex& dof_index, SizeType gt_index, SizeType entity_index, IndexType tree_index)
89 dof_index.
treeIndex().push_back(tree_index);
92 template<
typename DOFIndex,
typename SizeType,
typename IndexType>
93 static typename enable_if<
96 store(
DOFIndex& dof_index, SizeType gt_index, SizeType entity_index, IndexType tree_index)
107 template<
typename Index>
110 return geometry_index[0];
113 template<
typename Index>
116 return geometry_index[1];
119 template<
typename Index,
typename SizeType>
120 static void store(Index& index,
const GeometryType& gt, SizeType entity_index)
122 index[0] = GlobalGeometryTypeIndex::index(gt);
123 index[1] = entity_index;
128 template<
typename DOFIndex>
131 return GeometryIndex::geometryType(dof_index.
entityIndex());
134 template<
typename DOFIndex>
137 return GeometryIndex::entityIndex(dof_index.
entityIndex());
145 template<
typename DOFIndex,
typename SizeType>
146 static void store(
DOFIndex& dof_index,
const GeometryType& gt, SizeType entity_index, SizeType tree_index)
148 dof_index = entity_index;
154 template<
typename DI,
typename CI>
169 template<
typename SizeType_,
typename CI>
185 template<
typename DI,
typename CI>
192 static const std::size_t max_dim = 32;
207 template<
typename ES,
typename DI,
typename CI>
219 template<
typename ES,
typename DI,
typename CI>
230 template<
typename DI,
typename CI>
243 template<
typename child_type>
245 :
public TypeTree::DirectChildrenVisitor
246 ,
public TypeTree::DynamicTraversal
249 template<
typename Node,
typename Child,
typename TreePath,
typename ChildIndex>
250 void afterChild(
const Node& node, Child& child, TreePath tp, ChildIndex child_index)
252 extract_child(node,child,child_index);
255 template<
typename Node,
typename Child,
typename ChildIndex>
256 typename enable_if<Node::has_dynamic_ordering_children>::type
259 _children[child_index] = &child;
262 template<
typename Node,
typename Child,
typename ChildIndex>
263 typename enable_if<!Node::has_dynamic_ordering_children>::type
269 : _children(children)
273 std::vector<child_type*>& _children;
325 return !operator==(r);
337 #endif // DUNE_PDELAB_ORDERING_UTILITY_HH
static enable_if< std::is_integral< IndexType >::value >::type store(DOFIndex &dof_index, const GeometryType >, SizeType entity_index, IndexType tree_index)
Definition: ordering/utility.hh:61
ES EntitySet
Definition: ordering/utility.hh:214
Definition: ordering/utility.hh:208
Indices are interleaved according to a user-supplied pattern ([i1,i2],[j1,j2] -> [i1,j1,i2,j2]).
Definition: ordering/utility.hh:26
EntityIndex & entityIndex()
Returns the index of the grid entity associated with the DOF.
Definition: dofindex.hh:257
SizeType_ SizeType
Definition: ordering/utility.hh:177
DI::size_type SizeType
Definition: ordering/utility.hh:201
static const unsigned int value
Definition: gridfunctionspace/tags.hh:177
CI ContainerIndex
Definition: ordering/utility.hh:175
Dummy iterator type over DOF indices.
Definition: ordering/utility.hh:288
static enable_if< !std::is_integral< IndexType >::value >::type store(DOFIndex &dof_index, SizeType gt_index, SizeType entity_index, IndexType tree_index)
Definition: ordering/utility.hh:96
Definition: ordering/utility.hh:54
static std::size_t entityIndex(const DOFIndex &dof_index)
Definition: ordering/utility.hh:135
DummyDOFIndexIterator & operator++()
Definition: ordering/utility.hh:293
Definition: ordering/utility.hh:244
DI::View::EntityIndex EntityIndexView
Definition: ordering/utility.hh:225
static void store(Index &index, const GeometryType >, SizeType entity_index)
Definition: ordering/utility.hh:120
DummyDOFIndexIterator & operator+=(size_type i)
Definition: ordering/utility.hh:298
SimpleDOFIndex< SizeType_ > DOFIndex
Definition: ordering/utility.hh:173
Definition: adaptivity.hh:27
enable_if< Node::has_dynamic_ordering_children >::type extract_child(const Node &node, Child &child, ChildIndex child_index)
Definition: ordering/utility.hh:257
static void store(DOFIndex &dof_index, const GeometryType >, SizeType entity_index, SizeType tree_index)
Definition: ordering/utility.hh:146
TreeIndex & treeIndex()
Returns the tuple of entity-local indices associated with the DOF.
Definition: dofindex.hh:269
SimpleDOFIndexAccessor DOFIndexAccessor
Definition: ordering/utility.hh:179
Lexicographically ordered ([i1,i2],[j1,j2] -> [i1,i2,j1,j2]).
Definition: ordering/utility.hh:25
static std::size_t geometryType(const DOFIndex &dof_index)
Definition: ordering/utility.hh:129
typename ES::GridView GridView
Definition: ordering/utility.hh:215
VirtualOrderingBase()
Definition: ordering/utility.hh:237
DI::size_type size_type
Definition: ordering/utility.hh:202
static std::size_t entityIndex(const Index &geometry_index)
Definition: ordering/utility.hh:114
DI::View::TreeIndex TreeIndexView
Definition: ordering/utility.hh:199
Definition: ordering/utility.hh:220
std::size_t SizeType
Definition: ordering/utility.hh:162
void afterChild(const Node &node, Child &child, TreePath tp, ChildIndex child_index)
Definition: ordering/utility.hh:250
bool operator!=(const DummyDOFIndexIterator &r) const
Definition: ordering/utility.hh:323
DI::View DOFIndexView
Definition: ordering/utility.hh:198
static std::size_t geometryType(const Index &geometry_index)
Definition: ordering/utility.hh:108
DummyDOFIndexIterator * operator->()
Definition: ordering/utility.hh:308
DI::TreeIndex TreeIndex
Definition: ordering/utility.hh:196
Index merging algorithm for global orderings.
Definition: ordering/utility.hh:21
extract_child_bases(std::vector< child_type * > &children)
Definition: ordering/utility.hh:268
enable_if<!Node::has_dynamic_ordering_children >::type extract_child(const Node &node, Child &child, ChildIndex child_index)
Definition: ordering/utility.hh:264
static enable_if< !std::is_integral< IndexType >::value >::type store(DOFIndex &dof_index, const GeometryType >, SizeType entity_index, IndexType tree_index)
Definition: ordering/utility.hh:73
DummyDOFIndexIterator & operator*()
Definition: ordering/utility.hh:303
DI DOFIndex
Definition: ordering/utility.hh:158
DummyDOFIndexIterator & treeIndex()
Definition: ordering/utility.hh:313
Definition: ordering/utility.hh:186
Define and register ordering related transformations. This header defines the two transformations gfs...
OrderingTraits< DI, CI > Traits
Definition: ordering/utility.hh:235
Definition: ordering/utility.hh:104
static enable_if< std::is_integral< IndexType >::value >::type store(DOFIndex &dof_index, SizeType gt_index, SizeType entity_index, IndexType tree_index)
Definition: ordering/utility.hh:84
Definition: ordering/utility.hh:231
void push_back(size_type i)
Definition: ordering/utility.hh:328
Definition: simpledofindex.hh:14
std::bitset< max_dim > CodimFlag
Definition: ordering/utility.hh:194
DI::EntityIndex EntityIndex
Definition: ordering/utility.hh:224
Definition: ordering/utility.hh:155
A multi-index representing a degree of freedom in a GridFunctionSpace.
Definition: dofindex.hh:146
type
Definition: ordering/utility.hh:24
DefaultDOFIndexAccessor DOFIndexAccessor
Definition: ordering/utility.hh:164
CI ContainerIndex
Definition: ordering/utility.hh:160
void clear()
Definition: dofindex.hh:250
bool operator==(const DummyDOFIndexIterator &r) const
Definition: ordering/utility.hh:318
Definition: ordering/utility.hh:142
std::size_t size_type
Definition: ordering/utility.hh:291