dune-alugrid  3.0.0
3d/grid.hh
Go to the documentation of this file.
1 #ifndef DUNE_ALU3DGRIDGRID_HH
2 #define DUNE_ALU3DGRIDGRID_HH
3 
4 //- System includes
5 #include <memory>
6 #include <vector>
7 
8 //- Dune includes
9 #include <dune/grid/common/capabilities.hh>
11 #include <dune/common/bigunsignedint.hh>
12 #include <dune/common/version.hh>
13 
14 #include <dune/geometry/referenceelements.hh>
15 
16 #include <dune/grid/common/grid.hh>
18 #include <dune/grid/common/sizecache.hh>
20 #include <dune/grid/common/datahandleif.hh>
21 
23 
24 // bnd projection stuff
25 #include <dune/grid/common/boundaryprojection.hh>
30 
31 //- Local includes
32 #include "alu3dinclude.hh"
33 #include "topology.hh"
34 #include "indexsets.hh"
35 #include "datahandle.hh"
36 
39 
40 #include <dune/common/parallel/mpihelper.hh>
41 
42 #if ALU3DGRID_PARALLEL
43 #include <dune/common/parallel/mpicollectivecommunication.hh>
44 #else
45 #include <dune/common/parallel/collectivecommunication.hh>
46 #endif
47 
48 namespace Dune
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>
69  template<int codim, PartitionIteratorType pitype, class GridImp>
71  template <int mydim, int coorddim, class GridImp>
73  template <class GridImp>
75  template< int, int, ALU3dGridElementType, class >
77  template< int, int, ALU3dGridElementType, class >
79  template< int, int, ALU3dGridElementType, class >
81  template <class EntityImp>
83  template< class >
85  template <class GridImp, class GeometryImp, int nChild>
87 
88 
89 
90  // Internal Forward Declarations
91  // -----------------------------
92 
93 #if ALU3DGRID_PARALLEL
94  template<int dim, int dimworld, ALU3dGridElementType elType, class Comm = ALUGridMPIComm >
95  class ALU3dGrid;
96 #else // #if ALU3DGRID_PARALLEL
97  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm = ALUGridNoComm >
98  class ALU3dGrid;
99 #endif // #else // #if ALU3DGRID_PARALLEL
100 
101 
102  // Internal Forward Declarations
103  // -----------------------------
104 
105  template < int dim, int dimw, class Comm >
106  struct ALUGridBaseGrid< dim, dimw, cube, Comm >
107  {
109  };
110 
111  template < int dim, int dimw, class Comm >
112  struct ALUGridBaseGrid< dim, dimw, simplex, Comm >
113  {
115  };
116 
117 
118 
119  // ALU3dGridCommunications
120  // -----------------------
122  {
123  template < class GitterImpl >
124  void checkForConformingRefinement( GitterImpl* grid,
125  const bool conformingRefinement )
126  {
127  if( grid && conformingRefinement )
128  {
129  grid->enableConformingClosure();
130  grid->disableGhostCells();
131  }
132  }
133  };
134 
135 
136  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm >
138 
139  template< int dim, int dimworld, ALU3dGridElementType elType >
140  struct ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm > : public ALU3dGridCommunicationsBase
141  {
143 
145  typedef int GlobalId;
146 
147  typedef ALU3DSPACE GitterDuneImpl GitterImplType;
148 
149  typedef Dune::CollectiveCommunication< No_Comm > CollectiveCommunication;
150 
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( dim ) : new GitterImplType ( dim, 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  GitterImplType* grid = new GitterImplType ( dim, stream, projection );
169  // check whether conforming refinement should be enabled
170  checkForConformingRefinement( grid, conformingRefinement );
171  return grid ;
172  }
173 
174  static ALUGridNoComm defaultComm () { return ALUGridNoComm(); }
175 
176  static int getRank ( ALUGridNoComm comm ) { return 0; }
177 
178  static typename ALU3DSPACE Gitter::Geometric::BuilderIF &getBuilder ( GitterImplType &grid )
179  {
180  ALU3DSPACE Gitter::Geometric::BuilderIF* builder =
181  dynamic_cast< ALU3DSPACE Gitter::Geometric::BuilderIF* >( &grid.container() );
182  if( ! builder )
183  DUNE_THROW(InvalidStateException,"dynamic_cast of ALUGrid builder failed");
184  return *builder;
185  }
186 
187  static void completeGrid ( GitterImplType &grid ) {}
188 
189  void print( std::ostream& out ) const
190  {}
191 
193  };
194 
195 #if ALU3DGRID_PARALLEL
196  template< int dim, int dimworld, ALU3dGridElementType elType >
197  struct ALU3dGridCommunications< dim, dimworld, elType, ALUGridMPIComm > : public ALU3dGridCommunicationsBase
198  {
200 
202  typedef ALUGridId< ALUMacroKey > GlobalId;
203 
204  typedef ALU3DSPACE GitterDunePll GitterImplType;
205 
206  typedef Dune::CollectiveCommunication< MPI_Comm > CollectiveCommunication;
207 
208  explicit ALU3dGridCommunications ( MPI_Comm comm )
209  : ccobj_( comm ), mpAccess_( comm )
210  {}
211 
212  int nlinks () const { return mpAccess_.sendLinks(); }
213 
214  GitterImplType *createALUGrid ( const std::string &macroName, ALU3DSPACE ProjectVertex *projection,
215  const bool conformingRefinement )
216  {
217  GitterImplType* grid = new GitterImplType( dim, macroName.c_str(), mpAccess_, projection );
218  // check whether conforming refinement should be enabled
219  checkForConformingRefinement( grid, conformingRefinement );
220  return grid;
221  }
222 
223  GitterImplType *createALUGrid ( std::istream& stream, ALU3DSPACE ProjectVertex *projection,
224  const bool conformingRefinement )
225  {
226  GitterImplType* grid = new GitterImplType ( dim, stream, mpAccess_, projection );
227  // check whether conforming refinement should be enabled
228  checkForConformingRefinement( grid, conformingRefinement );
229  return grid ;
230  }
231 
232  static MPI_Comm defaultComm () { return MPI_COMM_WORLD; }
233 
234  static int getRank ( MPI_Comm comm )
235  {
236  int rank = 0;
237  MPI_Comm_rank( comm, &rank );
238  return rank;
239  }
240 
241  void print( std::ostream& out ) const
242  {
243  mpAccess_.printLinkage( out );
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 completeGrid ( GitterImplType &grid )
256  {
257  // setup communication patterns
258  grid.notifyMacroGridChanges();
259  // rebuild ghost cells
260  grid.rebuildGhostCells();
261  }
262 
263  CollectiveCommunication ccobj_;
264  ALU3DSPACE MpAccessMPI mpAccess_;
265  };
266 #endif // #if ALU3DGRID_PARALLEL
267 
268 
269 
270  // ALU3dGridTwist
271  // --------------
272 
273  template< int dim, ALU3dGridElementType elType, int codim >
275 
276  template<int dim>
277  struct ALU3dGridTwists< dim, tetra, 0 >
278  {
280  };
281 
282  template<int dim>
283  struct ALU3dGridTwists< dim, hexa, 0 >
284  {
286  };
287 
288  template< int dim, ALU3dGridElementType elType >
289  struct ALU3dGridTwists< dim, elType, 1 >
290  {
292  };
293 
294  template< ALU3dGridElementType elType >
295  struct ALU3dGridTwists< 3, elType, 2 >
296  {
298  };
299 
300  template< ALU3dGridElementType elType >
301  struct ALU3dGridTwists< 2, elType, 2 >
302  {
304  };
305 
306  template< int dim, ALU3dGridElementType elType >
307  struct ALU3dGridTwists< dim, elType, 3 >
308  {
310  };
311 
312 
313 
314  // ALU3dGridFamily
315  // ---------------
316 
317  template< int dimG, int dimW, ALU3dGridElementType elType, class Comm >
319  {
320  static const int dim = dimG;
321  static const int dimworld = dimW;
322 
325 
328 
331 
334 
336  typedef int LocalIdType;
337 
338  struct Traits
339  {
342 
345 
346  typedef typename GridFamily::GridImp Grid;
347 
348  typedef Dune::Intersection< const Grid, LeafIntersectionWrapper< const Grid > > LeafIntersection;
349  typedef Dune::Intersection< const Grid, LevelIntersectionWrapper< const Grid > > LevelIntersection;
350 
351  typedef Dune::IntersectionIterator< const Grid, LeafIntersectionIteratorWrapper< const Grid >, LeafIntersectionWrapper< const Grid > > IntersectionIterator;
352 
353  typedef Dune::IntersectionIterator< const Grid, LeafIntersectionIteratorWrapper< const Grid >, LeafIntersectionWrapper< const Grid > > LeafIntersectionIterator;
354  typedef Dune::IntersectionIterator< const Grid, LevelIntersectionIteratorWrapper< const Grid >, LevelIntersectionWrapper< const Grid > > LevelIntersectionIterator;
355 
356  typedef Dune::EntityIterator< 0, const Grid, ALU3dGridHierarchicIterator< const Grid > > HierarchicIterator;
357 
358  typedef DuneBoundaryProjection< dimworld > DuneBoundaryProjectionType;
359  typedef std::vector< const DuneBoundaryProjectionType * > DuneBoundaryProjectionVector;
360 
361  template< int cd >
362  struct Codim
363  {
365  typedef typename Twists::Twist Twist;
366 
367  // IMPORTANT: Codim<codim>::Geometry == Geometry<dim-codim,dimw>
370  typedef Dune::Geometry< dim-cd, dimworld, const Grid, ALU3dGridGeometry > Geometry;
371  typedef Dune::Geometry< dim-cd, dim, const Grid, ALU3dGridGeometry > LocalGeometry;
372 
374  typedef Dune::Entity< cd, dim, const Grid, ALU3dGridEntity > Entity;
375 
376  // minimal information to generate entities
378 
379 #if DUNE_VERSION_NEWER(DUNE_GRID,2,4)
381  typedef Entity EntityPointer;
382 #else
384  typedef Dune::EntityPointer< const Grid, EntityPointerImpl > EntityPointer;
385 #endif
386 
387  template< PartitionIteratorType pitype >
388  struct Partition
389  {
390  typedef Dune::EntityIterator< cd, const Grid, ALU3dGridLevelIterator< cd, pitype, const Grid > > LevelIterator;
391  typedef Dune::EntityIterator< cd, const Grid, ALU3dGridLeafIterator< cd, pitype, const Grid > > LeafIterator;
392  }; // struct Partition
393 
396  }; // struct Codim
397 
398  template< PartitionIteratorType pitype >
399  struct Partition
400  {
401  typedef Dune::GridView< ALU3dLevelGridViewTraits< const Grid, pitype > > LevelGridView;
402  typedef Dune::GridView< ALU3dLeafGridViewTraits< const Grid, pitype > > LeafGridView;
404  }; // struct Partition
405 
409 
412 
415 
416  typedef IndexSet< Grid, LevelIndexSetImp > LevelIndexSet;
417  typedef IndexSet< Grid, LeafIndexSetImp > LeafIndexSet;
418  typedef IdSet< Grid, LocalIdSetImp, LocalIdType > LocalIdSet;
419  typedef IdSet< Grid, GlobalIdSetImp, GlobalIdType > GlobalIdSet;
420 
423  }; // struct Traits
424 
427 
430 
431  }; // struct ALU3dGridFamily
432 
433 
434 
435  //**********************************************************************
436  //
437  // --ALU3dGrid
438  // --Grid
439  //
440  //**********************************************************************
441 
462  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm >
463  class ALU3dGrid
464  : public GridDefaultImplementation< dim, dimworld, alu3d_ctype,
465  ALU3dGridFamily< dim, dimworld, elType, Comm > >,
466  public HasObjectStream,
467  public HasHierarchicIndexSet
468  {
470  typedef GridDefaultImplementation< dim, dimworld, alu3d_ctype, ALU3dGridFamily< dim, dimworld, elType, Comm > > BaseType;
471 
472  // for compatibility: MyType := ThisType
473  typedef ThisType MyType;
474 
475  // friend declarations
476  friend class ALU3dGridEntity< 0, dim, const ThisType>;
477  friend class ALU3dGridEntity< 1, dim, const ThisType>;
478  friend class ALU3dGridEntity< 2, dim, const ThisType>;
479  friend class ALU3dGridEntity< dim, dim, const ThisType>;
480 
482 
483  friend class ALU3dGridEntityPointerBase< 0, const ThisType >;
484  friend class ALU3dGridEntityPointerBase< 1, const ThisType >;
485  friend class ALU3dGridEntityPointerBase< 2, const ThisType >;
486  friend class ALU3dGridEntityPointerBase< dim, const ThisType >;
487 
488  friend class ALU3dGridEntityPointer< 0, const ThisType >;
489  friend class ALU3dGridEntityPointer< 1, const ThisType >;
490  friend class ALU3dGridEntityPointer< 2, const ThisType >;
491  friend class ALU3dGridEntityPointer< dim, const ThisType >;
492 
494  friend class ALU3dGridHierarchicIterator< const ThisType >;
495 
496  friend class ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm >;
497  friend class ALU3dGridGlobalIdSet< dim, dimworld, elType, Comm >;
498  friend class ALU3dGridLocalIdSet< dim, dimworld, elType, Comm >;
499 
500  // new intersection iterator is a wrapper which get itersectioniteratoimp as pointers
501  public:
508 
511  friend class LeafIntersectionIteratorWrapper < const ThisType > ;
513 
514  //**********************************************************
515  // The Interface Methods
516  //**********************************************************
517  public:
518  enum { refineStepsForHalf = 1 };
519 
520  static const ALU3dGridElementType elementType = elType;
521 
522  typedef typename ALU3DSPACE GatherScatterType::ObjectStreamType ObjectStreamType;
525 
527  typedef typename GridFamily::Traits Traits;
528 
529  static const int dimension = BaseType::dimension;
530  static const int dimensionworld = BaseType::dimensionworld;
531 
532  template< int codim >
533  struct Codim
534  : public BaseType::template Codim< codim >
535  {
536  typedef typename Traits::template Codim< codim >::EntityImp EntityImp;
537  typedef typename Traits::template Codim< codim >::EntityPointerImpl EntityPointerImpl;
538  typedef typename Traits::template Codim< codim >::Twists Twists;
539  typedef typename Twists::Twist Twist;
540  };
541 
542  protected:
543  typedef MakeableInterfaceObject< typename Traits::template Codim< 0 >::Geometry > GeometryObject;
545 
546  public:
548  template <PartitionIteratorType pitype>
549  struct Partition
550  {
551  typedef typename GridFamily::Traits::template Partition<pitype>::LevelGridView
553  typedef typename GridFamily::Traits::template Partition<pitype>::LeafGridView
555  typedef typename GridFamily::Traits::template Partition<pitype>::MacroGridView
557  };
562 
565 
570 
572  typedef ReferenceElement< alu3d_ctype, dimension > ReferenceElementType;
573 
578 
581 
584 
587 
588  protected:
590  // type of ALUGrid boundary projection wrapper
592 
595 
597 
598  public:
601 
603  typedef typename Traits::LocalIdSet LocalIdSet;
604 
605  protected:
607  typedef typename Traits::template Codim< 0 >::LeafIterator LeafIteratorType;
608  typedef typename Traits::template Codim< 0 >::LeafIterator LeafIterator;
609 
611 
613 
615  enum {
618 
620  enum {
625 
626  public:
627  typedef Comm MPICommunicatorType;
628 
630 
631  protected:
634 
635  public:
638  ALU3dGrid ( const std::string &macroTriangFilename,
639  const MPICommunicatorType mpiComm,
640  const DuneBoundaryProjectionType *bndPrj,
641  const DuneBoundaryProjectionVector *bndVec,
642  const ALUGridRefinementType refinementType );
643 
645  virtual ~ALU3dGrid();
646 
648  static inline std::string name ();
649 
653  int maxLevel() const;
654 
656  template<int cd, PartitionIteratorType pitype>
657  typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
658  lbegin (int level) const;
659 
661  template<int cd, PartitionIteratorType pitype>
662  typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
663  lend (int level) const;
664 
666  template<int cd>
667  typename Traits::template Codim<cd>::
669  lbegin (int level) const;
670 
672  template<int cd>
673  typename Traits::template Codim<cd>::
675  lend (int level) const;
676 
679 
681  ileafbegin( const typename Traits::template Codim< 0 >::Entity& entity ) const
682  {
683  return LefInterItWrapperType( *this,
684  getRealImplementation( entity ),
685  entity.level(), false );
686  }
687 
689  ileafend( const typename Traits::template Codim< 0 >::Entity& entity ) const
690  {
691  return LefInterItWrapperType( *this,
692  getRealImplementation( entity ),
693  entity.level(), true );
694  }
695 
697  ilevelbegin( const typename Traits::template Codim< 0 >::Entity& entity ) const
698  {
699  return LvlInterItWrapperType( *this,
700  getRealImplementation( entity ),
701  entity.level(), false );
702  }
703 
705  ilevelend( const typename Traits::template Codim< 0 >::Entity& entity ) const
706  {
707  return LvlInterItWrapperType( *this,
708  getRealImplementation( entity ),
709  entity.level(), true );
710  }
711 
712  private:
714  template <int codim, PartitionIteratorType pitype>
715  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
716  leafbegin(int level) const;
717 
719  template <int codim, PartitionIteratorType pitype>
720  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
721  leafend(int level) const;
722 
724  template <int codim>
725  typename Traits::template Codim<codim>::LeafIterator
726  leafbegin(int level) const;
727 
729  template <int codim>
730  typename Traits::template Codim<codim>::LeafIterator
731  leafend(int level) const;
732 
734  LeafIteratorType leafbegin (int level) const;
735 
737  LeafIteratorType leafend (int level) const;
738 
740  LeafIteratorType leafbegin () const;
741 
743  LeafIteratorType leafend () const;
744 
745  public:
747  template <int codim, PartitionIteratorType pitype>
748  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
749  leafbegin() const;
750 
752  template <int codim, PartitionIteratorType pitype>
753  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
754  leafend() const;
755 
757  template <int codim>
758  typename Traits::template Codim<codim>::LeafIterator
759  leafbegin() const;
760 
762  template <int codim>
763  typename Traits::template Codim<codim>::LeafIterator
764  leafend() const;
765 
766  private:
768  template <int codim, PartitionIteratorType pitype>
769  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
770  createLeafIteratorBegin (int level) const;
771 
773  template <int codim, PartitionIteratorType pitype>
774  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
775  createLeafIteratorEnd(int level) const;
776 
777  public:
779  int size (int level, int cd) const;
780 
782  int size (int codim) const;
783 
785  int size (int level, GeometryType type) const;
786 
788  size_t numBoundarySegments() const;
789 
791  int size (GeometryType type) const;
792 
794  int global_size (int cd) const ;
795 
796  // (no interface method) number of grid entities in the entire grid for given codim
797  int hierSetSize (int cd) const;
798 
800  const GlobalIdSet &globalIdSet () const
801  {
802  if( !globalIdSet_ )
803  {
804  globalIdSet_.reset( new GlobalIdSetImp( *this ) );
805  }
806  return *globalIdSet_;
807  }
808 
810  template<PartitionIteratorType pitype>
812  {
813  typedef typename Traits::template Partition<pitype>::MacroGridView View;
814  return View(*this);
815  }
816 
819  {
820  typedef MacroGridView View;
821  return View(*this);
822  }
823 
825  template<PartitionIteratorType pitype>
826  DUNE_DEPRECATED_MSG("macroView is deprecated, use macroGridView")
827  typename Partition<pitype>::MacroGridView macroView() const
828  {
829  typedef typename Traits::template Partition<pitype>::MacroGridView View;
830  return View(*this);
831  }
832 
834  DUNE_DEPRECATED_MSG("macroView is deprecated, use macroGridView")
836  {
837  typedef MacroGridView View;
838  return View(*this);
839  }
840 
842  const LocalIdSet & localIdSet () const { return localIdSet_; }
843 
845  const typename Traits :: LeafIndexSet & leafIndexSet () const;
846 
848  const typename Traits :: LevelIndexSet & levelIndexSet (int level) const
849  {
850  assert( (level >= 0) && (level < int( levelIndexVec_.size() )) );
851  if( ! levelIndexVec_[ level ] )
852  {
853  levelIndexVec_[ level ] = createLevelIndexSet( level );
854  }
855  return (*levelIndexVec_[ level ]);
856  }
857 
862  std::shared_ptr< LevelIndexSetImp > accessLevelIndexSet ( int level ) const
863  {
864  assert( (level >= 0) && (level < int( levelIndexVec_.size() )) );
865  if( levelIndexVec_[ level ] )
866  {
867  return levelIndexVec_[ level ];
868  }
869  else
870  {
871  return createLevelIndexSet( level );
872  }
873  }
874 
875  protected:
876  std::shared_ptr< LevelIndexSetImp > createLevelIndexSet ( int level ) const
877  {
878  return std::shared_ptr< LevelIndexSetImp > (new LevelIndexSetImp( *this, lbegin< 0 >( level ), lend< 0 >( level ), level ) );
879  }
880 
881  public:
882  template< int cd >
883  typename Codim< cd >::Twists twists ( GeometryType type ) const
884  {
885  assert( type.dim() == dimension - cd );
886  assert( elType == tetra ? type.isSimplex() : type.isCube() );
887  return typename Traits::template Codim< cd >::Twists();
888  }
889 
890  protected:
891  typedef ALU3DSPACE GatherScatter GatherScatterType;
892 
921  bool loadBalance ( GatherScatterType* lbData );
922 
923  public:
928  bool loadBalance ()
929  {
930  return loadBalance( (GatherScatterType* ) 0 );
931  }
932 
939  template< class DataHandleImpl, class Data >
940  bool loadBalance ( CommDataHandleIF< DataHandleImpl, Data > &dataHandleIF )
941  {
942  typedef ALU3DSPACE GatherScatterLoadBalanceDataHandle
943  < ThisType, GatherScatterType, DataHandleImpl, Data, false > DataHandleType;
944  DataHandleType dataHandle( *this, dataHandleIF );
945 
946  // call the above loadBalance method with general GatherScatterType
947  return loadBalance( &dataHandle );
948  }
949 
959  template< class LBWeights, class DataHandleImpl, class Data >
960  bool loadBalance ( LBWeights &weights,
961  CommDataHandleIF< DataHandleImpl, Data > &dataHandleIF )
962  {
963  typedef ALU3DSPACE GatherScatterLoadBalanceDataHandle
964  < ThisType, LBWeights, DataHandleImpl, Data, false > DataHandleType;
965  DataHandleType dataHandle( *this, dataHandleIF, weights );
966 
967  // call the above loadBalance method with general GatherScatterType
968  return loadBalance( &dataHandle );
969  }
970 
978  template< class LBWeights >
979  typename std::enable_if< !IsDataHandle< LBWeights >::value, bool >::type loadBalance ( LBWeights &weights )
980  {
981  typedef ALU3DSPACE GatherScatterLoadBalance < ThisType, LBWeights, false > LoadBalanceHandleType;
982  LoadBalanceHandleType loadBalanceHandle( *this, weights );
983  return loadBalance( &loadBalanceHandle );
984  }
985 
994  template< class LBDestinations >
995  bool repartition ( LBDestinations &destinations )
996  {
997  typedef ALU3DSPACE GatherScatterLoadBalance< ThisType, LBDestinations, true > LoadBalanceHandleType ;
998  LoadBalanceHandleType loadBalanceHandle( *this, destinations );
999  return loadBalance( &loadBalanceHandle );
1000  }
1001 
1012  template< class LBDestinations, class DataHandleImpl, class Data >
1013  bool repartition ( LBDestinations &destinations,
1014  CommDataHandleIF< DataHandleImpl, Data > &dataHandleIF )
1015  {
1016  typedef ALU3DSPACE GatherScatterLoadBalanceDataHandle< ThisType, LBDestinations, DataHandleImpl, Data, true > DataHandleType;
1017  DataHandleType dataHandle( *this, dataHandleIF, destinations );
1018 
1019  // call the above loadBalance method with general GatherScatterType
1020  return loadBalance( &dataHandle );
1021  }
1022 
1023 
1025  int ghostSize (int level, int codim) const;
1026 
1028  int overlapSize (int level, int codim) const { return 0; }
1029 
1031  int ghostSize (int codim) const;
1032 
1034  int overlapSize (int codim) const { return 0; }
1035 
1037  template< class DataHandle, class Data >
1038  LevelCommunication communicate ( CommDataHandleIF< DataHandle, Data > &data,
1039  InterfaceType iftype,
1040  CommunicationDirection dir,
1041  int level ) const
1042  {
1043  return LevelCommunication( *this, data, iftype, dir, level );
1044  }
1045 
1049  template< class DataHandle, class Data >
1050  LeafCommunication communicate ( CommDataHandleIF< DataHandle, Data > &data,
1051  InterfaceType iftype,
1052  CommunicationDirection dir ) const
1053  {
1054  return LeafCommunication( *this, data, iftype, dir );
1055  }
1056 
1057  protected:
1058  // load balance and compress memory if possible
1059  void finalizeGridCreation();
1060 
1062  void clearIsNewMarkers( );
1063 
1064  public:
1066  const CollectiveCommunication &comm () const { return communications().ccobj_; }
1067 
1069  bool preAdapt ( );
1070 
1072  void postAdapt ( );
1073 
1075  bool adapt ();
1076 
1081  template< class GridImp, class DataHandle >
1082  bool adapt ( AdaptDataHandleInterface< GridImp, DataHandle > &handle );
1083 
1085  void globalRefine ( int refCount );
1086 
1087  template< class GridImp, class DataHandle >
1088  void globalRefine ( int refCount, AdaptDataHandleInterface< GridImp, DataHandle > &handle );
1089 
1090  //**********************************************************
1091  // End of Interface Methods
1092  //**********************************************************
1093 
1095  bool writeMacroGrid( const std::string path, const std::string filename,
1096  const ALU3DSPACE MacroFileHeader::Format format = ALU3DSPACE MacroFileHeader::defaultFormat ) const ;
1097 
1099  void backup( std::ostream&, const ALU3DSPACE MacroFileHeader::Format format ) const ;
1100 
1102  void restore( std::istream& ) ;
1103 
1104  // (no interface method) get hierarchic index set of the grid
1105  const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
1106 
1107  // no interface method, but has to be public
1108  void updateStatus ();
1109 
1111  bool mark( int refCount , const typename Traits::template Codim<0>::Entity & e);
1112 
1114  int getMark( const typename Traits::template Codim<0>::Entity & e) const;
1115 
1116  public:
1118  {
1119  return Communications::defaultComm();
1120  }
1121 
1122  using BaseType :: getRealImplementation ;
1123 
1124  template< class IntersectionType >
1125  static const typename BaseType
1126  :: template ReturnImplementationType< IntersectionType >
1127  :: ImplementationType &
1128  getRealIntersection ( const IntersectionType &intersection )
1129  {
1130  return getRealImplementation( intersection );
1131  }
1132 
1134  const std::vector<GeometryType>& geomTypes (int codim) const { return geomTypes_[codim]; }
1135 
1136  // return reference to org ALU3dGrid
1137  // private method, but otherwise we have to friend class all possible
1138  // types of LevelIterator ==> later
1139  GitterImplType &myGrid () const;
1140 
1141  virtual GitterImplType *createALUGrid ( const std::string &macroName )
1142  {
1144  return communications_->createALUGrid( macroName, vertexProjection(), conformingRefinement() );
1145  }
1146 
1147  virtual GitterImplType *createALUGrid ( std::istream& stream )
1148  {
1150  return communications_->createALUGrid( stream, vertexProjection(), conformingRefinement() );
1151  }
1152 
1154 
1155  // return appropriate ALUGrid builder
1156  virtual typename ALU3DSPACE Gitter::Geometric::BuilderIF &getBuilder () const
1157  {
1158  return Communications::getBuilder( myGrid() );
1159  }
1160 
1161  // helper function for factory
1162  virtual void completeGrid ()
1163  {
1164  Communications::completeGrid( myGrid() );
1166  }
1167 
1170  {
1171  return ( elType == tetra ) ?
1174  }
1175 
1176  template < class EntitySeed >
1177  typename Traits :: template Codim< EntitySeed :: codimension > :: EntityPointer
1178  entityPointer( const EntitySeed& seed ) const
1179  {
1180  enum { codim = EntitySeed :: codimension };
1181  return typename Traits :: template Codim< codim > :: EntityPointerImpl( seed );
1182  }
1183 
1184  template < class EntitySeed >
1185  typename Traits :: template Codim< EntitySeed :: codimension > :: Entity
1186  entity( const EntitySeed& seed ) const
1187  {
1188  typedef typename Traits :: template Codim< EntitySeed :: codimension > :: Entity Entity;
1189  return Entity( typename Traits :: template Codim< EntitySeed :: codimension > :: EntityImp( seed ) );
1190  }
1191 
1192  // number of links to other processors, for internal use only
1193  int nlinks () const { return communications().nlinks(); }
1194 
1196  {
1198  return leafVertexList_;
1199  }
1200 
1202  {
1204  return leafVertexList_.getLevel(vertex);
1205  }
1206 
1207  VertexListType & getVertexList(int level) const
1208  {
1209  alugrid_assert ( level >= 0 );
1210  alugrid_assert ( level <= maxLevel() );
1211  VertexListType & vxList = vertexList_[level];
1212  if(!vxList.up2Date()) vxList.setupVxList(*this,level);
1213  return vxList;
1214  }
1215 
1217  {
1218  alugrid_assert ( codim >= 1 );
1219  alugrid_assert ( codim <= 3 );
1220  return ghostLeafList_[codim-1];
1221  }
1222 
1223  ALU3dGridItemListType & getGhostLevelList(int codim, int level) const
1224  {
1225  alugrid_assert ( codim >= 1 );
1226  alugrid_assert ( codim <= 3 );
1227 
1228  alugrid_assert ( level >= 0 );
1229  alugrid_assert ( level <= maxLevel() );
1230  alugrid_assert ( level < int(ghostLevelList_[codim-1].size()) );
1231  return ghostLevelList_[codim-1][level];
1232  }
1233 
1235  {
1236  alugrid_assert ( level >= 0 );
1237  alugrid_assert ( level <= maxLevel() );
1238  return levelEdgeList_[level];
1239  }
1240 
1241  protected:
1243  ALU3dGrid( const ThisType & );
1244 
1246  const ThisType &operator= ( const ThisType & );
1247 
1249  void calcExtras();
1250 
1252  void calcMaxLevel();
1253 
1255  void recalcGlobalSize();
1256 
1258  void checkMacroGridFile (const std::string filename);
1259 
1261  void checkMacroGrid ();
1262 
1264  const DuneBoundaryProjectionType* boundaryProjection(const int segmentIndex) const
1265  {
1266  if( bndPrj_ )
1267  {
1268  return bndPrj_;
1269  }
1270  else
1271  {
1272  // pointer can be zero (which is emulates the identity mapping then)
1273  alugrid_assert ( bndVec_ );
1274  alugrid_assert ( segmentIndex < (int) bndVec_->size() );
1275  return (*bndVec_)[ segmentIndex ];
1276  }
1277  }
1278 
1280  {
1282  return *communications_;
1283  }
1284 
1285  // initialize geometry types and return correct geometryInFather storage
1286  void makeGeometries();
1287 
1288  public:
1289  // return true if conforming refinement is enabled
1291  {
1292  return (refinementType_ == conforming) ;
1293  }
1294 
1295  // return true if ghost cells are available
1296  bool ghostCellsEnabled () const
1297  {
1298  return comm().size() > 1 && myGrid().ghostCellsEnabled();
1299  }
1300 
1303 
1306  protected:
1308  //
1309  // Internal variables
1310  //
1312 
1313  // the real ALU grid
1314  mutable std::unique_ptr< GitterImplType > mygrid_;
1315 
1316  // max level of grid
1318 
1319  // count how much elements where marked
1320  mutable int coarsenMarked_;
1321  mutable int refineMarked_;
1322 
1323  // at the moment the number of different geom types is 1
1324  enum { numberOfGeomTypes = 1 };
1325  std::vector< std::vector<GeometryType> > geomTypes_;
1326 
1327  // our hierarchic index set
1329 
1330  // out global id set
1331  mutable std::unique_ptr< GlobalIdSetImp > globalIdSet_;
1332 
1333  // out global id set
1335 
1336  // the level index set ( default type )
1337  mutable std::vector < std::shared_ptr< LevelIndexSetImp > > levelIndexVec_;
1338 
1339  // the leaf index set
1340  mutable std::unique_ptr< LeafIndexSetImp > leafIndexSet_;
1341 
1342  mutable std::vector< VertexListType > vertexList_;
1343 
1344  //the ghostleaf list is used in alu3diterators, where we use the internal aluIterators
1345  // the vertex codim there is 3, so the list has to fulfill that
1347  mutable std::vector< ALU3dGridItemListType > ghostLevelList_[ 3 ];
1348 
1349  mutable std::vector< ALU3dGridItemListType > levelEdgeList_;
1350 
1352 
1353  // the type of our size cache
1354  typedef SizeCache<MyType> SizeCacheType;
1355  std::unique_ptr< SizeCacheType > sizeCache_;
1356 
1357  // variable to ensure that postAdapt ist called after adapt
1359 
1360  // pointer to Dune boundary projection
1362 
1363  // pointer to Dune boundary projection
1364  std::unique_ptr< const DuneBoundaryProjectionVector > bndVec_;
1365 
1366  // boundary projection for vertices
1367  std::unique_ptr< ALUGridBoundaryProjectionType > vertexProjection_ ;
1368 
1369  // pointer to communications object
1370  std::unique_ptr< Communications > communications_;
1371 
1372  // refinement type (nonconforming or conforming)
1374  }; // end class ALU3dGrid
1375 
1376 
1377  bool checkMacroGrid ( ALU3dGridElementType elType ,
1378  const std::string filename );
1379  const char* elType2Name( ALU3dGridElementType elType );
1380 
1381  namespace Capabilities
1382  {
1383 
1384  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm, int cdim >
1385  struct hasEntity< Dune::ALU3dGrid< dim, dimworld, elType, Comm >, cdim >
1386  {
1387  static const bool v = true;
1388  };
1389 
1390 #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
1391  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm >
1392  struct isParallel< ALU3dGrid< dim, dimworld, elType, Comm > >
1393  {
1394  static const bool v = true;
1395  };
1396 #endif //#if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
1397 
1398  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm >
1399  struct isLevelwiseConforming< ALU3dGrid< dim, dimworld, elType, Comm > >
1400  {
1401  static const bool v = true;
1402  };
1403 
1404  template< int dim, int dimworld, ALU3dGridElementType elType, class Comm >
1405  struct hasBackupRestoreFacilities< ALU3dGrid< dim, dimworld, elType, Comm > >
1406  {
1407  static const bool v = true;
1408  };
1409 
1410  } // end namespace Capabilities
1411 
1412 } // end namespace Dune
1413 
1414 #include "grid_inline.hh"
1415 #if COMPILE_ALUGRID_INLINE
1416  #include "grid_imp.cc"
1417 #endif
1418 #endif
Dune::ALU3dGrid::ileafbegin
Traits::LeafIntersectionIterator ileafbegin(const typename Traits::template Codim< 0 >::Entity &entity) const
Definition: 3d/grid.hh:681
Dune::ALU3dGrid::completeGrid
virtual void completeGrid()
Definition: 3d/grid.hh:1162
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::print
void print(std::ostream &out) const
Definition: 3d/grid.hh:189
Dune::ALU3dGridItemList
Definition: alu3dinclude.hh:425
Dune::ALU3dGrid::mark
bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
Definition: grid_inline.hh:307
Dune::ALU3dGridFamily::Traits::Codim::LocalGeometry
Dune::Geometry< dim-cd, dim, const Grid, ALU3dGridGeometry > LocalGeometry
Definition: 3d/grid.hh:371
Dune::ALU3dGridFamily::Traits::Partition
Definition: 3d/grid.hh:399
Dune::ALU3dGridLevelIntersectionIterator
Definition: 3d/grid.hh:68
Dune::ALU3dGrid::LeafIterator
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: 3d/grid.hh:608
bndprojection.hh
Dune::ALU3dGrid::HierarchicIteratorImp
ALU3dGridHierarchicIterator< const ThisType > HierarchicIteratorImp
Definition: 3d/grid.hh:610
Dune::ALUGridBaseGrid< dim, dimw, simplex, Comm >::BaseGrid
ALU3dGrid< dim, dimw, tetra, Comm > BaseGrid
Definition: 3d/grid.hh:114
Dune::ALU3dGrid::loadBalance
bool loadBalance()
Calculates load of each process and repartition by using ALUGrid's default partitioning method....
Definition: 3d/grid.hh:928
Dune::ALU3dGridFamily::Traits
Definition: 3d/grid.hh:338
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::createALUGrid
GitterImplType * createALUGrid(const std::string &macroName, ALU3DSPACE ProjectVertex *projection, const bool conformingRefinement)
Definition: 3d/grid.hh:155
Dune::ALU3dGrid::vertexProjection
ALUGridVertexProjectionType * vertexProjection()
Definition: 3d/grid.hh:1153
Dune::ALU3dGrid::GridFamily
ALU3dGridFamily< dim, dimworld, elType, Comm > GridFamily
Definition: 3d/grid.hh:526
Dune::TrivialTwists
Definition: twists.hh:586
Dune::ALU3dGrid::refineMarked_
int refineMarked_
Definition: 3d/grid.hh:1321
Dune::ALU3dGrid::getLeafVertexList
LeafVertexListType & getLeafVertexList() const
Definition: 3d/grid.hh:1195
Dune::ALU3dGrid::elementType
static const ALU3dGridElementType elementType
Definition: 3d/grid.hh:520
Dune::ALU3dGrid::Partition::MacroGridView
GridFamily::Traits::template Partition< pitype >::MacroGridView MacroGridView
Definition: 3d/grid.hh:556
Dune::ALU3dGridFamily::Traits::Codim::Twists
ALU3dGridTwists< dim, elType, cd >::Type Twists
Definition: 3d/grid.hh:364
Dune::ALU3dGridVertexList
Definition: alu3dinclude.hh:344
Dune::ALU3dGrid::DuneBoundaryProjectionVector
Traits::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
boundary projection type
Definition: 3d/grid.hh:577
Dune::ALU3dGridFamily::Traits::Codim::LocalGeometryImpl
ALU3dGridGeometry< dim-cd, dim, const Grid > LocalGeometryImpl
Definition: 3d/grid.hh:369
Dune::ALU3dGrid::ALU3dGrid
ALU3dGrid(const std::string &macroTriangFilename, const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndPrj, const DuneBoundaryProjectionVector *bndVec, const ALUGridRefinementType refinementType)
Definition: grid_inline.hh:22
Dune::ALU3dGrid::clearIsNewMarkers
void clearIsNewMarkers()
clear all entity new markers
Definition: grid_imp.cc:491
Dune::ALU3dGrid::SizeCacheType
SizeCache< MyType > SizeCacheType
Definition: 3d/grid.hh:1354
Dune::ALU3dGrid::calcExtras
void calcExtras()
reset size and global size, update Level- and LeafIndexSet, if they exist
Definition: grid_imp.cc:344
Dune::ALU3dGridFamily::Traits::LevelGridView
Partition< All_Partition >::LevelGridView LevelGridView
Definition: 3d/grid.hh:408
Dune::ALULevelCommunication
Definition: communication.hh:29
Dune::ALU3dGrid::ALUGridBoundaryProjectionType
ALUGridBoundaryProjection< ThisType, alu3d_ctype > ALUGridBoundaryProjectionType
Definition: 3d/grid.hh:591
Dune::ALU3dGridCommunicationsBase
Definition: 3d/grid.hh:121
Dune::ALU3dGrid::refineEstimate_
if one element is refined then it causes apporximately not more than this number of new elements
Definition: 3d/grid.hh:624
twists.hh
Dune::hexa
Definition: topology.hh:12
Dune::ALU3dGridVertexList::setupVxList
void setupVxList(const GridType &grid, int level)
Dune::MacroGridView
Definition: macrogridview.hh:17
Dune::ALUTwists< 2, 1 >
Definition: twists.hh:432
Dune::ALU3dGrid::leafVertexList_
LeafVertexListType leafVertexList_
Definition: 3d/grid.hh:1351
Dune::ALU3dGrid::ALUGridVertexProjectionType
ALU3DSPACE ProjectVertex ALUGridVertexProjectionType
type of ALUGrid Vertex Projection Interface
Definition: 3d/grid.hh:580
Dune::ALU3dGrid::leafIndexSet_
std::unique_ptr< LeafIndexSetImp > leafIndexSet_
Definition: 3d/grid.hh:1340
Dune::ALU3dGrid::checkMacroGrid
void checkMacroGrid()
check whether macro grid has the right element type
Definition: grid_imp.cc:644
Dune::LevelIntersectionWrapper
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:329
Dune::DefaultIndexSet
DefaultIndexSet creates an index set by using the grids persistent container an a given pair of itera...
Definition: defaultindexsets.hh:64
Dune::ALU3dGridFamily::Traits::Codim::EntityImp
ALU3dGridEntity< cd, dim, const Grid > EntityImp
Definition: 3d/grid.hh:373
Dune::ALU3dGridFamily::dim
static const int dim
Definition: 3d/grid.hh:320
Dune::ALU3dGrid::maxThreads
static int maxThreads()
return max number of threads
Definition: 3d/grid.hh:1305
Dune::ALU3dGrid::MacroGridView
Partition< All_Partition >::MacroGridView MacroGridView
Definition: 3d/grid.hh:561
Dune::ALU3dGridFamily::Traits::Codim::Partition
Definition: 3d/grid.hh:388
Dune::ALU3dGrid::refinementType_
const ALUGridRefinementType refinementType_
Definition: 3d/grid.hh:1373
Dune::ALU3dGrid::ReferenceElementType
ReferenceElement< alu3d_ctype, dimension > ReferenceElementType
reference element type
Definition: 3d/grid.hh:572
Dune::ALU3dGridFamily::Traits::HierarchicIterator
Dune::EntityIterator< 0, const Grid, ALU3dGridHierarchicIterator< const Grid > > HierarchicIterator
Definition: 3d/grid.hh:356
Dune::ALU3dGridFamily::Traits::Codim::EntitySeed
ALU3dGridEntitySeed< cd, const Grid > EntitySeed
Definition: 3d/grid.hh:377
Dune::ALU3dGrid::macroGridView
MacroGridView macroGridView() const
View for te macro grid with some alu specific methods (All_Partition)
Definition: 3d/grid.hh:818
defaultindexsets.hh
Provides default index set implementations for Level- and LeafIndexsets used by ALUGrid.
Dune::ALU3dGrid::geomTypes
const std::vector< GeometryType > & geomTypes(int codim) const
deliver all geometry types used in this grid
Definition: 3d/grid.hh:1134
typetraits.hh
Dune::ALU3dGridFamily::Traits::Grid
GridFamily::GridImp Grid
Definition: 3d/grid.hh:346
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::ALU3dGridCommunications
ALU3dGridCommunications(ALUGridNoComm comm)
Definition: 3d/grid.hh:151
Dune::ALU3dGrid::maxLevel
int maxLevel() const
Return maximum level defined in this grid. Levels are numbered maxLevel with 0 the coarsest level.
Definition: grid_inline.hh:108
Dune::ALU3dGrid::~ALU3dGrid
virtual ~ALU3dGrid()
Desctructor.
Definition: grid_imp.cc:203
Dune::ALU3dGrid::macroGridView
Partition< pitype >::MacroGridView macroGridView() const
View for te macro grid with some alu specific methods.
Definition: 3d/grid.hh:811
Dune::ALU3dGridFamily::Traits::DuneBoundaryProjectionVector
std::vector< const DuneBoundaryProjectionType * > DuneBoundaryProjectionVector
Definition: 3d/grid.hh:359
Dune::ALU3dImplTraits
Definition: alu3dinclude.hh:259
Dune::checkMacroGrid
bool checkMacroGrid(ALU3dGridElementType elType, const std::string filename)
Dune::ALUMemoryProvider
Definition: 3d/grid.hh:82
Dune::ALU3dGrid::newElementsChunk_
normal default number of new elements for new adapt method
Definition: 3d/grid.hh:617
Dune::ALU3dGridHierarchicIterator
Definition: entity.hh:30
Dune::ALU3dGridFamily::Traits::LocalIdSet
IdSet< Grid, LocalIdSetImp, LocalIdType > LocalIdSet
Definition: 3d/grid.hh:418
Dune::ALUGridRefinementType
ALUGridRefinementType
available refinement types for ALUGrid
Definition: declaration.hh:23
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::getBuilder
static ALU3DSPACE Gitter::Geometric::BuilderIF & getBuilder(GitterImplType &grid)
Definition: 3d/grid.hh:178
Dune::LeafIntersectionWrapper
Definition: intersectioniteratorwrapper.hh:224
Dune::ALU3dGrid::createLevelIndexSet
std::shared_ptr< LevelIndexSetImp > createLevelIndexSet(int level) const
Definition: 3d/grid.hh:876
Dune::ALU3dGrid::size
int size(int level, int cd) const
number of grid entities per level and codim
Definition: grid_imp.cc:218
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::createALUGrid
GitterImplType * createALUGrid(std::istream &stream, ALU3DSPACE ProjectVertex *projection, const bool conformingRefinement)
Definition: 3d/grid.hh:165
Dune::ALU3dGrid::maxlevel_
int maxlevel_
Definition: 3d/grid.hh:1317
Dune::ALU3dGrid::LocalIdSet
Traits::LocalIdSet LocalIdSet
Type of the local id set.
Definition: 3d/grid.hh:603
Dune::ALU3dGridFamily::Traits::Codim::LevelIterator
Partition< All_Partition >::LevelIterator LevelIterator
Definition: 3d/grid.hh:394
Dune::ALU3dGrid::ileafend
Traits::LeafIntersectionIterator ileafend(const typename Traits::template Codim< 0 >::Entity &entity) const
Definition: 3d/grid.hh:689
Dune::tetra
Definition: topology.hh:12
Dune::ALU3dGridFamily::Traits::Codim::Partition::LevelIterator
Dune::EntityIterator< cd, const Grid, ALU3dGridLevelIterator< cd, pitype, const Grid > > LevelIterator
Definition: 3d/grid.hh:390
Dune::ALU3dGrid::GatherScatterType
ALU3DSPACE GatherScatter GatherScatterType
Definition: 3d/grid.hh:891
Dune::ALU3dGridFamily::Traits::LevelIntersection
Dune::Intersection< const Grid, LevelIntersectionWrapper< const Grid > > LevelIntersection
Definition: 3d/grid.hh:349
Dune::ALU3dGridFamily::Traits::CollectiveCommunication
ALU3dGridCommunications< dim, dimworld, elType, Comm >::CollectiveCommunication CollectiveCommunication
Type of the communication class.
Definition: 3d/grid.hh:422
Dune::ALULeafCommunication
Definition: communication.hh:26
Dune::ALU3dGridFamily::LeafIndexSetImp
Traits ::LeafIndexSetImp LeafIndexSetImp
Type of the leaf index set implementation.
Definition: 3d/grid.hh:429
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::GlobalIdSet
ALU3dGridLocalIdSet< dim, dimworld, elType, ALUGridNoComm > GlobalIdSet
Definition: 3d/grid.hh:144
Dune::ALU3dGrid::LeafIndexSetImp
GridFamily::LeafIndexSetImp LeafIndexSetImp
Type of the leaf index set, needed by data handle.
Definition: 3d/grid.hh:569
Dune::ALU3dGrid::name
static std::string name()
for grid identification
Definition: grid_inline.hh:443
Dune::ALU3dGrid::dimension
static const int dimension
Definition: 3d/grid.hh:529
Dune::ALU3dGrid::ghostLevelList_
std::vector< ALU3dGridItemListType > ghostLevelList_[3]
Definition: 3d/grid.hh:1347
Dune::ALU3dGrid::LevelIndexSetImp
GridFamily::LevelIndexSetImp LevelIndexSetImp
Type of the level index set, needed by data handle.
Definition: 3d/grid.hh:567
Dune::ALU3dGrid::repartition
bool repartition(LBDestinations &destinations)
Distribute the grid based on a user defined partitioning.
Definition: 3d/grid.hh:995
Dune::ALU3dGrid::IntersectionIteratorImp
ALU3dGridIntersectionIterator< const ThisType > IntersectionIteratorImp
Definition: 3d/grid.hh:503
Dune::ALU3dGrid::getBuilder
virtual ALU3DSPACE Gitter::Geometric::BuilderIF & getBuilder() const
Definition: 3d/grid.hh:1156
Dune::ALU3dGrid::levelEdgeList_
std::vector< ALU3dGridItemListType > levelEdgeList_
Definition: 3d/grid.hh:1349
Dune::ALU3dGrid::Codim
Definition: 3d/grid.hh:533
Dune::ALU3dGridMakeableEntity
Definition: 3d/grid.hh:72
Dune::ALU3dGridEntitySeed
Definition: entityseed.hh:11
Dune::ALU3dGrid::ghostSize
int ghostSize(int level, int codim) const
ghostSize is one for codim 0 and zero otherwise for this grid
Definition: grid_imp.cc:294
Dune::ALU3dGrid::LevelGridView
Partition< All_Partition >::LevelGridView LevelGridView
View types for All_Partition.
Definition: 3d/grid.hh:559
Dune::ALU3dGrid::getGhostLeafList
ALU3dGridItemListType & getGhostLeafList(int codim) const
Definition: 3d/grid.hh:1216
Dune::ALULocalGeometryStorage
Definition: 3d/grid.hh:86
Dune::ALU3dGridFamily::Traits::LeafGridView
Partition< All_Partition >::LeafGridView LeafGridView
Definition: 3d/grid.hh:407
Dune::ALU3dGridLeafIterator
Leaf iterator.
Definition: entity.hh:34
Dune::HasObjectStream
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:14
Dune::ALUGridNoComm
type of class for specialization of serial ALUGrid (No_Comm as communicator)
Definition: declaration.hh:30
Dune::ALU3dGrid::LeafIntersectionIteratorImp
ALU3dGridIntersectionIterator< const ThisType > LeafIntersectionIteratorImp
Definition: 3d/grid.hh:505
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::completeGrid
static void completeGrid(GitterImplType &grid)
Definition: 3d/grid.hh:187
interfaces.hh
Provides a Interfaces for detection of specific behavior.
Dune::ALU3dGrid::entity
Traits ::template Codim< EntitySeed ::codimension >::Entity entity(const EntitySeed &seed) const
Definition: 3d/grid.hh:1186
Dune::ALU3dGridTwists
Definition: 3d/grid.hh:274
Dune::IntersectionIteratorWrapper
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:25
Dune::ALU3dGrid::calcMaxLevel
void calcMaxLevel()
calculate maxlevel
Definition: grid_imp.cc:311
Dune::ALU3dGrid::MPICommunicatorType
Comm MPICommunicatorType
Definition: 3d/grid.hh:627
Dune::ALU3dGrid::Partition::LeafGridView
GridFamily::Traits::template Partition< pitype >::LeafGridView LeafGridView
Definition: 3d/grid.hh:554
Dune::ALU3dGridFamily::LevelIndexSetImp
Traits ::LevelIndexSetImp LevelIndexSetImp
Type of the level index set implementation.
Definition: 3d/grid.hh:426
Dune::ALU3dGrid::communicate
LeafCommunication communicate(CommDataHandleIF< DataHandle, Data > &data, InterfaceType iftype, CommunicationDirection dir) const
Communicate information on distributed entities on the leaf grid. Template parameter is a model of Du...
Definition: 3d/grid.hh:1050
Dune::ALU3dGrid::postAdapt
void postAdapt()
clear all entity new markers if lockPostAdapt_ is set
Definition: grid_imp.cc:533
Dune::ALU3dGrid::overlapSize
int overlapSize(int level, int codim) const
overlapSize is zero for this grid
Definition: 3d/grid.hh:1028
Dune::ALU3dGridFamily::LocalIdType
int LocalIdType
type of ALU3dGrids local id
Definition: 3d/grid.hh:336
Dune::ALU3dGrid::Codim::EntityPointerImpl
Traits::template Codim< codim >::EntityPointerImpl EntityPointerImpl
Definition: 3d/grid.hh:537
Dune::ALU3dGrid::LeafCommunication
ALULeafCommunication< dim, dimworld, elType, Comm > LeafCommunication
Definition: 3d/grid.hh:585
Dune::ALU3dGridVertexList::up2Date
bool up2Date() const
Definition: alu3dinclude.hh:357
Dune::ALU3dGridFamily::Traits::LeafIntersectionIterator
Dune::IntersectionIterator< const Grid, LeafIntersectionIteratorWrapper< const Grid >, LeafIntersectionWrapper< const Grid > > LeafIntersectionIterator
Definition: 3d/grid.hh:353
Dune::ALU3dGridTwists< dim, hexa, 0 >::Type
TrivialTwists< GenericGeometry::CubeTopology< dim >::type::id, dim > Type
Definition: 3d/grid.hh:285
Dune::simplex
use only simplex elements (i.e., triangles or tetrahedra)
Definition: declaration.hh:18
Dune::alu3d_ctype
double alu3d_ctype
Definition: alu3dinclude.hh:85
Dune::ALU3dGridGlobalIdSet
Definition: 3d/grid.hh:76
alu3dinclude.hh
Dune::ALU3dGrid::vertexProjection_
std::unique_ptr< ALUGridBoundaryProjectionType > vertexProjection_
Definition: 3d/grid.hh:1367
Dune::ALU3dGrid::referenceElement
static const ReferenceElementType & referenceElement()
return reference to Dune reference element according to elType
Definition: 3d/grid.hh:1169
Dune::ALU3dGrid::comm
const CollectiveCommunication & comm() const
Definition: 3d/grid.hh:1066
Dune::ALU3dGrid::DuneBoundaryProjectionType
Traits::DuneBoundaryProjectionType DuneBoundaryProjectionType
boundary projection type
Definition: 3d/grid.hh:575
Dune::ALU3dGridFamily::Traits::MacroGridView
Partition< All_Partition >::MacroGridView MacroGridView
Definition: 3d/grid.hh:406
Dune::ALU3dGridFamily::GridFamily
ALU3dGridFamily< dim, dimworld, elType, Comm > GridFamily
Definition: 3d/grid.hh:324
Dune::ALU3dGrid::communicate
LevelCommunication communicate(CommDataHandleIF< DataHandle, Data > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
Definition: 3d/grid.hh:1038
Dune::ALU3dGrid::numberOfGeomTypes
Definition: 3d/grid.hh:1324
Dune::ALU3dGrid::conformingRefinement
bool conformingRefinement() const
Definition: 3d/grid.hh:1290
Dune::ALU3dGrid::accessLevelIndexSet
std::shared_ptr< LevelIndexSetImp > accessLevelIndexSet(int level) const
return instance of level index set
Definition: 3d/grid.hh:862
Dune::ALU3dGridFamily::dimworld
static const int dimworld
Definition: 3d/grid.hh:321
Dune::ALU3dGrid::levelIndexSet
const Traits ::LevelIndexSet & levelIndexSet(int level) const
get level index set of the grid
Definition: 3d/grid.hh:848
Dune::ALU3dGrid::LocalIdSetImp
GridFamily::LocalIdSetImp LocalIdSetImp
Type of the local id set.
Definition: 3d/grid.hh:594
Dune::ALU3dGrid::ilevelbegin
Traits::LevelIntersectionIterator ilevelbegin(const typename Traits::template Codim< 0 >::Entity &entity) const
Definition: 3d/grid.hh:697
Dune::ALU3dGridFamily::Traits::Partition::LevelGridView
Dune::GridView< ALU3dLevelGridViewTraits< const Grid, pitype > > LevelGridView
Definition: 3d/grid.hh:401
macrogridview.hh
Dune::ALU3dGrid::boundaryProjection
const DuneBoundaryProjectionType * boundaryProjection(const int segmentIndex) const
return boudanry projection for given segment Id
Definition: 3d/grid.hh:1264
Dune::ALU3dGridFamily::Traits::Codim::Entity
Dune::Entity< cd, dim, const Grid, ALU3dGridEntity > Entity
Definition: 3d/grid.hh:374
Dune::ALU3dGridFamily::Traits::LevelIndexSetImp
DefaultIndexSet< GridImp, typename Codim< 0 >::LevelIterator > LevelIndexSetImp
Type of the level index set.
Definition: 3d/grid.hh:411
Dune::ALU3dGrid::localIdSet
const LocalIdSet & localIdSet() const
get global id set of grid
Definition: 3d/grid.hh:842
Dune::ALU3dGridFamily::Traits::LevelIndexSet
IndexSet< Grid, LevelIndexSetImp > LevelIndexSet
Definition: 3d/grid.hh:416
Dune::ALU3dGrid::hierarchicIndexSet
const HierarchicIndexSet & hierarchicIndexSet() const
Definition: 3d/grid.hh:1105
Dune::ALU3dGridTwists< 2, elType, 2 >::Type
TrivialTwists< 0u, 0 > Type
Definition: 3d/grid.hh:303
Dune::ALU3dGrid::globalRefine
void globalRefine(int refCount)
uses the interface, mark on entity and refineLocal
Definition: grid_imp.cc:418
Dune::ALU3dGridCommunications
Definition: 3d/grid.hh:137
Dune::ALU3dGridFamily::Traits::Codim::EntityPointer
Dune::EntityPointer< const Grid, EntityPointerImpl > EntityPointer
Definition: 3d/grid.hh:384
Dune::ALU3dGrid::overlapSize
int overlapSize(int codim) const
overlapSize is zero for this grid
Definition: 3d/grid.hh:1034
Dune::ALU3dGrid::LeafIteratorType
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: 3d/grid.hh:607
Dune::ALU3dGrid::twists
Codim< cd >::Twists twists(GeometryType type) const
Definition: 3d/grid.hh:883
Dune::ALU3dGrid::recalcGlobalSize
void recalcGlobalSize()
make grid walkthrough and calc global size
alugrid_assert
#define alugrid_assert(EX)
Definition: alugrid_assert.hh:20
Dune::ALU3dGrid::getRealIntersection
static const BaseType ::template ReturnImplementationType< IntersectionType >::ImplementationType & getRealIntersection(const IntersectionType &intersection)
Definition: 3d/grid.hh:1128
Dune::ALU3dGridTwists< 3, elType, 2 >::Type
ALUTwists< 2, 1 > Type
Definition: 3d/grid.hh:297
Dune::cube
use only cube elements (i.e., quadrilaterals or hexahedra)
Definition: declaration.hh:19
indexsets.hh
Dune::ALU3dGrid::adapt
bool adapt()
Definition: grid_imp.cc:443
Dune::ALU3dGrid::lockPostAdapt_
bool lockPostAdapt_
Definition: 3d/grid.hh:1358
Dune::ALU3dGrid::finalizeGridCreation
void finalizeGridCreation()
Definition: grid_inline.hh:425
Dune::ALU3dGrid::bndPrj_
const DuneBoundaryProjectionType * bndPrj_
Definition: 3d/grid.hh:1361
communication.hh
grid_inline.hh
Dune::ALU3dGrid::ghostLeafList_
ALU3dGridItemListType ghostLeafList_[3]
Definition: 3d/grid.hh:1346
Dune::ALU3dGridFamily::Traits::Codim::Geometry
Dune::Geometry< dim-cd, dimworld, const Grid, ALU3dGridGeometry > Geometry
Definition: 3d/grid.hh:370
Dune::ALU3dGrid::VertexListType
ALU3dGridVertexList< Comm > VertexListType
Definition: 3d/grid.hh:632
Dune::ALU3dGrid::GeometryObject
MakeableInterfaceObject< typename Traits::template Codim< 0 >::Geometry > GeometryObject
Definition: 3d/grid.hh:543
Dune::ALU3dGrid::Codim::EntityImp
Traits::template Codim< codim >::EntityImp EntityImp
Definition: 3d/grid.hh:536
Dune::ALU3dGridLeafVertexList
Definition: alu3dinclude.hh:380
Dune::ALU3dGrid::dimensionworld
static const int dimensionworld
Definition: 3d/grid.hh:530
Dune::ALUGridBaseGrid
Definition: declaration.hh:78
Dune::ALU3dGridFamily::Traits::LeafIndexSetImp
DefaultIndexSet< GridImp, typename Codim< 0 >::LeafIterator > LeafIndexSetImp
Type of the leaf index set.
Definition: 3d/grid.hh:414
Dune::ALU3dGrid::hierSetSize
int hierSetSize(int cd) const
Definition: grid_inline.hh:100
Dune::ALU3dGridFactory
Factory class for ALUGrids.
Definition: 3d/grid.hh:84
Dune::ALU3dGridFamily::GlobalIdType
ALU3dGridCommunications< dim, dimworld, elType, Comm >::GlobalId GlobalIdType
type of ALU3dGrids global id
Definition: 3d/grid.hh:333
Dune::ALU3dGridIntersectionIterator
Definition: entity.hh:32
Dune::ALU3dGrid::coarsenMarked_
int coarsenMarked_
Definition: 3d/grid.hh:1320
Dune::ALU3dGrid::globalIdSet
const GlobalIdSet & globalIdSet() const
get global id set of grid
Definition: 3d/grid.hh:800
Dune::ALU3dGrid
[ provides Dune::Grid ]
Definition: communication.hh:37
Dune::ALU3dGrid::loadBalance
bool loadBalance(CommDataHandleIF< DataHandleImpl, Data > &dataHandleIF)
Calculates load of each process and repartition by using ALUGrid's default partitioning method....
Definition: 3d/grid.hh:940
Dune::ALU3dGridFamily::GlobalIdSetImp
ALU3dGridCommunications< dim, dimworld, elType, Comm >::GlobalIdSet GlobalIdSetImp
Type of the global id set.
Definition: 3d/grid.hh:330
Dune::ALU3dGrid::GitterImplType
ALU3dImplTraits< elType, Comm >::GitterImplType GitterImplType
Definition: 3d/grid.hh:612
Dune::ALU3dGridFamily
Definition: 3d/grid.hh:318
Dune::ALU3dGrid::restore
void restore(std::istream &)
restore from istream
Definition: grid_imp.cc:577
Dune::ALU3dGrid::localIdSet_
LocalIdSetImp localIdSet_
Definition: 3d/grid.hh:1334
Dune::ALU3dGrid::LevelIntersectionIteratorImp
ALU3dGridLevelIntersectionIterator< const ThisType > LevelIntersectionIteratorImp
Definition: 3d/grid.hh:507
Dune::ALU3dGrid::Traits
GridFamily::Traits Traits
Definition: 3d/grid.hh:527
Dune::ALU3dGridLeafVertexList::up2Date
bool up2Date() const
Definition: alu3dinclude.hh:394
Dune::ALU3dGrid::entityPointer
Traits ::template Codim< EntitySeed ::codimension >::EntityPointer entityPointer(const EntitySeed &seed) const
Definition: 3d/grid.hh:1178
Dune::ALU3dGrid::communications_
std::unique_ptr< Communications > communications_
Definition: 3d/grid.hh:1370
Dune::ALU3dGrid::vertexList_
std::vector< VertexListType > vertexList_
Definition: 3d/grid.hh:1342
Dune::ALU3dGrid::bndVec_
std::unique_ptr< const DuneBoundaryProjectionVector > bndVec_
Definition: 3d/grid.hh:1364
ALU3DSPACE
#define ALU3DSPACE
Definition: alu3dinclude.hh:24
Dune::ALU3dGrid::LvlInterItWrapperType
LevelIntersectionIteratorWrapper< const ThisType > LvlInterItWrapperType
Definition: 3d/grid.hh:678
Dune::ALU3dGridFamily::Traits::Partition::MacroGridView
Dune::MacroGridView< const Grid, pitype > MacroGridView
Definition: 3d/grid.hh:403
Dune::ALU3dGridTwists< dim, tetra, 0 >::Type
TrivialTwists< GenericGeometry::SimplexTopology< dim >::type::id, dim > Type
Definition: 3d/grid.hh:279
Dune::ALU3dGrid::lbegin
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
Iterator to first entity of given codim on level.
Definition: grid_inline.hh:127
Dune::ALU3dGrid::numBoundarySegments
size_t numBoundarySegments() const
number of boundary segments
Definition: grid_imp.cc:232
Dune::ALU3dGrid::LevelCommunication
ALULevelCommunication< dim, dimworld, elType, Comm > LevelCommunication
Definition: 3d/grid.hh:586
Dune::conforming
use conforming bisection refinement
Definition: declaration.hh:25
Dune::ALU3dGrid::defaultCommunicator
static MPICommunicatorType defaultCommunicator()
Definition: 3d/grid.hh:1117
Dune::ALU3dGrid::LefInterItWrapperType
LeafIntersectionIteratorWrapper< const ThisType > LefInterItWrapperType
Definition: 3d/grid.hh:677
Dune::ALU3dGrid::LeafGridView
Partition< All_Partition >::LeafGridView LeafGridView
Definition: 3d/grid.hh:560
Dune::ALU3dGridLeafVertexList::setupVxList
void setupVxList(const GridType &grid)
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::ccobj_
CollectiveCommunication ccobj_
Definition: 3d/grid.hh:192
Dune::ALU3dGridHierarchicIndexSet
hierarchic index set of ALU3dGrid
Definition: 3d/grid.hh:80
Dune::ALU3dGridFamily::Traits::DuneBoundaryProjectionType
DuneBoundaryProjection< dimworld > DuneBoundaryProjectionType
Definition: 3d/grid.hh:358
Dune::ALU3dGridGeometry
Definition: entity.hh:28
Dune::ALU3dGridFamily::Traits::GlobalIdSet
IdSet< Grid, GlobalIdSetImp, GlobalIdType > GlobalIdSet
Definition: 3d/grid.hh:419
Dune::ALU3dGrid::operator=
const ThisType & operator=(const ThisType &)
assignment operator should not be used
Definition: grid_imp.cc:194
Dune::ALU3dGridTwists< dim, elType, 3 >::Type
TrivialTwists< 0u, 0 > Type
Definition: 3d/grid.hh:309
datahandle.hh
Dune::ALU3dGrid::Partition
Types for GridView.
Definition: 3d/grid.hh:549
Dune::ALU3dGridFaceGeometryInfo
Definition: 3d/grid.hh:74
Dune::ALU3dGrid::Partition::LevelGridView
GridFamily::Traits::template Partition< pitype >::LevelGridView LevelGridView
Definition: 3d/grid.hh:552
Dune::ALU3dGridEntity
Definition: entity.hh:22
Dune::ALU3dGrid::myGrid
GitterImplType & myGrid() const
Definition: grid_inline.hh:116
Dune::ALU3dGrid::HierarchicIndexSet
ALU3dGridHierarchicIndexSet< dim, dimworld, elType, Comm > HierarchicIndexSet
Type of the hierarchic index set.
Definition: 3d/grid.hh:564
Dune::ALU3dGridElementType
ALU3dGridElementType
Definition: topology.hh:12
Dune::ALU3dGrid::OutStreamType
ObjectStreamType OutStreamType
Definition: 3d/grid.hh:524
Dune::ALU3dGrid::nlinks
int nlinks() const
Definition: 3d/grid.hh:1193
Dune::LeafIntersectionIteratorWrapper
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:250
Dune::ALU3dGridFamily::Traits::LeafIndexSet
IndexSet< Grid, LeafIndexSetImp > LeafIndexSet
Definition: 3d/grid.hh:417
Dune::ALU3dGrid::checkMacroGridFile
void checkMacroGridFile(const std::string filename)
check whether macro grid format is of our type
Definition: grid_imp.cc:605
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::GitterImplType
ALU3DSPACE GitterDuneImpl GitterImplType
Definition: 3d/grid.hh:147
Dune::ALU3dGridFamily::Traits::Codim::Partition::LeafIterator
Dune::EntityIterator< cd, const Grid, ALU3dGridLeafIterator< cd, pitype, const Grid > > LeafIterator
Definition: 3d/grid.hh:391
Dune::ALUGridMPIComm
type of class for specialization of parallel ALUGrid (MPI_Comm as communicator)
Definition: declaration.hh:39
Dune::ALU3dGridFamily::Traits::Codim
Definition: 3d/grid.hh:362
Dune::ALU3dGridFamily::GridImp
ALU3dGrid< dim, dimworld, elType, Comm > GridImp
Definition: 3d/grid.hh:323
Dune::ALUGridBoundaryProjection
ALUGrid boundary projection implementation DuneBndProjection has to fulfil the DuneBoundaryProjection...
Definition: bndprojection.hh:9
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::getRank
static int getRank(ALUGridNoComm comm)
Definition: 3d/grid.hh:176
Dune::ALUGridId
Definition: indexsets.hh:172
Dune::ALU3dGrid::getMark
int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
Definition: grid_inline.hh:322
Dune::ALU3dGrid::InStreamType
ObjectStreamType InStreamType
Definition: 3d/grid.hh:523
Dune::ALU3dGrid::LeafIteratorImp
ALU3dGridLeafIterator< 0, All_Partition, const ThisType > LeafIteratorImp
Definition: 3d/grid.hh:606
Dune::ALU3dGrid::repartition
bool repartition(LBDestinations &destinations, CommDataHandleIF< DataHandleImpl, Data > &dataHandleIF)
Distribute the grid based on a user defined partitioning.
Definition: 3d/grid.hh:1013
Dune::ALU3dGridFamily::Traits::LocalIdType
GridFamily::LocalIdType LocalIdType
type of ALU3dGrids local id
Definition: 3d/grid.hh:341
Dune::ALU3dGrid::ghostCellsEnabled
bool ghostCellsEnabled() const
Definition: 3d/grid.hh:1296
Dune::ALU3dGrid::mygrid_
std::unique_ptr< GitterImplType > mygrid_
Definition: 3d/grid.hh:1314
Dune::elType2Name
const char * elType2Name(ALU3dGridElementType elType)
Definition: grid_imp.cc:664
Dune::ALU3dGrid::createALUGrid
virtual GitterImplType * createALUGrid(std::istream &stream)
Definition: 3d/grid.hh:1147
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::nlinks
int nlinks() const
Definition: 3d/grid.hh:153
Dune::ALU3dGridFamily::Traits::LevelIntersectionIterator
Dune::IntersectionIterator< const Grid, LevelIntersectionIteratorWrapper< const Grid >, LevelIntersectionWrapper< const Grid > > LevelIntersectionIterator
Definition: 3d/grid.hh:354
Dune::ALU3dGrid::GlobalIdSetImp
GridFamily::GlobalIdSetImp GlobalIdSetImp
Definition: 3d/grid.hh:596
Dune::ALU3dGrid::updateStatus
void updateStatus()
Definition: grid_imp.cc:302
Dune::ALU3dGridFamily::Traits::Codim::EntityPointerImpl
ALU3dGridEntityPointer< cd, const Grid > EntityPointerImpl
Definition: 3d/grid.hh:383
Dune::ALU3dGrid::lend
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
one past the end on this level
Definition: grid_inline.hh:141
Dune::ALU3dGridTwists< dim, elType, 1 >::Type
ALUTwists< dim==2 ? 2 :ElementTopologyMapping< elType >::numVerticesPerFace, dim-1 > Type
Definition: 3d/grid.hh:291
Dune::ALU3dGrid::createALUGrid
virtual GitterImplType * createALUGrid(const std::string &macroName)
Definition: 3d/grid.hh:1141
Dune::ALU3dGrid::loadBalance
std::enable_if< !IsDataHandle< LBWeights >::value, bool >::type loadBalance(LBWeights &weights)
Calculates load of each process and repartition by using ALUGrid's default partitioning method,...
Definition: 3d/grid.hh:979
Dune::ALU3dGrid::Codim::Twist
Twists::Twist Twist
Definition: 3d/grid.hh:539
Dune::ALU3dGridFamily::Traits::LeafIntersection
Dune::Intersection< const Grid, LeafIntersectionWrapper< const Grid > > LeafIntersection
Definition: 3d/grid.hh:348
backuprestore.hh
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::defaultComm
static ALUGridNoComm defaultComm()
Definition: 3d/grid.hh:174
Dune::ALU3dGridFamily::Traits::IntersectionIterator
Dune::IntersectionIterator< const Grid, LeafIntersectionIteratorWrapper< const Grid >, LeafIntersectionWrapper< const Grid > > IntersectionIterator
Definition: 3d/grid.hh:351
Dune::ALU3dGrid::sizeCache_
std::unique_ptr< SizeCacheType > sizeCache_
Definition: 3d/grid.hh:1355
Dune::ALU3dGridLocalIdSet
hierarchic index set of ALU3dGrid
Definition: 3d/grid.hh:78
Dune::ALU3dGrid::hIndexSet_
HierarchicIndexSet hIndexSet_
Definition: 3d/grid.hh:1328
Dune::ALU3dGridEntityPointer
Definition: entity.hh:26
Dune::ALUGridBaseGrid< dim, dimw, cube, Comm >::BaseGrid
ALU3dGrid< dim, dimw, hexa, Comm > BaseGrid
Definition: 3d/grid.hh:108
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::GlobalId
int GlobalId
Definition: 3d/grid.hh:145
Dune::LevelIntersectionIteratorWrapper
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:354
Dune::ALU3dGrid::getEdgeList
ALU3dGridItemListType & getEdgeList(int level) const
Definition: 3d/grid.hh:1234
Dune::ALU3dGrid::makeGeometries
void makeGeometries()
Definition: grid_inline.hh:65
Dune::ALU3dGrid::Codim::Twists
Traits::template Codim< codim >::Twists Twists
Definition: 3d/grid.hh:538
Dune::ALU3dGrid::writeMacroGrid
bool writeMacroGrid(const std::string path, const std::string filename, const ALU3DSPACE MacroFileHeader::Format format=ALU3DSPACE MacroFileHeader::defaultFormat) const
write macro grid in ALUGrid macro format to path/filename.rank
Definition: grid_imp.cc:547
Dune::ALU3dGrid::CollectiveCommunication
Traits::CollectiveCommunication CollectiveCommunication
type of collective communication object
Definition: 3d/grid.hh:583
Dune::ALU3dGrid::globalIdSet_
std::unique_ptr< GlobalIdSetImp > globalIdSet_
Definition: 3d/grid.hh:1331
Dune::ALU3dGridFamily::Traits::Codim::LeafIterator
Partition< All_Partition >::LeafIterator LeafIterator
Definition: 3d/grid.hh:395
Dune::ALU3dGrid::GlobalIdSet
Traits::GlobalIdSet GlobalIdSet
Type of the global id set.
Definition: 3d/grid.hh:600
Dune::ALU3dGrid::communications
const Communications & communications() const
Definition: 3d/grid.hh:1279
Dune::ALU3dGrid::macroView
Partition< pitype >::MacroGridView macroView() const
View for te macro grid with some alu specific methods.
Definition: 3d/grid.hh:827
Dune::ALU3dGrid::loadBalance
bool loadBalance(LBWeights &weights, CommDataHandleIF< DataHandleImpl, Data > &dataHandleIF)
Calculates load of each process and repartition by using ALUGrid's default partitioning method,...
Definition: 3d/grid.hh:960
Dune::ALU3dGrid::refineStepsForHalf
Definition: 3d/grid.hh:518
Dune::ALU3dGrid::Communications
ALU3dGridCommunications< dim, dimworld, elType, Comm > Communications
Definition: 3d/grid.hh:629
Dune::ALU3dGridFamily::Traits::Codim::Twist
Twists::Twist Twist
Definition: 3d/grid.hh:365
Dune::ALU3dGridFamily::LocalIdSetImp
ALU3dGridLocalIdSet< dim, dimworld, elType, Comm > LocalIdSetImp
Type of the local id set.
Definition: 3d/grid.hh:327
gridview.hh
Dune::ALU3dGridFamily::Traits::Partition::LeafGridView
Dune::GridView< ALU3dLeafGridViewTraits< const Grid, pitype > > LeafGridView
Definition: 3d/grid.hh:402
Dune::ALU3dGrid::levelIndexVec_
std::vector< std::shared_ptr< LevelIndexSetImp > > levelIndexVec_
Definition: 3d/grid.hh:1337
Dune::ALU3dGridLeafVertexList::getLevel
int getLevel(const VertexType &vertex) const
Definition: alu3dinclude.hh:406
Dune::ALU3dGrid::getGhostLevelList
ALU3dGridItemListType & getGhostLevelList(int codim, int level) const
Definition: 3d/grid.hh:1223
Dune
Definition: alu3dinclude.hh:79
Dune::ALU3dGridFamily::Traits::GlobalIdType
GridFamily::GlobalIdType GlobalIdType
type of ALU3dGrids global id
Definition: 3d/grid.hh:344
Dune::ALU3dGrid::getVertexList
VertexListType & getVertexList(int level) const
Definition: 3d/grid.hh:1207
Dune::ALU3dGridFamily::Traits::Codim::GeometryImpl
ALU3dGridGeometry< dim-cd, dimworld, const Grid > GeometryImpl
Definition: 3d/grid.hh:368
Dune::ALU3dGrid::getLevelOfLeafVertex
int getLevelOfLeafVertex(const typename ALU3dImplTraits< elType, Comm >::VertexType &vertex) const
Definition: 3d/grid.hh:1201
grid_imp.cc
Dune::ALU3dGrid::backup
void backup(std::ostream &, const ALU3DSPACE MacroFileHeader::Format format) const
backup to ostream
Definition: grid_imp.cc:569
Dune::ALU3dGrid::preAdapt
bool preAdapt()
returns if a least one entity was marked for coarsening
Definition: grid_imp.cc:434
Dune::ALU3dGrid::thread
static int thread()
return current thread number
Definition: 3d/grid.hh:1302
Dune::ALU3dGridEntityPointerBase
Definition: entity.hh:457
Dune::HasHierarchicIndexSet
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:49
Dune::ALU3dGrid::geomTypes_
std::vector< std::vector< GeometryType > > geomTypes_
Definition: 3d/grid.hh:1325
Dune::ALUTwists
Definition: twists.hh:22
Dune::ALU3dGridCommunications< dim, dimworld, elType, ALUGridNoComm >::CollectiveCommunication
Dune::CollectiveCommunication< No_Comm > CollectiveCommunication
Definition: 3d/grid.hh:149
Dune::ALU3dGrid::LeafVertexListType
ALU3dGridLeafVertexList< Comm > LeafVertexListType
Definition: 3d/grid.hh:633
Dune::ALU3dGrid::ilevelend
Traits::LevelIntersectionIterator ilevelend(const typename Traits::template Codim< 0 >::Entity &entity) const
Definition: 3d/grid.hh:705
Dune::ALU3dGridCommunicationsBase::checkForConformingRefinement
void checkForConformingRefinement(GitterImpl *grid, const bool conformingRefinement)
Definition: 3d/grid.hh:124
topology.hh
Dune::ALU3dGrid::leafIndexSet
const Traits ::LeafIndexSet & leafIndexSet() const
get leaf index set of the grid
Definition: grid_imp.cc:403
Dune::ALU3dGrid::ObjectStreamType
ALU3DSPACE GatherScatterType::ObjectStreamType ObjectStreamType
Definition: 3d/grid.hh:522
Dune::ALU3dGrid::global_size
int global_size(int cd) const
number of grid entities on all levels for given codim
Definition: grid_inline.hh:90
intersectioniteratorwrapper.hh
Provides proxy classes for IntersectionsIterators.