dune-grid  2.3.1
alugrid/3d/grid.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ALU3DGRIDGRID_HH
4 #define DUNE_ALU3DGRIDGRID_HH
5 
6 //- System includes
7 #include <vector>
8 
9 //- Dune includes
13 #include <dune/common/bigunsignedint.hh>
14 #include <dune/common/static_assert.hh>
15 
16 #include <dune/geometry/referenceelements.hh>
17 
18 #include <dune/grid/common/grid.hh>
24 
25 // bnd projection stuff
30 
31 //- Local includes
32 #include "alu3dinclude.hh"
33 #include "topology.hh"
34 #include "indexsets.hh"
35 #include "datahandle.hh"
36 
38 
39 #include <dune/common/parallel/mpihelper.hh>
40 
41 #if ALU3DGRID_PARALLEL
42 #include <dune/common/parallel/mpicollectivecommunication.hh>
43 #else
44 #include <dune/common/parallel/collectivecommunication.hh>
45 #endif
46 
47 namespace Dune
48 {
49 
50  // Forward declarations
51  template<int cd, int dim, class GridImp>
52  class ALU3dGridEntity;
53  template<int cd, PartitionIteratorType pitype, class GridImp >
54  class ALU3dGridLevelIterator;
55  template<int cd, class GridImp >
56  class ALU3dGridEntityPointerBase;
57  template<int cd, class GridImp >
58  class ALU3dGridEntitySeed;
59  template<int cd, class GridImp >
60  class ALU3dGridEntityPointer;
61  template<int mydim, int coorddim, class GridImp>
62  class ALU3dGridGeometry;
63  template<class GridImp>
64  class ALU3dGridHierarchicIterator;
65  template<class GridImp>
66  class ALU3dGridIntersectionIterator;
67  template<class GridImp>
68  class ALU3dGridLevelIntersectionIterator;
69  template<int codim, PartitionIteratorType pitype, class GridImp>
70  class ALU3dGridLeafIterator;
71  template <int mydim, int coorddim, class GridImp>
72  class ALU3dGridMakeableEntity;
73  template <class GridImp>
74  class ALU3dGridFaceGeometryInfo;
75  template< ALU3dGridElementType, class >
76  class ALU3dGridGlobalIdSet;
77  template< ALU3dGridElementType, class >
78  class ALU3dGridLocalIdSet;
79  template< ALU3dGridElementType, class >
80  class ALU3dGridHierarchicIndexSet;
81  template <class EntityImp>
82  class ALUMemoryProvider;
83  template< class >
84  class ALU3dGridFactory;
85  template <class GridImp, class GeometryImp, int nChild>
86  class ALULocalGeometryStorage;
87  template< ALU3dGridElementType elType, class Comm >
88  struct ALU3dGridCommHelper;
89 
90 
91 
92  // Internal Forward Declarations
93  // -----------------------------
94 
95 #if ALU3DGRID_PARALLEL
96  template< ALU3dGridElementType elType, class Comm = MPI_Comm >
97  class ALU3dGrid;
98 #else // #if ALU3DGRID_PARALLEL
99  template< ALU3dGridElementType elType, class Comm = No_Comm >
100  class ALU3dGrid;
101 #endif // #else // #if ALU3DGRID_PARALLEL
102 
103  template < class Comm >
104  struct ALUGridBaseGrid< 3, 3, cube, Comm >
105  {
107  };
108 
109  template < class Comm>
110  struct ALUGridBaseGrid< 3, 3, simplex, Comm >
111  {
113  };
114 
115 
116 
117  // ALU3dGridCommunications
118  // -----------------------
120  {
121  template < class GitterImpl >
122  void checkForConformingRefinement( GitterImpl* grid,
123  const bool conformingRefinement )
124  {
125 #ifdef ALUGRID_3D_CONFORMING_REFINEMENT
126  if( grid && conformingRefinement )
127  {
128  grid->enableConformingClosure();
129  grid->disableGhostCells();
130  }
131 #endif
132  }
133  };
134 
135 
136  template< ALU3dGridElementType elType, class Comm >
137  struct ALU3dGridCommunications;
138 
139  template< ALU3dGridElementType elType >
140  struct ALU3dGridCommunications< elType, No_Comm > : public ALU3dGridCommunicationsBase
141  {
143 
144  typedef ALU3dGridLocalIdSet< elType, No_Comm > GlobalIdSet;
145  typedef int GlobalId;
146 
147  typedef ALU3DSPACE GitterDuneImpl GitterImplType;
148 
149  typedef Dune::CollectiveCommunication< No_Comm > CollectiveCommunication;
150 
151  explicit ALU3dGridCommunications ( No_Comm comm ) {}
152 
153  int nlinks () const { return 0; }
154 
155  GitterImplType *createALUGrid ( const std::string &macroName, ALU3DSPACE ProjectVertex *projection,
156  const bool conformingRefinement )
157  {
158  GitterImplType* grid = ( macroName.empty() ) ?
159  new GitterImplType() : new GitterImplType ( macroName.c_str(), projection );
160  // check whether conforming refinement should be enabled
161  checkForConformingRefinement( grid, conformingRefinement );
162  return grid ;
163  }
164 
165  GitterImplType *createALUGrid ( std::istream& stream, ALU3DSPACE ProjectVertex *projection,
166  const bool conformingRefinement )
167  {
168 #ifdef ALUGRID_CONSTRUCTION_WITH_STREAMS
169  GitterImplType* grid = new GitterImplType ( stream, projection );
170  // check whether conforming refinement should be enabled
171  checkForConformingRefinement( grid, conformingRefinement );
172  return grid ;
173 #else
174  return 0;
175 #endif
176  }
177 
178  static No_Comm defaultComm () { return No_Comm(); }
179 
180  static int getRank ( No_Comm comm ) { return 0; }
181 
182  static typename ALU3DSPACE Gitter::Geometric::BuilderIF &getBuilder ( GitterImplType &grid )
183  {
184  ALU3DSPACE Gitter::Geometric::BuilderIF* builder =
185  dynamic_cast< ALU3DSPACE Gitter::Geometric::BuilderIF* >( &grid.container() );
186  if( ! builder )
187  DUNE_THROW(InvalidStateException,"dynamic_cast of ALUGrid builder failed");
188  return *builder;
189  }
190 
192 
194  };
195 
196 #if ALU3DGRID_PARALLEL
197  template< ALU3dGridElementType elType >
198  struct ALU3dGridCommunications< elType, MPI_Comm > : public ALU3dGridCommunicationsBase
199  {
201 
202  typedef ALU3dGridGlobalIdSet< elType, MPI_Comm > GlobalIdSet;
203  typedef ALUGridId< ALUMacroKey > GlobalId;
204 
205  typedef ALU3DSPACE GitterDunePll GitterImplType;
206 
207  typedef Dune::CollectiveCommunication< MPI_Comm > CollectiveCommunication;
208 
209  explicit ALU3dGridCommunications ( MPI_Comm comm )
210  : ccobj_( comm ), mpAccess_( comm )
211  {}
212 
213  int nlinks () const { return mpAccess_.nlinks(); }
214 
215  GitterImplType *createALUGrid ( const std::string &macroName, ALU3DSPACE ProjectVertex *projection,
216  const bool conformingRefinement )
217  {
218  GitterImplType* grid = new GitterImplType( macroName.c_str(), mpAccess_, projection );
219  // check whether conforming refinement should be enabled
220  checkForConformingRefinement( grid, conformingRefinement );
221  return grid;
222  }
223 
224  GitterImplType *createALUGrid ( std::istream& stream, ALU3DSPACE ProjectVertex *projection,
225  const bool conformingRefinement )
226  {
227 #ifdef ALUGRID_CONSTRUCTION_WITH_STREAMS
228  GitterImplType* grid = new GitterImplType ( stream, mpAccess_, projection );
229  // check whether conforming refinement should be enabled
230  checkForConformingRefinement( grid, conformingRefinement );
231  return grid ;
232 #else
233  return 0;
234 #endif
235  }
236 
237  static MPI_Comm defaultComm () { return MPI_COMM_WORLD; }
238 
239  static int getRank ( MPI_Comm comm )
240  {
241  int rank = 0;
242  MPI_Comm_rank( comm, &rank );
243  return rank;
244  }
245 
246  static typename ALU3DSPACE Gitter::Geometric::BuilderIF &getBuilder ( GitterImplType &grid )
247  {
248  ALU3DSPACE Gitter::Geometric::BuilderIF* builder =
249  dynamic_cast< ALU3DSPACE Gitter::Geometric::BuilderIF* >( &grid.containerPll() );
250  if( ! builder )
251  DUNE_THROW(InvalidStateException,"dynamic_cast of ALUGrid builder failed");
252  return *builder;
253  }
254 
255  static void duneNotifyMacroGridChanges ( GitterImplType &grid )
256  {
257  grid.duneNotifyMacroGridChanges();
258  }
259 
260  CollectiveCommunication ccobj_;
261  ALU3DSPACE MpAccessMPI mpAccess_;
262  };
263 #endif // #if ALU3DGRID_PARALLEL
264 
265 
266 
267  // ALU3dGridFamily
268  // ---------------
269 
270  template< ALU3dGridElementType elType, class Comm >
272  {
275 
276  static const int dim = 3;
277  static const int dimworld = 3;
278 
280  typedef ALU3dGridLocalIdSet< elType, Comm > LocalIdSetImp;
281 
283  typedef typename ALU3dGridCommunications< elType, Comm >::GlobalIdSet GlobalIdSetImp;
284 
286  typedef typename ALU3dGridCommunications< elType, Comm >::GlobalId GlobalIdType;
287 
289  typedef int LocalIdType;
290 
291  struct Traits
292  {
295 
298 
299  typedef typename GridFamily::GridImp Grid;
300 
303 
305 
308 
310 
312  typedef std::vector< const DuneBoundaryProjectionType * > DuneBoundaryProjectionVector;
313 
314  template< int cd >
315  struct Codim
316  {
317  // IMPORTANT: Codim<codim>::Geometry == Geometry<dim-codim,dimw>
322 
324 
325  // minimal information to generate entities
327 
330 
331  template< PartitionIteratorType pitype >
332  struct Partition
333  {
336  }; // struct Partition
337 
340  }; // struct Codim
341 
342  template< PartitionIteratorType pitype >
343  struct Partition
344  {
347  }; // struct Partition
348 
351 
354 
359 
360  typedef Dune::CollectiveCommunication< Comm > CollectiveCommunication;
361  }; // struct Traits
362 
365 
368 
369  }; // struct ALU3dGridFamily
370 
371 
372 
373  //**********************************************************************
374  //
375  // --ALU3dGrid
376  // --Grid
377  //
378  //**********************************************************************
379 
400  template< ALU3dGridElementType elType, class Comm >
401  class ALU3dGrid
402  : public GridDefaultImplementation< 3, 3, alu3d_ctype,
403  ALU3dGridFamily< elType, Comm > >,
404  public HasObjectStream,
405  public HasHierarchicIndexSet
406  {
409 
410  // for compatibility: MyType := ThisType
411  typedef ThisType MyType;
412 
413  // friend declarations
414  friend class ALU3dGridEntity< 0, 3, const ThisType>;
415  friend class ALU3dGridEntity< 1, 3, const ThisType>;
416  friend class ALU3dGridEntity< 2, 3, const ThisType>;
417  friend class ALU3dGridEntity< 3, 3, const ThisType>;
418 
420 
421  friend class ALU3dGridEntityPointerBase< 0, const ThisType >;
422  friend class ALU3dGridEntityPointerBase< 1, const ThisType >;
423  friend class ALU3dGridEntityPointerBase< 2, const ThisType >;
424  friend class ALU3dGridEntityPointerBase< 3, const ThisType >;
425 
426  friend class ALU3dGridEntityPointer< 0, const ThisType >;
427  friend class ALU3dGridEntityPointer< 1, const ThisType >;
428  friend class ALU3dGridEntityPointer< 2, const ThisType >;
429  friend class ALU3dGridEntityPointer< 3, const ThisType >;
430 
432  friend class ALU3dGridHierarchicIterator< const ThisType >;
433 
434  friend class ALU3dGridHierarchicIndexSet< elType, Comm >;
435  friend class ALU3dGridGlobalIdSet< elType, Comm >;
436  friend class ALU3dGridLocalIdSet< elType, Comm >;
437 
438  friend class Conversion< ThisType, HasObjectStream >;
439  friend class Conversion< const ThisType, HasObjectStream >;
440 
441  friend class Conversion< ThisType, HasHierarchicIndexSet >;
442  friend class Conversion< const ThisType, HasHierarchicIndexSet >;
443 
444  friend struct ALU3dGridCommHelper< elType, Comm >;
445 
446  // new intersection iterator is a wrapper which get itersectioniteratoimp as pointers
447  public:
454 
457  friend class LeafIntersectionIteratorWrapper < const ThisType > ;
459 
460  //**********************************************************
461  // The Interface Methods
462  //**********************************************************
463  public:
464  enum { refineStepsForHalf = 1 };
465 
466  static const ALU3dGridElementType elementType = elType;
467  typedef typename ALU3DSPACE GatherScatterType::ObjectStreamType ObjectStreamType;
470 
472  typedef typename GridFamily::Traits Traits;
473 
474  static const int dimension = BaseType::dimension;
476 
477  protected:
479  friend class ALULocalGeometryStorage< const ThisType, GeometryObject, 8 >;
480 
481  public:
484 
489 
491  typedef ReferenceElement< alu3d_ctype, dimension > ReferenceElementType;
492 
497 
500 
503 
504  public:
509 
511 
512  protected:
514  // type of ALUGrid boundary projection wrapper
516 
519 
521 
522  public:
525 
527  typedef typename Traits::LocalIdSet LocalIdSet;
528 
529  protected:
531  typedef typename Traits::template Codim< 0 >::LeafIterator LeafIteratorType;
532  typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
533 
535 
536  typedef typename ALU3dImplTraits< elType, Comm >::GitterImplType GitterImplType;
537 
539  enum {
541  MAXL = 32
542  };
543 
545  enum {
548  };
549 
551  enum {
556  };
557 
558  public:
559  typedef Comm MPICommunicatorType;
560 
561  typedef ALU3dGridCommunications< elType, Comm > Communications;
562 
563  protected:
566 
569  ALU3dGrid ( const std::string &macroTriangFilename,
570  const MPICommunicatorType mpiComm,
571  const DuneBoundaryProjectionType *bndPrj,
572  const DuneBoundaryProjectionVector *bndVec,
573  const ALUGridRefinementType refinementType );
574 
575  public:
577  virtual ~ALU3dGrid();
578 
580  static inline std::string name ();
581 
585  int maxLevel() const;
586 
588  template<int cd, PartitionIteratorType pitype>
589  typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
590  lbegin (int level) const;
591 
593  template<int cd, PartitionIteratorType pitype>
594  typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
595  lend (int level) const;
596 
598  template<int cd>
599  typename Traits::template Codim<cd>::
601  lbegin (int level) const;
602 
604  template<int cd>
605  typename Traits::template Codim<cd>::
607  lend (int level) const;
608 
609  private:
611  template <int codim, PartitionIteratorType pitype>
613  leafbegin(int level) const;
614 
616  template <int codim, PartitionIteratorType pitype>
618  leafend(int level) const;
619 
621  template <int codim>
622  typename Traits::template Codim<codim>::LeafIterator
623  leafbegin(int level) const;
624 
626  template <int codim>
627  typename Traits::template Codim<codim>::LeafIterator
628  leafend(int level) const;
629 
631  LeafIteratorType leafbegin (int level) const;
632 
634  LeafIteratorType leafend (int level) const;
635 
637  LeafIteratorType leafbegin () const;
638 
640  LeafIteratorType leafend () const;
641 
642  public:
644  template <int codim, PartitionIteratorType pitype>
646  leafbegin() const;
647 
649  template <int codim, PartitionIteratorType pitype>
651  leafend() const;
652 
654  template <int codim>
655  typename Traits::template Codim<codim>::LeafIterator
656  leafbegin() const;
657 
659  template <int codim>
660  typename Traits::template Codim<codim>::LeafIterator
661  leafend() const;
662 
663  private:
665  template <int codim, PartitionIteratorType pitype>
667  createLeafIteratorBegin (int level) const;
668 
670  template <int codim, PartitionIteratorType pitype>
672  createLeafIteratorEnd(int level) const;
673 
674  public:
676  int size (int level, int cd) const;
677 
679  int size (int codim) const;
680 
682  int size (int level, GeometryType type) const;
683 
685  size_t numBoundarySegments() const;
686 
688  int size (GeometryType type) const;
689 
691  int global_size (int cd) const ;
692 
693  // (no interface method) number of grid entities in the entire grid for given codim
694  int hierSetSize (int cd) const;
695 
697  const GlobalIdSet &globalIdSet () const
698  {
699  if( !globalIdSet_ )
700  globalIdSet_ = new GlobalIdSetImp( *this );
701  return *globalIdSet_;
702  }
703 
705  const LocalIdSet & localIdSet () const { return localIdSet_; }
706 
708  const typename Traits :: LeafIndexSet & leafIndexSet () const;
709 
711  const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
712 
717  bool loadBalance ();
718 
745  template <class DataHandle>
746  bool loadBalance (DataHandle & data);
747 
748  template< class DataHandleImpl, class Data >
750  {
752  LBHandle lbHandle( *this, dataHandle );
753  return loadBalance( lbHandle );
754  }
755 
757  int ghostSize (int level, int codim) const;
758 
760  int overlapSize (int level, int codim) const { return 0; }
761 
763  int ghostSize (int codim) const;
764 
766  int overlapSize (int codim) const { return 0; }
767 
769  template<class DataHandleImp,class DataTypeImp>
771  InterfaceType iftype, CommunicationDirection dir, int level) const;
772 
776  template<class DataHandleImp,class DataTypeImp>
778  InterfaceType iftype, CommunicationDirection dir) const;
779 
780  private:
781  typedef ALU3DSPACE GatherScatter GatherScatterType;
782 
783  public:
785  const CollectiveCommunication &comm () const { return communications().ccobj_; }
786 
788  bool preAdapt ( );
789 
791  void postAdapt ( );
792 
794  bool adapt ();
795 
800  template< class GridImp, class DataHandle >
802 
804  void globalRefine ( int refCount );
805 
806  template< class GridImp, class DataHandle >
807  void globalRefine ( int refCount, AdaptDataHandleInterface< GridImp, DataHandle > &handle );
808 
809  //**********************************************************
810  // End of Interface Methods
811  //**********************************************************
814  template <GrapeIOFileFormatType ftype>
815  bool writeGrid( const std::string filename, alu3d_ctype time ) const ;
816 
817  bool writeGrid_Xdr( const std::string filename, alu3d_ctype time ) const ;
819  bool writeGrid_Ascii( const std::string filename, alu3d_ctype time, bool scientific = false ) const ;
820 
823  bool writeMacroGrid( const std::string path, const std::string filename ) const ;
824 
827  template <GrapeIOFileFormatType ftype>
828  bool readGrid( const std::string filename, alu3d_ctype & time );
829 
831  void backup( std::ostream& ) const ;
832 
834  void restore( std::istream& ) ;
835 
836  // (no interface method) get hierarchic index set of the grid
837  const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
838 
839  // set max of given mxl and actual maxLevel
840  // for loadBalance
841  void setMaxLevel (int mxl);
842 
843  // no interface method, but has to be public
844  void updateStatus ();
845 
847  bool mark( int refCount , const typename Traits::template Codim<0>::Entity & e);
848 
850  int getMark( const typename Traits::template Codim<0>::Entity & e) const;
851 
852  public:
854  {
855  return Communications::defaultComm();
856  }
857 
859 
860  template< class IntersectionType >
861  static const typename BaseType
862  :: template ReturnImplementationType< IntersectionType >
863  :: ImplementationType &
864  getRealIntersection ( const IntersectionType &intersection )
865  {
866  return getRealImplementation( intersection );
867  }
868 
870  const std::vector<GeometryType>& geomTypes (int codim) const { return geomTypes_[codim]; }
871 
872  // return reference to org ALU3dGrid
873  // private method, but otherwise we have to friend class all possible
874  // types of LevelIterator ==> later
875  GitterImplType &myGrid () const;
876 
877  virtual GitterImplType *createALUGrid ( const std::string &macroName )
878  {
879  assert( communications_ );
880  return communications_->createALUGrid( macroName, vertexProjection(), conformingRefinement() );
881  }
882 
883  virtual GitterImplType *createALUGrid ( std::istream& stream )
884  {
885  assert( communications_ );
886  return communications_->createALUGrid( stream, vertexProjection(), conformingRefinement() );
887  }
888 
890 
891  // return appropriate ALUGrid builder
892  virtual typename ALU3DSPACE Gitter::Geometric::BuilderIF &getBuilder () const
893  {
895  }
896 
897  // helper function for factory
899  {
901  }
902 
905 
906  template < class EntitySeed >
907  typename Traits :: template Codim< EntitySeed :: codimension > :: EntityPointer
908  entityPointer( const EntitySeed& seed ) const
909  {
910  enum { codim = EntitySeed :: codimension };
912  return ALUPointer( factory(), seed ) ;
913  }
914 
915  // number of links to other processors, for internal use only
916  int nlinks () const { return communications().nlinks(); }
917 
919  {
921  return leafVertexList_;
922  }
923 
924  int getLevelOfLeafVertex ( const typename ALU3dImplTraits< elType, Comm >::VertexType &vertex ) const
925  {
926  assert( leafVertexList_.up2Date() );
927  return leafVertexList_.getLevel(vertex);
928  }
929 
930  VertexListType & getVertexList(int level) const
931  {
932  assert( level >= 0 );
933  assert( level <= maxLevel() );
934  VertexListType & vxList = vertexList_[level];
935  if(!vxList.up2Date()) vxList.setupVxList(*this,level);
936  return vxList;
937  }
938 
940  {
941  assert( codim >= 1 );
942  assert( codim <= 3 );
943  return ghostLeafList_[codim-1];
944  }
945 
946  ALU3dGridItemListType & getGhostLevelList(int codim, int level) const
947  {
948  assert( codim >= 1 );
949  assert( codim <= 3 );
950 
951  assert( level >= 0 );
952  assert( level <= maxLevel() );
953  return ghostLevelList_[codim-1][level];
954  }
955 
957  {
958  assert( level >= 0 );
959  assert( level <= maxLevel() );
960  return levelEdgeList_[level];
961  }
962 
963  protected:
965  ALU3dGrid( const ThisType & );
966 
968  const ThisType &operator= ( const ThisType & );
969 
971  void calcExtras();
972 
974  void calcMaxLevel();
975 
977  void recalcGlobalSize();
978 
980  void checkMacroGridFile (const std::string filename);
981 
983  void checkMacroGrid ();
984 
986  const DuneBoundaryProjectionType* boundaryProjection(const int segmentIndex) const
987  {
988  if( bndPrj_ )
989  {
990  return bndPrj_;
991  }
992  else
993  {
994  // pointer can be zero (which is emulates the identity mapping then)
995  assert( bndVec_ );
996  assert( segmentIndex < (int) bndVec_->size() );
997  return (*bndVec_)[ segmentIndex ];
998  }
999  }
1000 
1002  {
1003  assert( communications_ );
1004  return *communications_;
1005  }
1006 
1008 #ifdef USE_SMP_PARALLEL
1009  assert( (int) factoryVec_.size() > GridObjectFactoryType :: threadNumber() );
1010  return factoryVec_[ GridObjectFactoryType :: threadNumber() ];
1011 #else
1012  return factory_;
1013 #endif
1014  }
1015 
1016  public:
1017  // return true if conforming refinement is enabled
1019  {
1020  return (refinementType_ == conforming) ;
1021  }
1022 
1023  // return true if ghost cells are available
1024  bool ghostCellsEnabled () const
1025  {
1026 #ifdef ALUGRID_3D_CONFORMING_REFINEMENT
1027  return myGrid().ghostCellsEnabled();
1028 #else
1029  return true ;
1030 #endif
1031  }
1032  protected:
1034  //
1035  // Internal variables
1036  //
1038 
1039  // the real ALU grid
1041 
1042  // max level of grid
1044 
1045  // count how much elements where marked
1046  mutable int coarsenMarked_;
1047  mutable int refineMarked_;
1048 
1049  // at the moment the number of different geom types is 1
1050  enum { numberOfGeomTypes = 1 };
1051  std::vector< std::vector<GeometryType> > geomTypes_;
1052 
1053  // our hierarchic index set
1055 
1056  // out global id set
1058 
1059  // out global id set
1061 
1062  // the level index set ( default type )
1063  mutable std::vector < LevelIndexSetImp * > levelIndexVec_;
1064 
1065  // the leaf index set
1067 
1068  // the reference element
1070 
1072 
1075 
1077 
1079 
1080  // the type of our size cache
1083 
1084 #ifdef USE_SMP_PARALLEL
1085  std::vector< GridObjectFactoryType > factoryVec_;
1086 #else
1088 #endif
1089 
1090  // variable to ensure that postAdapt ist called after adapt
1092 
1093  // pointer to Dune boundary projection
1095 
1096  // pointer to Dune boundary projection
1098 
1099  // boundary projection for vertices
1101 
1102  // pointer to communications object
1104 
1105  // refinement type (nonconforming or conforming)
1107  }; // end class ALU3dGrid
1108 
1109 
1110  bool checkMacroGrid ( ALU3dGridElementType elType ,
1111  const std::string filename );
1112  const char* elType2Name( ALU3dGridElementType elType );
1113 
1114  namespace Capabilities
1115  {
1116 
1117  template< ALU3dGridElementType elType, class Comm, int cdim >
1118  struct hasEntity< Dune::ALU3dGrid< elType, Comm >, cdim >
1119  {
1120  static const bool v = true;
1121  };
1122 
1123  template< ALU3dGridElementType elType, class Comm >
1124  struct isParallel< ALU3dGrid< elType, Comm > >
1125  {
1126  static const bool v = true;
1127  };
1128 
1129  template< ALU3dGridElementType elType, class Comm >
1130  struct isLevelwiseConforming< ALU3dGrid< elType, Comm > >
1131  {
1132  static const bool v = true;
1133  };
1134 
1135  template< ALU3dGridElementType elType, class Comm >
1136  struct hasBackupRestoreFacilities< ALU3dGrid< elType, Comm > >
1137  {
1138  static const bool v = true;
1139  };
1140 
1141  } // end namespace Capabilities
1142 
1143 } // end namespace Dune
1144 
1145 #include "grid_inline.hh"
1146 #if COMPILE_ALUGRID_INLINE
1147  #include "grid_imp.cc"
1148 #endif
1149 #endif