3 #ifndef DUNE_ALU3DGRIDINDEXSETS_HH 4 #define DUNE_ALU3DGRIDINDEXSETS_HH 10 #include <dune/common/stdstreams.hh> 11 #include <dune/common/bigunsignedint.hh> 12 #include <dune/common/hash.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 >
42 class ALU3dGridHierarchicIndexSet
43 :
public IndexSet< ALU3dGrid< elType, Comm >, ALU3dGridHierarchicIndexSet< elType, Comm > >
45 typedef ALU3dGridHierarchicIndexSet< elType, Comm > This;
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;
93 int size (
int codim )
const 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_;
127 ALUMacroKey(
const A&a,
const A&b,
const A&c,
const A&d) : BaseType(a,b,c,d) {}
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) );
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 <<
"]";
154 #ifdef HAVE_DUNE_HASH 156 inline friend std::size_t hash_value(
const ALUMacroKey& arg)
158 std::size_t seed = 0;
159 hash_combine(seed,arg._a);
160 hash_combine(seed,arg._b);
161 hash_combine(seed,arg._c);
162 hash_combine(seed,arg._d);
166 #endif // HAVE_DUNE_HASH 170 template <
class MacroKeyImp>
184 : key_(key) , nChild_(nChild)
190 , nChild_(org.nChild_)
197 nChild_ = org.nChild_;
209 return ! equals(org);
214 if(equals(org))
return true;
215 else return lesser(org);
220 if(equals(org))
return true;
221 else return ! lesser(org);
231 return (!equals(org) && ! lesser(org));
234 const MacroKeyImp &
getKey()
const {
return key_; }
236 int codim()
const {
return codim_; }
240 return ( (nChild_ >= 0) && (codim_ >= 0) );
249 void print(std::ostream & out)
const 251 out <<
"(" << getKey() <<
"," << nChild_ <<
"," << codim_ <<
")";
254 #ifdef HAVE_DUNE_HASH 256 inline friend std::size_t hash_value(
const ALUGridId& arg)
258 std::size_t seed = hash<MacroKeyImp>() (arg.
getKey());
259 hash_combine(seed,arg.
nChild());
260 hash_combine(seed,arg.
codim());
264 #endif // HAVE_DUNE_HASH 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) );
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 >,
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 ;
352 typedef ALUMacroKey MacroKeyType;
354 typedef ALUGridId < MacroKeyType > MacroIdType;
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::
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 >,
979 typedef ALU3dGridLocalIdSet< elType, Comm > This;
981 typedef ALU3dImplTraits< elType, Comm > ImplTraitsType;
982 typedef typename ImplTraitsType::HElementType HElementType;
983 typedef typename ImplTraitsType::HBndSegType HBndSegType;
989 enum { codimMultiplier = 300000000 };
990 typedef typename GridType::Traits::template Codim<0>::Entity
EntityCodim0Type;
993 ALU3dGridLocalIdSet(
const GridType & grid) : hset_(grid.hierarchicIndexSet())
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_;
1063 #endif // #ifndef DUNE_ALU3DGRIDINDEXSETS_HH void print(std::ostream &out) const
Definition: alugrid/3d/indexsets.hh:149
ALUMacroKey()
Definition: alugrid/3d/indexsets.hh:126
GridFamily::GlobalIdType GlobalIdType
type of ALU3dGrids global id
Definition: alugrid/3d/grid.hh:297
static std::conditional< std::is_reference< InterfaceType >::value, typename std::add_lvalue_reference< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type, typename std::remove_const< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type >::type getRealImplementation(InterfaceType &&i)
return real implementation of interface class
Definition: common/grid.hh:1305
bool equals(const ALUGridId &org) const
Definition: alugrid/3d/indexsets.hh:286
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
ALUGridId(const ALUGridId &org)
Definition: alugrid/3d/indexsets.hh:188
GridType::Traits::template Codim< 0 >::Entity EntityCodim0Type
Definition: alugrid/3d/indexsets.hh:58
int codim() const
Definition: alugrid/3d/indexsets.hh:236
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
ALUMacroKey(const A &a, const A &b, const A &c, const A &d)
Definition: alugrid/3d/indexsets.hh:127
bool lesser(const ALUGridId &org) const
Definition: alugrid/3d/indexsets.hh:268
Definition: topology.hh:13
int subIndex(const EntityCodim0Type &e, int i, unsigned int codim) const
return subIndex i of given entity for subEntity with codim
Definition: alugrid/3d/indexsets.hh:76
int index(const EntityType &ep) const
return hierarchic index of given entity
Definition: alugrid/3d/indexsets.hh:62
const MacroKeyImp & getKey() const
Definition: alugrid/3d/indexsets.hh:234
friend class ALU3dGrid< elType, Comm >
Definition: alugrid/3d/indexsets.hh:50
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: alugrid/3d/grid.hh:870
ALUGridId(const MacroKeyImp &key, int nChild, int cd)
Definition: alugrid/3d/indexsets.hh:183
Definition: alugrid/3d/indexsets.hh:119
DUNE_DEFINE_HASH(DUNE_HASH_TEMPLATE_ARGS(), DUNE_HASH_TYPE(Dune::ALUMacroKey)) DUNE_DEFINE_HASH(DUNE_HASH_TEMPLATE_ARGS(typename MacroKeyImp)
int nChild() const
Definition: alugrid/3d/indexsets.hh:235
int hierSetSize(int cd) const
Definition: grid_inline.hh:92
ALUGridId()
Definition: alugrid/3d/indexsets.hh:178
static const int dimension
Definition: alugrid/3d/grid.hh:474
Definition: topology.hh:13
Provides base classes for index and id sets.
int index(const typename GridType::Traits::template Codim< codim >::Entity &entity) const
return hierarchic index of given entity
Definition: alugrid/3d/indexsets.hh:70
Definition: alugrid/3d/indexsets.hh:171
Definition: common.hh:179
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
void reset()
Definition: alugrid/3d/indexsets.hh:243
Include standard header files.
Definition: agrid.hh:59
#define ALU3DSPACE
Definition: alu3dinclude.hh:26
std::ostream & operator<<(std::ostream &out, const ALU2dGridEntitySeed< cd, GridImp > &key)
print alugrid entity key to std::stream
Definition: alugrid/2d/entityseed.hh:286
bool contains(const EntityType &) const
return true because all entities are contained in this set
Definition: alugrid/3d/indexsets.hh:107
void print(std::ostream &out) const
Definition: alugrid/3d/indexsets.hh:249
int size(GeometryType type) const
Definition: alugrid/3d/indexsets.hh:84
Different resources needed by all grid implementations.
ALUMacroKey(const ALUMacroKey &org)
Definition: alugrid/3d/indexsets.hh:128
hierarchic index set of ALU3dGrid
Definition: alugrid/3d/grid.hh:80
ALU3dGridHierarchicIndexSet< elType, Comm > HierarchicIndexSet
Type of the hierarchic index set.
Definition: alugrid/3d/grid.hh:483
DUNE_HASH_TYPE(Dune::ALUGridId< MacroKeyImp >)) namespace Dune
Definition: alugrid/3d/indexsets.hh:296
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: alugrid/3d/indexsets.hh:100
int size(int codim) const
return size of indexset, i.e. maxindex+1
Definition: alugrid/3d/indexsets.hh:93
bool isValid() const
Definition: alugrid/3d/indexsets.hh:238