3 #ifndef DUNE_PDELAB_COMMON_GLOBALDOFINDEX_HH 4 #define DUNE_PDELAB_COMMON_GLOBALDOFINDEX_HH 13 template<
typename T, std::
size_t tree_n,
typename ID>
35 static const std::size_t max_depth = tree_n;
47 return _tree_index_view;
52 return View(_entity_id,_tree_index_view.back_popped());
62 << di._tree_index_view
69 return _tree_index_view.size();
75 : _entity_id(dof_index._entity_id)
76 , _tree_index_view(dof_index._tree_index.
view())
80 : _entity_id(dof_index._entity_id)
81 , _tree_index_view(dof_index._tree_index.
view(size))
84 View(
const EntityID& entity_id,
const TreeIndex& tree_index)
85 : _entity_id(entity_id)
86 , _tree_index_view(tree_index)
89 const EntityID& _entity_id;
90 TreeIndex _tree_index_view;
99 : _entity_id(entity_id)
100 , _tree_index(tree_index)
110 return View(*
this,size);
160 _entity_id == r._entity_id && _tree_index == r._tree_index;
166 return !(*
this == r);
172 return _tree_index.size();
178 TreeIndex _tree_index;
182 template<
typename T, std::
size_t n,
typename ID>
185 std::size_t seed = 0;
186 std::hash<ID> id_hasher;
187 hash_combine(seed,id_hasher(di.
entityID()));
199 #endif // DUNE_PDELAB_COMMON_GLOBALDOFINDEX_HH const EntityID & entityID() const
Definition: globaldofindex.hh:125
MultiIndex< T, tree_n >::View TreeIndex
Definition: globaldofindex.hh:38
void clear()
Definition: globaldofindex.hh:113
const EntityID & entityID() const
Definition: globaldofindex.hh:40
Definition: globaldofindex.hh:28
static const std::size_t max_depth
The maximum possible depth of the MultiIndex.
Definition: globaldofindex.hh:20
bool operator==(const GlobalDOFIndex &r) const
Tests whether two MultiIndices are equal.
Definition: globaldofindex.hh:157
std::size_t size() const
Definition: globaldofindex.hh:67
ID EntityID
Definition: globaldofindex.hh:22
EntityID & entityID()
Returns the index of the grid entity associated with the DOF.
Definition: globaldofindex.hh:120
const TreeIndex & treeIndex() const
Definition: globaldofindex.hh:45
std::size_t size() const
Definition: globaldofindex.hh:170
GlobalDOFIndex(const EntityID &entity_id, const TreeIndex &tree_index)
Definition: globaldofindex.hh:98
friend std::ostream & operator<<(std::ostream &s, const View &di)
Definition: globaldofindex.hh:55
TreeIndex::size_type size_type
Definition: globaldofindex.hh:25
View view() const
Definition: globaldofindex.hh:103
std::size_t hash_value(const DOFIndex< T, n1, n2 > &di)
Definition: dofindex.hh:334
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
MultiIndex< T, max_depth > TreeIndex
Definition: globaldofindex.hh:23
TreeIndex & treeIndex()
Definition: globaldofindex.hh:130
View view(std::size_t size) const
Definition: globaldofindex.hh:108
const TreeIndex & treeIndex() const
Definition: globaldofindex.hh:135
Definition: globaldofindex.hh:14
bool operator!=(const GlobalDOFIndex &r) const
Tests whether two MultiIndices are not equal.
Definition: globaldofindex.hh:164
View back_popped() const
Definition: globaldofindex.hh:50
GlobalDOFIndex()
Default constructor.
Definition: globaldofindex.hh:95
View view() const
Definition: multiindex.hh:171
const std::string s
Definition: function.hh:830
ID EntityID
Definition: globaldofindex.hh:37
T value_type
Definition: globaldofindex.hh:26