3#ifndef DUNE_ALU3DGRIDINDEXSETS_HH
4#define DUNE_ALU3DGRIDINDEXSETS_HH
19#include "alu3dinclude.hh"
21#include "alu3diterators.hh"
29 template< ALU3dGr
idElementType,
class >
32 template<
int cd,
int dim,
class Gr
idImp>
33 class ALU3dGridEntity;
41 template< ALU3dGr
idElementType elType,
class Comm >
43 :
public IndexSet< ALU3dGrid< elType, Comm >, ALU3dGridHierarchicIndexSet< elType, Comm > >
48 enum { numCodim = GridType::dimension + 1 };
58 typedef typename GridType::Traits::template Codim<0>::Entity EntityCodim0Type;
61 template <
class EntityType>
62 int index (
const EntityType & ep)
const
64 enum { cd = EntityType :: codimension };
70 int index (
const typename GridType::Traits::template Codim< codim >::Entity &entity )
const
76 int subIndex (
const EntityCodim0Type &e,
int i,
unsigned int codim )
const
86 if( elType == tetra && !type.isSimplex() )
return 0;
87 if( elType == hexa && !type.isCube() )
return 0;
89 return this->
size(GridType::dimension-type.dim());
93 int size (
int codim )
const
96 return grid_.hierSetSize(codim);
100 const std::vector<GeometryType>&
geomTypes (
int codim)
const
106 template <
class EntityType>
107 bool contains (
const EntityType &)
const {
return true; }
111 const GridType & grid_;
119 class ALUMacroKey :
public ALU3DSPACE Key4<int>
122 typedef ALUMacroKey ThisType;
123 typedef ALU3DSPACE Key4<A> BaseType;
126 ALUMacroKey() : BaseType(-1,-1,-1,-1) {}
127 ALUMacroKey(
const A&a,
const A&b,
const A&c,
const A&d) : BaseType(a,b,c,d) {}
128 ALUMacroKey(
const ALUMacroKey & org ) : BaseType(org) {}
129 ALUMacroKey & operator = (
const ALUMacroKey & org )
131 BaseType::operator = (org);
137 return ( (this->_a == org._a) &&
138 (this->_b == org._b) &&
139 (this->_c == org._c) &&
140 (this->_d == org._d) );
144 bool operator > (
const ALUMacroKey & org)
const
146 return ( (!this->
operator == (org)) && (!this->
operator <(org)) );
149 void print(std::ostream & out)
const
151 out <<
"[" << this->_a <<
"," << this->_b <<
"," << this->_c <<
"," << this->_d <<
"]";
156 inline friend std::size_t hash_value(
const ALUMacroKey& arg)
158 std::size_t seed = 0;
170 template <
class MacroKeyImp>
183 ALUGridId(
const MacroKeyImp & key,
int nChild ,
int cd)
184 : key_(key) , nChild_(nChild)
188 ALUGridId(
const ALUGridId & org )
190 , nChild_(org.nChild_)
194 ALUGridId & operator = (
const ALUGridId & org )
197 nChild_ = org.nChild_;
209 return ! equals(org);
212 bool operator <= (
const ALUGridId & org)
const
214 if(equals(org))
return true;
215 else return lesser(org);
218 bool operator >= (
const ALUGridId & org)
const
220 if(equals(org))
return true;
221 else return ! lesser(org);
224 bool operator < (
const ALUGridId & org)
const
229 bool operator > (
const ALUGridId & org)
const
231 return (!equals(org) && ! lesser(org));
234 const MacroKeyImp & getKey()
const {
return key_; }
235 int nChild()
const {
return nChild_; }
236 int codim()
const {
return codim_; }
238 bool isValid ()
const
240 return ( (nChild_ >= 0) && (codim_ >= 0) );
249 void print(std::ostream & out)
const
251 out <<
"(" << getKey() <<
"," << nChild_ <<
"," << codim_ <<
")";
256 inline friend std::size_t hash_value(
const ALUGridId& arg)
258 std::size_t seed = hash<MacroKeyImp>() (arg.getKey());
268 bool lesser(
const ALUGridId & org)
const
270 if(getKey() < org.getKey() )
return true;
271 if(getKey() > org.getKey() )
return false;
272 if(getKey() == org.getKey() )
274 if(nChild_ == org.nChild_)
276 return codim_ < org.codim_;
279 return nChild_ < org.nChild_;
281 assert( equals(org) );
286 bool equals(
const ALUGridId & org)
const
288 return ( (getKey() == org.getKey() ) && (nChild_ == org.nChild_)
289 && (codim_ == org.codim_) );
300 inline std::ostream&
operator<< (std::ostream& s,
const ALUMacroKey & key)
306 template <
class KeyImp>
307 inline std::ostream&
operator<< (std::ostream& s,
const ALUGridId<KeyImp> &
id)
319 template< ALU3dGr
idElementType elType,
class Comm >
320 class ALU3dGridGlobalIdSet
321 :
public IdSet< ALU3dGrid< elType, Comm >, ALU3dGridGlobalIdSet< elType, Comm > ,
322 typename ALU3dGrid< elType, Comm >::Traits::GlobalIdType >,
323 public ALU3DSPACE AdaptRestrictProlongType
325 typedef ALU3dGrid< elType, Comm > GridType;
326 typedef typename GridType::HierarchicIndexSet HierarchicIndexSetType;
328 typedef ALU3dImplTraits< elType, Comm > ImplTraitsType;
329 typedef typename ImplTraitsType::IMPLElementType IMPLElementType;
330 typedef typename ImplTraitsType::GEOElementType GEOElementType;
331 typedef typename ImplTraitsType::GEOFaceType GEOFaceType;
332 typedef typename ImplTraitsType::GEOEdgeType GEOEdgeType;
334 typedef typename ImplTraitsType::GitterImplType GitterImplType;
336 typedef typename ImplTraitsType::HElementType HElementType;
337 typedef typename ImplTraitsType::HFaceType HFaceType;
338 typedef typename ImplTraitsType::HEdgeType HEdgeType;
339 typedef typename ImplTraitsType::VertexType VertexType;
340 typedef typename ImplTraitsType::HBndSegType HBndSegType;
342 typedef EntityCount< elType > EntityCountType;
344 using ALU3DSPACE AdaptRestrictProlongType :: postRefinement ;
345 using ALU3DSPACE AdaptRestrictProlongType :: preCoarsening ;
349 typedef typename GridType::Traits::GlobalIdType IdType;
352 typedef ALUMacroKey MacroKeyType;
354 typedef ALUGridId < MacroKeyType > MacroIdType;
355 enum { numCodim = GridType::dimension+1 };
358 typedef typename GridType::Traits::template Codim<0>::Entity EntityCodim0Type;
360 mutable std::map< int , IdType > ids_[numCodim];
364 const GridType & grid_;
367 const HierarchicIndexSetType & hset_;
373 enum { startOffSet_ = 0 };
379 using IdSet < GridType , ALU3dGridGlobalIdSet, IdType > :: subId;
382 ALU3dGridGlobalIdSet(
const GridType & grid)
383 : grid_(grid), hset_(grid.hierarchicIndexSet())
390 const int vxKey[4] = {0,1,3,4};
391 for(
int i=0; i<4; i++) vertexKey_[i] = vxKey[i];
395 assert( elType == tetra );
398 const int vxKey[4] = {0,1,2,3};
399 for(
int i=0; i<4; i++) vertexKey_[i] = vxKey[i];
406 virtual ~ALU3dGridGlobalIdSet() {}
418 for(
int i=0 ; i<numCodim; ++i)
420 std::cout <<
"*****************************************************\n";
421 std::cout <<
"Ids for codim " << i <<
"\n";
422 std::cout <<
"*****************************************************\n";
423 for(
unsigned int k=0; k<ids_[i].size(); ++k)
425 std::cout <<
"Item[" << i <<
"," << k <<
"] has id " << ids_[i][k] <<
"\n";
427 std::cout <<
"\n\n\n";
431 template <
class IterType>
432 void checkId(
const IdType & macroId,
const IterType & idIter)
const
435 IdType
id = getId(macroId);
436 for(
int i=0 ; i<numCodim; ++i)
438 typedef typename std::map<int,IdType>::iterator IteratorType;
439 IteratorType end = ids_[i].end();
440 for(IteratorType it = ids_[i].begin(); it != end; ++it)
443 if(idIter == it)
continue;
445 const IdType & checkMId = (*it).second;
446 IdType checkId = getId(checkMId);
450 std::cout <<
id <<
" equals " << checkId <<
"\n";
451 assert(
id != checkId );
452 DUNE_THROW(GridError,
" " <<
id <<
" equals " << checkId <<
"\n");
456 bool lesser = (
id < checkId);
457 bool greater = (
id > checkId);
458 assert( lesser != greater );
459 if( lesser == greater )
461 assert( lesser != greater );
462 DUNE_THROW(GridError,
" lesser equals greater of one id ");
470 void uniquenessCheck()
const
472 for(
int i=0 ; i<numCodim; i++)
474 typedef typename std::map<int,IdType>::iterator IteratorType;
475 IteratorType end = ids_[i].end();
476 for(IteratorType it = ids_[i].begin(); it != end; ++it)
479 const IdType &
id = (*it).second;
486 void setChunkSize(
int chunkSize )
488 chunkSize_ = chunkSize;
494 for(
int i=0; i<numCodim; ++i)
499 GitterImplType &gitter = grid_.myGrid();
503 typename ALU3DSPACE AccessIterator< VertexType >::Handle fw( gitter.container() );
504 for( fw.first (); !fw.done(); fw.next() )
506 int idx = fw.item().getIndex();
507 ids_[3][idx] = buildMacroVertexId( fw.item() );
513 typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< 3, Ghost_Partition, Comm > IteratorType;
514 IteratorType fw (grid_ , 0 , grid_.nlinks() );
515 typedef typename IteratorType :: val_t val_t;
516 for (fw.first () ; ! fw.done () ; fw.next ())
518 val_t & item = fw.item();
519 assert( item.first );
520 VertexType & vx = * (item.first);
521 int idx = vx.getIndex();
522 ids_[3][idx] = buildMacroVertexId( vx );
528 typename ALU3DSPACE AccessIterator< HEdgeType >::Handle w( gitter.container() );
529 for (w.first(); !w.done(); w.next())
531 int idx = w.item().getIndex();
532 ids_[2][idx] = buildMacroEdgeId( w.item() );
533 buildEdgeIds( w.item() , ids_[2][idx] , startOffSet_ );
539 typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< 2, Ghost_Partition, Comm > IteratorType;
540 IteratorType fw( grid_, 0, grid_.nlinks() );
541 typedef typename IteratorType :: val_t val_t;
542 for (fw.first () ; ! fw.done () ; fw.next ())
544 val_t & item = fw.item();
545 assert( item.first );
546 HEdgeType & edge = * (item.first);
547 int idx = edge.getIndex();
549 ids_[2][idx] = buildMacroEdgeId( edge );
550 buildEdgeIds( edge , ids_[2][idx] , startOffSet_ );
557 typename ALU3DSPACE AccessIterator< HFaceType >::Handle w( gitter.container() );
558 for (w.first () ; ! w.done () ; w.next ())
560 int idx = w.item().getIndex();
561 ids_[1][idx] = buildMacroFaceId( w.item() );
562 buildFaceIds( w.item() , ids_[1][idx] , startOffSet_ );
568 typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< 1, Ghost_Partition, Comm > IteratorType;
569 IteratorType fw (grid_ , 0 , grid_.nlinks() );
570 typedef typename IteratorType :: val_t val_t;
571 for (fw.first () ; ! fw.done () ; fw.next ())
573 val_t & item = fw.item();
574 assert( item.first );
575 HFaceType & face = * (item.first);
576 int idx = face.getIndex();
577 ids_[1][idx] = buildMacroFaceId( face );
578 buildFaceIds( face , ids_[1][idx] , startOffSet_ );
584 typename ALU3DSPACE AccessIterator< HElementType >::Handle w( gitter.container() );
585 for (w.first () ; ! w.done () ; w.next ())
587 int idx = w.item().getIndex();
588 ids_[0][idx] = buildMacroElementId( w.item() );
589 buildElementIds( w.item() , ids_[0][idx] , startOffSet_ );
595 typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< 0, Ghost_Partition, Comm > IteratorType;
596 IteratorType fw (grid_ , 0 , grid_.nlinks() );
597 typedef typename IteratorType :: val_t val_t;
598 for (fw.first () ; ! fw.done () ; fw.next ())
600 val_t & item = fw.item();
601 assert( item.second );
602 HElementType & elem = * ( item.second->getGhost().first );
603 int idx = elem.getIndex();
604 ids_[0][idx] = buildMacroElementId( elem );
605 buildElementIds( elem , ids_[0][idx] , startOffSet_ );
613#if ! ALU3DGRID_PARALLEL
619 IdType buildMacroVertexId(
const VertexType & item )
621 int vx[4] = { item.ident(), -1, -1, -1};
623 MacroKeyType key(vx[0],vx[1],vx[2],vx[3]);
624 MacroIdType id(key,1, codim + startOffSet_ );
628 IdType buildMacroEdgeId(
const HEdgeType & item )
630 const GEOEdgeType & edge =
static_cast<const GEOEdgeType &
> (item);
631 int vx[4] = {-1,-1,-1,-1};
632 for(
int i=0; i<2; ++i)
634 vx[i] = edge.myvertex(i)->ident();
638 MacroKeyType key(vx[0],vx[1],vx[2],vx[3]);
639 MacroIdType id( key,1, codim + startOffSet_ );
643 IdType buildMacroFaceId(
const HFaceType & item )
645 const GEOFaceType & face =
static_cast<const GEOFaceType &
> (item);
646 int vx[4] = {-1,-1,-1,-1};
647 for(
int i=0; i<3; ++i)
649 vx[i] = face.myvertex(i)->ident();
653 MacroKeyType key(vx[0],vx[1],vx[2],vx[3]);
654 MacroIdType id(key,1, codim + startOffSet_ );
658 IdType buildMacroElementId(
const HElementType & item )
660 const GEOElementType & elem =
static_cast<const GEOElementType &
> (item);
661 int vx[4] = {-1,-1,-1,-1};
662 for(
int i=0; i<4; ++i)
664 vx[i] = elem.myvertex(vertexKey_[i])->ident();
667 MacroKeyType key(vx[0],vx[1],vx[2],vx[3]);
668 return MacroIdType(key,1, codim + startOffSet_ );
672 IdType createId(
const typename ImplTraitsType::
673 template Codim<cd>::InterfaceType & item ,
const IdType & creatorId ,
int nChild )
675 assert( creatorId.isValid() );
678 enum { childOffSet = ((cd == 1) && (elType == hexa)) ? 16 : 8 };
679 enum { codimOffSet = 4 };
681 assert( nChild < childOffSet );
683 int newChild = (creatorId.nChild() * childOffSet ) + nChild;
684 int newCodim = (creatorId.codim() * codimOffSet ) + ( cd + startOffSet_ );
686 IdType newId( creatorId.getKey() , newChild , newCodim );
687 assert( newId != creatorId );
692 void buildElementIds(
const HElementType & item ,
const IdType & macroId ,
int nChild)
695 ids_[codim][item.getIndex()] = createId<codim>(item,macroId,nChild);
697 const IdType & itemId = ids_[codim][item.getIndex()];
699 buildInteriorElementIds(item,itemId);
703 void buildInteriorElementIds(
const HElementType & item ,
const IdType & fatherId)
705 assert( fatherId.isValid() );
709 const VertexType * v = item.innerVertex() ;
711 if(v) buildVertexIds(*v,fatherId );
716 int inneredge = startOffSet_;
717 for(
const HEdgeType * e = item.innerHedge () ; e ; e = e->next ())
719 buildEdgeIds(*e,fatherId,inneredge);
726 int innerface = startOffSet_;
727 for(
const HFaceType * f = item.innerHface () ; f ; f = f->next ())
729 buildFaceIds(*f,fatherId,innerface);
736 int numChild = startOffSet_;
737 for(
const HElementType * child = item.down(); child; child =child->next() )
740 buildElementIds(*child, fatherId, numChild);
747 void buildFaceIds(
const HFaceType & face,
const IdType & fatherId ,
int innerFace )
750 ids_[codim][face.getIndex()] = createId<codim>(face,fatherId,innerFace);
751 const IdType & faceId = ids_[codim][face.getIndex()];
753 buildInteriorFaceIds(face,faceId);
757 void buildInteriorFaceIds(
const HFaceType & face,
const IdType & faceId)
759 assert( faceId.isValid () );
763 const VertexType * v = face.innerVertex() ;
765 if(v) buildVertexIds(*v,faceId );
770 int inneredge = startOffSet_;
771 for (
const HEdgeType * e = face.innerHedge () ; e ; e = e->next ())
773 buildEdgeIds(*e,faceId ,inneredge );
780 int child = startOffSet_;
781 for(
const HFaceType * f = face.down () ; f ; f = f->next ())
783 assert( child == f->nChild()+startOffSet_);
784 buildFaceIds(*f,faceId,child);
791 void buildEdgeIds(
const HEdgeType & edge,
const IdType & fatherId ,
int inneredge)
794 ids_[codim][edge.getIndex()] = createId<codim>(edge,fatherId,inneredge);
795 const IdType & edgeId = ids_[codim][edge.getIndex()];
796 buildInteriorEdgeIds(edge,edgeId);
799 void buildInteriorEdgeIds(
const HEdgeType & edge,
const IdType & edgeId)
801 assert( edgeId.isValid() );
805 const VertexType * v = edge.innerVertex() ;
806 if(v) buildVertexIds(*v,edgeId );
811 int child = startOffSet_;
812 for (
const HEdgeType * e = edge.down () ; e ; e = e->next ())
814 assert( child == e->nChild()+ startOffSet_ );
815 buildEdgeIds(*e,edgeId , child );
822 void buildVertexIds(
const VertexType & vertex,
const IdType & fatherId )
826 ids_[codim][vertex.getIndex()] = createId<codim>(vertex,fatherId,1);
827 assert( ids_[codim][vertex.getIndex()].isValid() );
830 friend class ALU3dGrid< elType, Comm >;
832 const IdType & getId(
const IdType & macroId)
const
839 template <
class EntityType>
840 IdType id (
const EntityType & ep)
const
842 enum { cd = EntityType :: codimension };
843 assert( ids_[cd].find( hset_.index(ep) ) != ids_[cd].end() );
844 const IdType & macroId = ids_[cd][hset_.index(ep)];
845 assert( macroId.isValid() );
846 return getId(macroId);
851 IdType id (
const typename GridType:: template Codim<codim> :: Entity & ep)
const
853 assert( ids_[codim].find( hset_.index(ep) ) != ids_[codim].end() );
854 const IdType & macroId = ids_[codim][hset_.index(ep)];
855 assert( macroId.isValid() );
856 return getId(macroId);
860 IdType subId (
const EntityCodim0Type &e,
int i,
unsigned int codim )
const
862 const int hIndex = hset_.subIndex( e, i, codim );
863 assert( ids_[ codim ].find( hIndex ) != ids_[ codim ].end() );
864 const IdType ¯oId = ids_[ codim ][ hIndex ];
865 assert( macroId.isValid() );
866 return getId( macroId );
869 template <
int d, ALU3dGr
idElementType element_t >
873 struct BuildIds<d,tetra>
876 template <
class MyIdSet,
class IdStorageType>
877 static void buildFace(MyIdSet & set,
const HElementType & item,
int faceNum,
878 IdStorageType & ids )
880 const IMPLElementType & elem =
static_cast<const IMPLElementType &
> (item);
881 const HFaceType & face = *(elem.myhface3(faceNum));
882 const IdType &
id = ids[face.getIndex()];
883 assert(
id.isValid() );
884 set.buildInteriorFaceIds(face,
id);
889 struct BuildIds<d,hexa>
892 template <
class MyIdSet,
class IdStorageType>
893 static void buildFace(MyIdSet & set,
const HElementType & item,
int faceNum,
894 IdStorageType & ids )
896 const IMPLElementType & elem =
static_cast<const IMPLElementType &
> (item);
897 const HFaceType & face = *(elem.myhface4(faceNum));
898 const IdType &
id = ids[face.getIndex()];
899 assert(
id.isValid() );
900 set.buildInteriorFaceIds(face,
id);
905 int postRefinement( HElementType & item )
908 enum { elCodim = 0 };
909 const IdType & fatherId = ids_[elCodim][item.getIndex()];
910 assert( fatherId.isValid() );
911 buildInteriorElementIds(item, fatherId );
914 for(
int i=0; i<EntityCountType::numFaces; ++i)
916 enum { faceCodim = 1 };
917 BuildIds< GridType::dimension, elType >::buildFace(*
this,item,i,ids_[faceCodim]);
920 for(
int i=0; i<EntityCountType::numEdges; ++i)
922 enum { edgeCodim = 2 };
923 const IMPLElementType & elem =
static_cast<const IMPLElementType &
> (item);
924 const HEdgeType & edge = *( elem.myhedge1(i));
925 const IdType &
id = ids_[edgeCodim][edge.getIndex()];
926 assert(
id.isValid() );
927 buildInteriorEdgeIds(edge,
id);
933 int preCoarsening( HElementType & elem )
960 int preCoarsening ( HBndSegType & el ) {
return 0; }
963 int postRefinement ( HBndSegType & el ) {
return 0; }
974 template< ALU3dGr
idElementType elType,
class Comm >
975 class ALU3dGridLocalIdSet
976 :
public IdSet< ALU3dGrid< elType, Comm >, ALU3dGridLocalIdSet< elType, Comm >, int >,
977 public ALU3DSPACE AdaptRestrictProlongType
979 typedef ALU3dGridLocalIdSet< elType, Comm > This;
981 typedef ALU3dImplTraits< elType, Comm > ImplTraitsType;
982 typedef typename ImplTraitsType::HElementType HElementType;
983 typedef typename ImplTraitsType::HBndSegType HBndSegType;
985 typedef ALU3dGrid< elType, Comm > GridType;
986 typedef typename GridType::HierarchicIndexSet HierarchicIndexSetType;
989 enum { codimMultiplier = 300000000 };
990 typedef typename GridType::Traits::template Codim<0>::Entity EntityCodim0Type;
993 ALU3dGridLocalIdSet(
const GridType & grid) : hset_(grid.hierarchicIndexSet())
995 for(
int codim = 0; codim <= GridType::dimension; ++codim )
996 codimStart_[ codim ] = codim * codimMultiplier;
999 friend class ALU3dGrid< elType, Comm >;
1002 void updateIdSet() {}
1004 using ALU3DSPACE AdaptRestrictProlongType :: postRefinement ;
1005 using ALU3DSPACE AdaptRestrictProlongType :: preCoarsening ;
1013 using IdSet < GridType , ALU3dGridLocalIdSet, IdType > :: subId;
1016 template <
class EntityType>
1017 int id (
const EntityType & ep)
const
1019 enum { cd = EntityType :: codimension };
1020 assert( hset_.size(cd) < codimMultiplier );
1021 return codimStart_[cd] + hset_.index(ep);
1025 template <
int codim>
1026 int id (
const typename GridType:: template Codim<codim> :: Entity & ep)
const
1029 assert( hset_.size(codim) < codimMultiplier );
1030 return codimStart_[codim] + hset_.index(ep);
1034 IdType subId (
const EntityCodim0Type &e,
int i,
unsigned int codim )
const
1036 assert( hset_.size( codim ) < codimMultiplier );
1037 return codimStart_[ codim ] + hset_.subIndex( e, i, codim );
1041 int preCoarsening( HElementType & elem ) {
return 0; }
1043 int postRefinement( HElementType & item ) {
return 0; }
1046 int preCoarsening ( HBndSegType & el ) {
return 0; }
1049 int postRefinement ( HBndSegType & el ) {
return 0; }
1051 void setChunkSize(
int chunkSize ) {}
1055 const HierarchicIndexSetType & hset_;
1058 int codimStart_[ GridType::dimension+1 ];
Portable very large unsigned integers.
hierarchic index set of ALU3dGrid
Definition: indexsets.hh:44
int index(const EntityType &ep) const
return hierarchic index of given entity
Definition: indexsets.hh:62
bool contains(const EntityType &) const
return true because all entities are contained in this set
Definition: indexsets.hh:107
int index(const typename GridType::Traits::template Codim< codim >::Entity &entity) const
return hierarchic index of given entity
Definition: indexsets.hh:70
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: indexsets.hh:100
int subIndex(const EntityCodim0Type &e, int i, unsigned int codim) const
return subIndex i of given entity for subEntity with codim
Definition: indexsets.hh:76
int size(GeometryType type) const
Definition: indexsets.hh:84
int size(int codim) const
return size of indexset, i.e. maxindex+1
Definition: indexsets.hh:93
[ provides Dune::Grid ]
Definition: grid.hh:406
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: grid.hh:870
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:25
static ReturnImplementationType< InterfaceType >::ImplementationType & getRealImplementation(InterfaceType &i)
return real implementation of interface class
Definition: grid.hh:1223
Index Set Interface base class.
Definition: indexidset.hh:78
Different resources needed by all grid implementations.
std::ostream & operator<<(std::ostream &s, const array< T, N > &e)
Output operator for array.
Definition: array.hh:159
#define DUNE_THROW(E, m)
Definition: exceptions.hh:244
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:231
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:253
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:126
#define DUNE_HASH_TYPE(...)
Wrapper macro for the type to be hashed in DUNE_DEFINE_HASH.
Definition: hash.hh:143
#define DUNE_HASH_TEMPLATE_ARGS(...)
Wrapper macro for the template arguments in DUNE_DEFINE_HASH.
Definition: hash.hh:135
Provides base classes for index and id sets.
Dune namespace.
Definition: alignment.hh:14
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:433
Standard Dune debug streams.