Dune Core Modules (2.9.0)

indexsets.hh
1 #ifndef DUNE_ALU3DGRIDINDEXSETS_HH
2 #define DUNE_ALU3DGRIDINDEXSETS_HH
3 
4 #include <vector>
5 
8 #include <dune/common/hash.hh>
9 
10 #include <dune/grid/common/grid.hh>
12 
13 #include "alu3dinclude.hh"
14 #include "topology.hh"
15 
16 #include "alu3diterators.hh"
17 
18 namespace Dune
19 {
20 
21  // External Forward Declarations
22  // -----------------------------
23 
24  template<int dim, int dimworld, ALU3dGridElementType, class >
25  class ALU3dGrid;
26 
27  template<int cd, int dim, class GridImp>
28  class ALU3dGridEntity;
29 
30 
31 
32  // ALU3dGridHierarchicIndexSet
33  // ---------------------------
34 
36  template<int dim, int dimworld, ALU3dGridElementType elType, class Comm >
38  : public IndexSet< ALU3dGrid< dim, dimworld, elType, Comm >, ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm > >
39  {
41 
43 
44  friend class ALU3dGrid<dim, dimworld, elType, Comm >;
45 
46  // constructor
48  : grid_( grid )
49  {}
50 
51  public:
52  typedef typename GridType::Traits::template Codim<0>::Entity EntityCodim0Type;
53 
55  template <class EntityType>
56  int index (const EntityType & ep) const
57  {
58  enum { cd = EntityType :: codimension };
59  return index<cd>(ep);
60  }
61 
63  template< int codim >
64  int index ( const typename GridType::Traits::template Codim< codim >::Entity &entity ) const
65  {
66  return entity.impl().getIndex();
67  }
68 
69  template< class Entity >
70  int subIndex ( const Entity &entity, int i, unsigned int codim ) const
71  {
72  return subIndex< Entity::codimension >( entity, i, codim );
73  }
74 
76  template< int cd >
77  int subIndex ( const typename GridType::Traits::template Codim< cd >::Entity &e, int i, unsigned int codim ) const
78  {
79  // call method subIndex on real implementation
80  return e.impl().subIndex( i, codim );
81  }
82 
85  int size ( GeometryType type ) const
86  {
87  if( elType == tetra && !type.isSimplex() ) return 0;
88  if( elType == hexa && !type.isCube() ) return 0;
89  // return size of hierarchic index set
90  return this->size(GridType::dimension-type.dim());
91  }
92 
94  int size ( int codim ) const
95  {
96  // return size of hierarchic index set
97  return grid_.hierSetSize(codim);
98  }
99 
101  const std::vector<GeometryType>& geomTypes (int codim) const
102  {
103  return grid_.geomTypes(codim);
104  }
105 
107  template <class EntityType>
108  bool contains (const EntityType &) const { return true; }
109 
110  private:
111  // our Grid
112  const GridType & grid_;
113  };
114 
119 
120  class ALUMacroKey : public ALU3DSPACE Key4<int>
121  {
122  typedef int A;
123  typedef ALUMacroKey ThisType;
124  typedef ALU3DSPACE Key4<A> BaseType;
125 
126  public:
127  ALUMacroKey() : BaseType(-1,-1,-1,-1) {}
128  ALUMacroKey(const A&a,const A&b,const A&c,const A&d) : BaseType(a,b,c,d) {}
129  ALUMacroKey(const ALUMacroKey & org ) : BaseType(org) {}
130  ALUMacroKey & operator = (const ALUMacroKey & org )
131  {
132  BaseType::operator = (org);
133  return *this;
134  }
135 
136  bool operator == (const ALUMacroKey & org) const
137  {
138  return ( (this->_a == org._a) &&
139  (this->_b == org._b) &&
140  (this->_c == org._c) &&
141  (this->_d == org._d) );
142  }
143 
144  // operator < is already implemented in BaseType
145  bool operator > (const ALUMacroKey & org) const
146  {
147  return ( (!this->operator == (org)) && (!this->operator <(org)) );
148  }
149 
150 
151  void extractKey(std::vector<int> &key) const
152  {
153  alugrid_assert ( key.size() == 4 );
154  key[0] = this->_a;
155  key[1] = this->_b;
156  key[2] = this->_c;
157  key[3] = this->_d;
158  }
159 
160  void print(std::ostream & out) const
161  {
162  out << "[" << this->_a << "," << this->_b << "," << this->_c << "," << this->_d << "]";
163  }
164 
165  inline friend std::size_t hash_value(const ALUMacroKey& arg)
166  {
167  std::size_t seed = 0;
168  hash_combine(seed,arg._a);
169  hash_combine(seed,arg._b);
170  hash_combine(seed,arg._c);
171  hash_combine(seed,arg._d);
172  return seed;
173  }
174  };
175 
176  // Class to provide global Ids for all entities in the
177  // grid. Global Ids depend on the macro Element that
178  // the current element descends from, the codimension
179  // and the level - this is usually created by the method
180  // createId
181  //
182  // The template parameter IntegerType allows to switch between
183  // more elements in the grid and a smaller size of the global Ids
184  template <class MacroKeyImp, class IntegerImp = uint>
185  class ALUGridId
186  {
187  public:
188  typedef IntegerImp IntegerType;
189 
190  private:
191 
192  MacroKeyImp key_;
193  IntegerType nChild_;
194  signed char codim_;
195  signed char level_;
196 
197  public:
198  ALUGridId() : key_()
199  , nChild_(0)
200  , codim_(-1)
201  , level_(-1)
202  {}
203 
204  explicit ALUGridId(const MacroKeyImp & key, const IntegerType nChild , const int codim, const int level)
205  : key_(key) , nChild_(nChild)
206  , codim_( codim )
207  , level_( level )
208  {}
209 
210  ALUGridId(const ALUGridId & org )
211  : key_(org.key_)
212  , nChild_(org.nChild_)
213  , codim_(org.codim_)
214  , level_(org.level_)
215  {}
216 
217  ALUGridId & operator = (const ALUGridId & org )
218  {
219  key_ = org.key_;
220  nChild_ = org.nChild_;
221  codim_ = org.codim_;
222  level_ = org.level_;
223  return *this;
224  }
225 
226  bool operator == (const ALUGridId & org) const
227  {
228  return equals(org);
229  }
230 
231  bool operator != (const ALUGridId & org) const
232  {
233  return ! equals(org);
234  }
235 
236  bool operator <= (const ALUGridId & org) const
237  {
238  if(equals(org)) return true;
239  else return lesser(org);
240  }
241 
242  bool operator >= (const ALUGridId & org) const
243  {
244  if(equals(org)) return true;
245  else return ! lesser(org);
246  }
247 
248  bool operator < (const ALUGridId & org) const
249  {
250  return lesser(org);
251  }
252 
253  bool operator > (const ALUGridId & org) const
254  {
255  return (!equals(org) && ! lesser(org));
256  }
257 
258  const MacroKeyImp & getKey() const { return key_; }
259  IntegerType nChild() const { return nChild_; }
260  int codim() const { return int(codim_) ; }
261  int level() const { return int(level_) ; }
262 
263  bool isValid () const
264  {
265  return ( (codim_ >= 0) && (level_ >= 0) );
266  }
267 
268  void reset()
269  {
270  nChild_ = 0;
271  codim_ = -1;
272  level_ = -1;
273  }
274 
275  void print(std::ostream & out) const
276  {
277  out << "AluGridID: (" << getKey() << "," << nChild_ << "," << int(codim_) << "," << int(level_) << ")";
278  }
279 
280  inline friend std::size_t hash_value(const ALUGridId& arg)
281  {
282  std::size_t seed = hash<MacroKeyImp>()(arg.getKey());
283  hash_combine(seed,arg.nChild_);
284  hash_combine(seed,arg.codim_);
285  hash_combine(seed,arg.level_);
286  return seed;
287  }
288 
289  protected:
290  // returns true is the id is lesser then org
291  bool lesser(const ALUGridId & org) const
292  {
293  if(getKey() < org.getKey() ) return true;
294  if(getKey() > org.getKey() ) return false;
295  if(getKey() == org.getKey() )
296  {
297  if(nChild_ == org.nChild_)
298  {
299  if( codim_ == org.codim_)
300  return level_ < org.level_;
301  return codim_ < org.codim_;
302  }
303  else
304  return nChild_ < org.nChild_;
305  }
306  alugrid_assert ( equals(org) );
307  return false;
308  }
309 
310  // returns true if this id equals org
311  bool equals(const ALUGridId & org) const
312  {
313  return ( (getKey() == org.getKey() ) && (nChild_ == org.nChild_)
314  && (codim_ == org.codim_) && (level_ == org.level_) );
315  }
316  };
317 
318 } // drop out of namespace Dune, as hash definitions have to be done in global namespace
319 
321 DUNE_DEFINE_HASH(DUNE_HASH_TEMPLATE_ARGS(typename MacroKeyImp),DUNE_HASH_TYPE(Dune::ALUGridId<MacroKeyImp>))
322 
323 namespace Dune {
324 
325  inline std::ostream& operator<< (std::ostream& s, const ALUMacroKey & key)
326  {
327  key.print(s);
328  return s;
329  }
330 
331  template <class KeyImp>
332  inline std::ostream& operator<< (std::ostream& s, const ALUGridId<KeyImp> & id)
333  {
334  id.print(s);
335  return s;
336  }
337 
338 
339 
340  // ALU3dGlobalIdSet
341  // ----------------
342 
343  template<int dim, int dimworld, ALU3dGridElementType elType, class Comm >
344  class ALU3dGridGlobalIdSet
345  : public IdSet< ALU3dGrid< dim, dimworld, elType, Comm >, ALU3dGridGlobalIdSet< dim, dimworld, elType, Comm >,
346  ALUGridId< ALUMacroKey > >,
347  public ALU3DSPACE AdaptRestrictProlongType
348  {
349  typedef ALU3dGrid< dim, dimworld, elType, Comm > GridType;
350  typedef typename GridType::HierarchicIndexSet HierarchicIndexSetType;
351 
352  typedef ALU3dImplTraits< elType, Comm > ImplTraitsType;
353  typedef typename ImplTraitsType::IMPLElementType IMPLElementType;
354  typedef typename ImplTraitsType::GEOElementType GEOElementType;
355  typedef typename ImplTraitsType::GEOFaceType GEOFaceType;
356  typedef typename ImplTraitsType::GEOEdgeType GEOEdgeType;
357 
358  typedef typename ImplTraitsType::GitterImplType GitterImplType;
359 
360  typedef typename ImplTraitsType::HElementType HElementType;
361  typedef typename ImplTraitsType::HFaceType HFaceType;
362  typedef typename ImplTraitsType::HEdgeType HEdgeType;
363  typedef typename ImplTraitsType::VertexType VertexType;
364  typedef typename ImplTraitsType::HBndSegType HBndSegType;
365 
366  typedef EntityCount< elType > EntityCountType;
367 
368  using ALU3DSPACE AdaptRestrictProlongType::postRefinement;
369  using ALU3DSPACE AdaptRestrictProlongType::preCoarsening;
370 
371  public:
372  typedef ALUGridId< ALUMacroKey > IdType;
373 
374  private:
375  typedef ALUMacroKey MacroKeyType;
376 
377  typedef ALUGridId < MacroKeyType > MacroIdType;
378  enum { numCodim = 4 }; // we are always using the 3d grid here
379 
380  typedef typename GridType::Traits::template Codim<0>::Entity EntityCodim0Type;
381 
382  private:
383  mutable std::map< int , IdType > ids_[ numCodim ];
384 
385  // our Grid
386  const GridType & grid_;
387 
388  // the hierarchicIndexSet
389  const HierarchicIndexSetType & hset_;
390 
391  int vertexKey_[4];
392 
393  enum { startOffSet_ = 0 };
394 
395  typedef typename std::array<int,4> AT;
396 
397  //This offset yields the amount of (or an upper bound for) the lower-dimensional entities that are created
398  // Example first entry (dim 3 - hexa)
399  // A cube creates 8 cubes, 12 inner faces, 6 inner edges, 1 inner vertex
400  //
401  // For the 2d case the first and second entry coincide, because the 3d grid is just an extended 2d grid
402  const std::array<std::array<int, 4>, 4> offset = (dim == 3) ?
403  ( (elType == hexa) ?
404  std::array<AT,4>{{AT{{8,12,6,1}},AT{{-1,4,4,1}}, AT{{-1,-1,2,1}}, AT{{-1,-1,-1,1}}}}:
405  std::array<AT,4>{{AT{{8,8,1,0}}, AT{{-1,4,3,0}}, AT{{-1,-1,2,1}}, AT{{-1,-1,-1,1}}}}
406  ) : (
407  (elType == hexa) ?
408  std::array<AT,4>{{AT{{4,4,1,0}},AT{{-1,4,4,1}}, AT{{-1,-1,2,1}}, AT{{-1,-1,-1,1}}}}:
409  std::array<AT,4>{{AT{{4,3,0,0}}, AT{{-1,4,3,0}}, AT{{-1,-1,2,1}}, AT{{-1,-1,-1,1}}}}
410  );
411  // nChildren is actually 4 for dim = 2
412  // but the other values would have to be computed exactly
413  // so we use an upper bound (5)
414  const int nChildren = ( dim == 3) ? 8 : 5;
415  const std::array<int, 4> nEntitiesFactor = ( (elType == hexa) ? AT{{1, 3 , 3, 1}} : AT{{1, 2, 2, 1}} );
416 
417  public:
418 
421  using IdSet < GridType , ALU3dGridGlobalIdSet, IdType > :: subId;
422 
424  ALU3dGridGlobalIdSet(const GridType & grid);
425 
426  virtual ~ALU3dGridGlobalIdSet() {}
427 
428  // update id set after adaptation
429  void updateIdSet();
430 
431  // print all ids
432  void print () const;
433 
434  template <class IterType>
435  void checkId(const IdType & macroId, const IterType & idIter) const //int codim , unsigned int num ) const
436  {
437 
438  IdType id = getId(macroId);
439  for(int i=0 ;i<numCodim; ++i)
440  {
441  typedef typename std::map<int,IdType>::iterator IteratorType;
442  IteratorType end = ids_[i].end();
443  for(IteratorType it = ids_[i].begin(); it != end; ++it)
444  {
445  if(idIter == it) continue;
446  const IdType & checkMId = (*it).second;
447  IdType checkId = getId(checkMId);
448  if( id == checkId )
449  {
450  //std::cout << "Check(codim,num = " << codim<< "," << num <<") failed for k="<<k << " codim = " << i << "\n";
451  std::cout << id << " equals " << checkId << std::endl;
452  std::cout << idIter->first << " != " << it->first << std::endl;
453  alugrid_assert ( id != checkId );
454  DUNE_THROW(GridError," " << id << " equals " << checkId << "\n");
455  }
456  else
457  {
458  bool lesser = (id < checkId);
459  bool greater = (id > checkId);
460  alugrid_assert ( lesser != greater );
461  if( lesser == greater )
462  {
463  alugrid_assert ( lesser != greater );
464  DUNE_THROW(GridError," lesser equals greater of one id ");
465  }
466  }
467  }
468  }
469  }
470 
471  // check id set for uniqueness
472  void uniquenessCheck() const;
473 
474  void setChunkSize( int chunkSize ) {}
475 
476  // creates the id set
477  void buildIdSet ();
478 
479  IdType buildMacroVertexId(const VertexType & item );
480 
481  IdType buildMacroEdgeId(const HEdgeType & item );
482 
483  IdType buildMacroFaceId(const HFaceType & item );
484 
485  IdType buildMacroElementId(const HElementType & item );
486 
487  // The items of each codimLevel are numbered consecutively
488  // For a level l we have (Note that we are in the interior of a macro element):
489  //
490  // The entries are sorted by creator codim
491  template <int cd, class Item>
492  IdType createId(const Item& item , const IdType& creatorId , int nChild )
493  {
494  alugrid_assert ( creatorId.isValid() );
495 
496 
497  const int level = creatorId.level();
498  const typename IdType::IntegerType nElements = std::pow(nChildren,level);
499  const int creatorNumber = creatorId.nChild();
500  const int creatorCodim = creatorId.codim();
501  const int childOffSet = offset[creatorCodim][cd];
502 
503  alugrid_assert ( nChild < childOffSet );
504  alugrid_assert ( (unsigned int)creatorNumber < nEntitiesFactor[creatorCodim] * nElements );
505 
506  typename IdType::IntegerType newChild = creatorNumber * childOffSet + nChild;
507  for(int i=cd ; i > creatorCodim ; i--)
508  {
509  newChild += nEntitiesFactor[i] * nElements * offset[i][cd];
510  }
511 
512  IdType newId( creatorId.getKey() , newChild , cd, level + 1 );
513  alugrid_assert( newId.isValid() );
514  alugrid_assert( newId != creatorId );
515  return newId;
516  }
517 
518  // build ids for all children of this element
519  void buildElementIds(const HElementType & item , const IdType & macroId , int nChild);
520 
521  // build ids for all children of this element
522  void buildInteriorElementIds(const HElementType & item , const IdType & fatherId);
523 
524  // build ids for all children of this face
525  void buildFaceIds(const HFaceType & face, const IdType & fatherId , int innerFace );
526 
527  // build ids for all children of this face
528  void buildInteriorFaceIds(const HFaceType & face, const IdType & faceId);
529 
530  // build ids for all children of this edge
531  void buildEdgeIds(const HEdgeType & edge, const IdType & fatherId , int inneredge);
532 
533  void buildInteriorEdgeIds(const HEdgeType & edge, const IdType & edgeId);
534 
535  // build id for this vertex
536  void buildVertexIds(const VertexType & vertex, const IdType & fatherId );
537 
538  friend class ALU3dGrid< dim, dimworld, elType, Comm >;
539 
540  const IdType & getId(const IdType & macroId) const
541  {
542  return macroId;
543  }
544 
545  public:
547  template <class EntityType>
548  IdType id (const EntityType & ep) const
549  {
550  enum { codim = ( dim == EntityType :: codimension ) ? 3 : EntityType :: codimension };
551  alugrid_assert ( ids_[codim].find( hset_.index(ep) ) != ids_[codim].end() );
552  const IdType & macroId = ids_[codim][hset_.index(ep)];
553  alugrid_assert ( macroId.isValid() );
554  return getId(macroId);
555  }
556 
558  template <int cd>
559  IdType id (const typename GridType:: template Codim<cd> :: Entity & ep) const
560  {
561  const unsigned int codim = ( dim == cd ) ? 3 : cd ;
562  alugrid_assert ( ids_[codim].find( hset_.index(ep) ) != ids_[codim].end() );
563  const IdType & macroId = ids_[codim][hset_.index(ep)];
564  alugrid_assert ( macroId.isValid() );
565  return getId(macroId);
566  }
567 
569  IdType subId ( const EntityCodim0Type &e, int i, unsigned int codim ) const
570  {
571  const int hIndex = hset_.subIndex( e, i, codim );
572  // idCodim is the codim used in the id storage which relates to the 3d grid
573  const unsigned int idCodim = ( dim == codim ) ? 3 : codim ;
574  alugrid_assert ( ids_[ idCodim ].find( hIndex ) != ids_[ idCodim ].end() );
575  const IdType &macroId = ids_[ idCodim ][ hIndex ];
576  alugrid_assert ( macroId.isValid() );
577  return getId( macroId );
578  }
579 
580  // create ids for refined elements
581  int postRefinement( HElementType & item );
582 
583  // dummy functions
584  int preCoarsening( HElementType & elem );
585 
586  // dummy functions
587  int preCoarsening ( HBndSegType & el );
588 
590  int postRefinement ( HBndSegType & el );
591 
592  };
593 
594  //***********************************************************
595  //
596  // --LocalIdSet
597  //
598  //***********************************************************
599 
601  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm >
602  class ALU3dGridLocalIdSet
603  : public IdSet< ALU3dGrid< dim, dimworld, elType, Comm >, ALU3dGridLocalIdSet< dim, dimworld, elType, Comm >, int >,
604  public ALU3DSPACE AdaptRestrictProlongType
605  {
606  typedef ALU3dGridLocalIdSet< dim, dimworld, elType, Comm > This;
607 
608  typedef ALU3dImplTraits< elType, Comm > ImplTraitsType;
609  typedef typename ImplTraitsType::HElementType HElementType;
610  typedef typename ImplTraitsType::HBndSegType HBndSegType;
611 
612  typedef ALU3dGrid< dim, dimworld, elType, Comm > GridType;
613  typedef typename GridType::HierarchicIndexSet HierarchicIndexSetType;
614 
615  // this means that only up to 300000000 entities are allowed
616  enum { codimOffSet = 300000000 };
617  typedef typename GridType::Traits::template Codim<0>::Entity EntityCodim0Type;
618 
619  // create local id set , only for the grid allowed
620  ALU3dGridLocalIdSet(const GridType & grid) : hset_(grid.hierarchicIndexSet())
621  {
622  for( int codim = 0; codim <= GridType::dimension; ++codim )
623  codimStart_[ codim ] = codim * codimOffSet;
624  }
625 
626  friend class ALU3dGrid< dim, dimworld, elType, Comm >;
627 
628  // fake method to have the same method like GlobalIdSet
629  void updateIdSet() {}
630 
631  using ALU3DSPACE AdaptRestrictProlongType :: postRefinement ;
632  using ALU3DSPACE AdaptRestrictProlongType :: preCoarsening ;
633 
634  public:
636  typedef int IdType;
637 
640  using IdSet < GridType , ALU3dGridLocalIdSet, IdType > :: subId;
641 
643  template <class EntityType>
644  int id (const EntityType & ep) const
645  {
646  enum { cd = EntityType :: codimension };
647  alugrid_assert ( hset_.size(cd) < codimOffSet );
648  return codimStart_[cd] + hset_.index(ep);
649  }
650 
652  template <int codim>
653  int id (const typename GridType:: template Codim<codim> :: Entity & ep) const
654  {
655  //enum { cd = EntityType :: codimension };
656  alugrid_assert ( hset_.size(codim) < codimOffSet );
657  return codimStart_[codim] + hset_.index(ep);
658  }
659 
661  IdType subId ( const EntityCodim0Type &e, int i, unsigned int codim ) const
662  {
663  alugrid_assert ( hset_.size( codim ) < codimOffSet );
664  return codimStart_[ codim ] + hset_.subIndex( e, i, codim );
665  }
666 
667  // dummy functions
668  int preCoarsening( HElementType & elem ) { return 0; }
669  // create ids for refined elements
670  int postRefinement( HElementType & item ) { return 0; }
671 
672  // dummy functions
673  int preCoarsening ( HBndSegType & el ) { return 0; }
674 
676  int postRefinement ( HBndSegType & el ) { return 0; }
677 
678  void setChunkSize( int chunkSize ) {}
679 
680  private:
681  // our HierarchicIndexSet
682  const HierarchicIndexSetType & hset_;
683 
684  // store start of each codim numbers
685  int codimStart_[ GridType::dimension+1 ];
686  };
687 
688 } // end namespace Dune
689 
690 #if COMPILE_ALUGRID_INLINE
691  #include "indexsets.cc"
692 #endif
693 #endif // #ifndef DUNE_ALU3DGRIDINDEXSETS_HH
Portable very large unsigned integers.
hierarchic index set of ALU3dGrid
Definition: indexsets.hh:39
int size(GeometryType type) const
Definition: indexsets.hh:85
int size(int codim) const
return size of indexset, i.e. maxindex+1
Definition: indexsets.hh:94
bool contains(const EntityType &) const
return true because all entities are contained in this set
Definition: indexsets.hh:108
int index(const EntityType &ep) const
return hierarchic index of given entity
Definition: indexsets.hh:56
int index(const typename GridType::Traits::template Codim< codim >::Entity &entity) const
return hierarchic index of given entity
Definition: indexsets.hh:64
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: indexsets.hh:101
int subIndex(const typename GridType::Traits::template Codim< cd >::Entity &e, int i, unsigned int codim) const
return subIndex i of given entity for subEntity with codim
Definition: indexsets.hh:77
[ provides Dune::Grid ]
Definition: grid.hh:434
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: grid.hh:1066
Wrapper class for entities.
Definition: entity.hh:66
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:125
constexpr unsigned int dim() const
Return dimension of the type.
Definition: type.hh:371
constexpr bool isCube() const
Return true if entity is a cube of any dimension.
Definition: type.hh:335
constexpr bool isSimplex() const
Return true if entity is a simplex of any dimension.
Definition: type.hh:330
Index Set Interface base class.
Definition: indexidset.hh:78
Different resources needed by all grid implementations.
topology of a Cartesian grid
#define DUNE_THROW(E, m)
Definition: exceptions.hh:218
constexpr GeometryType vertex
GeometryType representing a vertex.
Definition: type.hh:506
constexpr auto equals(T1 &&t1, T2 &&t2)
Equality comparison.
Definition: hybridutilities.hh:402
EnableIfInterOperable< T1, T2, bool >::type operator!=(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for inequality.
Definition: iteratorfacades.hh:259
EnableIfInterOperable< T1, T2, bool >::type operator>(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:683
EnableIfInterOperable< T1, T2, bool >::type operator<(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:637
EnableIfInterOperable< T1, T2, bool >::type operator==(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for equality.
Definition: iteratorfacades.hh:237
EnableIfInterOperable< T1, T2, bool >::type operator>=(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:705
EnableIfInterOperable< T1, T2, bool >::type operator<=(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:660
Support for calculating hash values of objects.
#define DUNE_DEFINE_HASH(template_args, type)
Defines the required struct specialization to make type hashable via Dune::hash.
Definition: hash.hh:100
#define DUNE_HASH_TYPE(...)
Wrapper macro for the type to be hashed in DUNE_DEFINE_HASH.
Definition: hash.hh:117
#define DUNE_HASH_TEMPLATE_ARGS(...)
Wrapper macro for the template arguments in DUNE_DEFINE_HASH.
Definition: hash.hh:109
Provides base classes for index and id sets.
Dune namespace.
Definition: alignedallocator.hh:13
void hash_combine(std::size_t &seed, const T &arg)
Calculates the hash value of arg and combines it in-place with seed.
Definition: hash.hh:307
Standard Dune debug streams.
Static tag representing a codimension.
Definition: dimension.hh:24
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 5, 22:29, 2024)