dune-grid  2.4.1-rc2
alugrid/2d/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_ALU2DGRIDGRID_HH
4 #define DUNE_ALU2DGRIDGRID_HH
5 
6 //- System includes
7 #include "alu2dinclude.hh"
8 #include <iostream>
9 #include <vector>
10 
11 //- Dune includes
15 
16 #include <dune/grid/common/grid.hh>
21 #include <dune/common/parallel/mpihelper.hh>
22 
24 
25 // bnd projection stuff
28 
29 //- Local includes
30 #include "indexsets.hh"
32 #include "datahandle.hh"
33 
34 namespace Dune {
35 
36  // Forward declarations
37  template<int cd, int dim, class GridImp>
38  class ALU2dGridEntity;
39  template<int cd, PartitionIteratorType pitype, class GridImp >
40  class ALU2dGridLevelIterator;
41  template<int cd, class GridImp >
42  class ALU2dGridEntityPointer;
43  template<int cd, class GridImp >
44  class ALU2dGridEntitySeed;
45  template<int mydim, int coorddim, class GridImp>
47  template<int mydim, int cdim, class GridImp>
48  class ALU2dGridGeometry;
49  template<class GridImp>
51  template<class GridImp>
53  template<class GridImp>
55  template<class GridImp>
57  template<int codim, PartitionIteratorType pitype, class GridImp>
59  template <int mydim, int coorddim, class GridImp>
61  template <class GridImp>
63  template< int dim, int dimworld, ALU2DSPACE ElementType eltype >
65  template< int dim, int dimworld, ALU2DSPACE ElementType eltype >
67  template <class EntityImp>
69  template< int dim, int dimworld, ALU2DSPACE ElementType eltype >
70  class ALU2dGrid;
71  template <class GridImp, class GeometryImp, int nChild>
73 
74  class ALU2dObjectStream;
75 
76  // Internal Forward Declarations
77  // -----------------------------
78 
79  template < int dimw, class Comm >
80  struct ALUGridBaseGrid< 2, dimw, cube, Comm >
81  {
83  };
84 
85  template < int dimw, class Comm >
86  struct ALUGridBaseGrid< 2, dimw, simplex, Comm >
87  {
89  };
90 
91 
92  //
93  // --ALU2dGrid
94  // --Grid
95  //
96  //**********************************************************************
97  template< int dim, int dimworld, ALU2DSPACE ElementType eltype >
99  {
101 
104 
107 
108  typedef int GlobalIdType;
109  typedef int LocalIdType;
110 
111  struct Traits
112  {
113  typedef GridImp Grid;
114 
117 
119  typedef Dune::IntersectionIterator<const GridImp, LeafIntersectionIteratorWrapper< const GridImp >, LeafIntersectionWrapper< const GridImp > > LeafIntersectionIterator;
121 
123 
125  typedef std::vector< const DuneBoundaryProjectionType *> DuneBoundaryProjectionVector;
126 
127  template <int cd>
128  struct Codim
129  {
130  // IMPORTANT: Codim<codim>::Geometry == Geometry<dim-codim,dimw>
131  typedef ALU2dGridGeometry< dim-cd, dimworld, const GridImp > GeometryImpl;
132  typedef ALU2dGridGeometry< dim-cd, dim, const GridImp > LocalGeometryImpl;
133  typedef Dune::Geometry< dim-cd, dimworld, const GridImp, ALU2dGridGeometry > Geometry;
134  typedef Dune::Geometry< dim-cd, dim, const GridImp, ALU2dGridGeometry > LocalGeometry;
135 
136  // we could - if needed - introduce an other struct for dimglobal of Geometry
138 
141 
142  // minimal information to generate entities
144 
145  template <PartitionIteratorType pitype>
146  struct Partition
147  {
150  };
151 
154 
155  };
156 
157  template <PartitionIteratorType pitype>
158  struct Partition
159  {
164  };
165 
170 
172  typedef LeafIndexSetImp LeafIndexSet;
175 
176 #if ALU2DGRID_PARALLEL
177  typedef Dune :: CollectiveCommunication< MPI_Comm >
179 #else
180  typedef Dune :: CollectiveCommunication< GridImp >
182 #endif
183  };
184 
187 
190  }; // end of ALU2dGridFamily
191 
192 
207  template< int dim, int dimworld, ALU2DSPACE ElementType eltype >
208  class ALU2dGrid
209  : public GridDefaultImplementation< dim, dimworld, alu2d_ctype, ALU2dGridFamily< dim, dimworld, eltype > >,
210  public HasObjectStream,
211  public HasHierarchicIndexSet
212  {
213  typedef ALU2dGrid< dim, dimworld, eltype > ThisType;
215 
216  static_assert( dim == 2, "ALU2dGrid only implemented for grid dim 2." );
217  static_assert( dimworld == 2 || dimworld == 3, "ALU2dGrid only implemented for world dim 2 or 3." );
218 
219  public:
220  static const ALU2DSPACE ElementType elementType = eltype;
221 
223 
224  // new intersection iterator is a wrapper which get itersectioniteratoimp as pointers
227 
229 
230  private:
231 
232  typedef typename ALU2dImplTraits<dimworld, elementType >::HmeshType HmeshType ;
233  typedef typename ALU2dImplTraits<dimworld, elementType >::HElementType HElementType ;
235 
236  template< class > friend struct DGFBaseFactory;
237 
238  template< int, int, class > friend class ALU2dGridEntity;
239 
240  friend class ALU2dGridGeometry<0,dimworld,const ThisType>;
241  friend class ALU2dGridGeometry<1,dimworld,const ThisType>;
242  friend class ALU2dGridGeometry<dim,dimworld,const ThisType>;
243  template< class, class, int > friend class ALULocalGeometryStorage;
244 
245  friend class ALU2dGridEntityPointer<0,const ThisType>;
246  friend class ALU2dGridEntityPointer<1,const ThisType>;
247  friend class ALU2dGridEntityPointer<dim,const ThisType>;
248 
249  friend class ALU2dGridHierarchicIndexSet<dim,dimworld,elementType>;
250 
251  friend class ALU2dGridIntersectionBase < const ThisType > ;
252  friend class ALU2dGridLevelIntersectionIterator< const ThisType > ;
253  friend class ALU2dGridLeafIntersectionIterator< const ThisType > ;
254 
255  //**********************************************************
256  // The Interface Methods
257  //**********************************************************
258  protected:
259  typedef MakeableInterfaceObject<typename Traits::template
261  friend class ALULocalGeometryStorage<const ThisType, GeometryObject, 4 >;
262  friend class ALULocalGeometryStorage<const ThisType, GeometryObject, 2 >;
263 
264  public:
265 
268  typedef ObjectStreamType InStreamType ;
269  typedef ObjectStreamType OutStreamType ;
270 
273 
276 
279  typedef LocalIdSetImp GlobalIdSetImp;
280 
283 
286 
287 
292 
295  typedef typename Traits::template Codim<0>::LeafIterator LeafIteratorType;
296  typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
297 
300  typedef typename Traits::template Codim<0>::LevelIterator LevelIteratorType;
301  typedef typename Traits::template Codim<0>::LevelIterator LevelIterator;
302 
304 
306 
307 
309  enum {
311  MAXL = 64
312  };
313 
315  enum {
317  newElementsChunk_ = 100
318  };
319 
321  enum {
325  refineEstimate_ = 40
326  };
327 
332 
333 #ifdef ALUGRID_VERTEX_PROJECTION
334  typedef ALUGridSpace :: VertexProjection< dimworld > ALUGridVertexProjectionType;
336 #endif
337 
338 
339  protected:
340 
341  friend class ALUGridBoundaryProjection< ThisType >;
342  friend class ALU2dGridBoundaryProjection< ThisType >;
343  // type of ALUGrid boundary projection wrapper
345 
348  //- --constructor
349  ALU2dGrid(const std::string macroTriangFilename,
350  const int nrOfHangingNodes,
351  const DuneBoundaryProjectionType*,
352  const DuneBoundaryProjectionVector*,
353  std::istream* macroFile = 0) DUNE_DEPRECATED_MSG("ALUGrid is deprecated, please use the new module DUNE-ALUGrid.");
354 
355  // method creating mesh object
356  HmeshType* createGrid(const std::string&,
357  const int,
358  std::istream* );
359 
361  explicit ALU2dGrid( int );
362 
363  public:
365  ~ALU2dGrid();
366 
369  int maxLevel() const;
370 
373  template<int cd, PartitionIteratorType pitype>
374  typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
375  lbegin (int level) const;
376 
378  template<int cd, PartitionIteratorType pitype>
379  typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
380  lend (int level) const;
381 
383  template<int cd>
384  typename Traits::template Codim<cd>::
385  template Partition<All_Partition>::LevelIterator
386  lbegin (int level) const;
387 
389  template<int cd>
390  typename Traits::template Codim<cd>::
391  template Partition<All_Partition>::LevelIterator
392  lend (int level) const;
393 
395  LevelIteratorType lbegin (int level) const;
396 
398  LevelIteratorType lend (int level) const;
399 
401  template <int codim, PartitionIteratorType pitype>
402  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
403  leafbegin() const;
404 
406  template <int codim, PartitionIteratorType pitype>
407  typename Traits::template Codim<codim>::template Partition<pitype>::LeafIterator
408  leafend() const;
409 
411  template <int codim>
412  typename Traits::template Codim<codim>::LeafIterator
413  leafbegin() const;
414 
416  template <int codim>
417  typename Traits::template Codim<codim>::LeafIterator
418  leafend() const;
419 
420  private:
422  LeafIteratorType leafbegin () const;
423 
425  LeafIteratorType leafend () const;
426 
427  public:
429  int size (int level, int cd) const;
430 
432  int size (int codim) const;
433 
435  int size (int level, GeometryType type) const;
436 
438  int size (GeometryType type) const;
439 
441  const std::vector<GeometryType>& geomTypes (int codim) const { return geomTypes_[codim]; }
442 
443  //****************************************************************
444  // index and id sets
445  //****************************************************************
446 
448  const GlobalIdSet & globalIdSet () const;
449 
451  const LocalIdSet & localIdSet () const;
452 
454  int hierSetSize (int cd) const;
455 
457  const HierarchicIndexSet & hierarchicIndexSet () const ;
458 
460  const typename Traits :: LeafIndexSet & leafIndexSet () const;
461 
463  const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
464 
465 
466  //**********************************************************
467  // End of Interface Methods
468  //**********************************************************
469 
470  // return reference to org ALU2dGrid
471  // private method, but otherwise we have to friend class all possible
472  // types of LevelIterator ==> later
473  HmeshType & myGrid();
474  HmeshType & myGrid() const;
475 
477  void globalRefine ( int refCount );
478 
479  template< class GridImp, class DataHandle >
480  void globalRefine ( int refCount, AdaptDataHandleInterface< GridImp, DataHandle > &hamdle );
481 
483  bool preAdapt ( );
484 
486  void postAdapt ( );
487 
491  bool adapt ();
492 
493  template< class GridImp, class DataHandle >
495 
496  // refine grid
497  bool refineGrid();
498 
500  int getMark(const typename Traits::template Codim<0>::Entity & e) const;
501 
503  bool mark( int refCount , const typename Traits::template Codim<0>::Entity & e);
504 
506  const CollectiveCommunicationType & comm() const;
507  private:
508  CollectiveCommunicationType comm_;
509 
510  void updateStatus();
511 
512  void calcMaxlevel();
513 
514  void calcExtras();
515 
516  // clear refinement marker of element and all children
517  void hierarchicClear( HElementType *el );
518  public:
522 
523  protected:
524  // create GeomTypes
525  void makeGeomTypes ();
526 
527  friend class Conversion<ALU2dGrid<dim, dimworld,eltype>, HasObjectStream>;
528  friend class Conversion<const ALU2dGrid<dim, dimworld,eltype>, HasObjectStream>;
529 
530  friend class Conversion<ALU2dGrid<dim, dimworld,eltype>, HasHierarchicIndexSet>;
531  friend class Conversion<const ALU2dGrid<dim, dimworld,eltype>, HasHierarchicIndexSet>;
532 
533  private:
535  ALU2dGrid( const ThisType & g );
536 
538  ThisType & operator = (const ThisType & g);
539 
540  protected:
541  // check macro file and return const char * to filename
542  const char * checkMacroGridFile(const std::string & filename);
543 
545  mutable HmeshType* mygrid_;
546 
547  // return reference to grid
548  HmeshType& mesh() const {
549  assert(mygrid_);
550  return *mygrid_;
551  }
552 
553 #ifdef USE_SMP_PARALLEL
554  std::vector< GridObjectFactoryType > factoryVec_;
555 #else
556  GridObjectFactoryType factory_;
557 #endif
558 
560  HierarchicIndexSet hIndexSet_;
561 
563  LocalIdSetImp localIdSet_;
564 
566  mutable std::vector < LevelIndexSetImp * > levelIndexVec_;
567 
568  // at the moment the number of different geom types is 1
569  enum { numberOfGeomTypes = 1 };
570  std::vector< std::vector<GeometryType> > geomTypes_;
571 
573  mutable LeafIndexSetImp * leafIndexSet_;
574 
576  int refineMarked_ , coarsenMarked_;
577  const int nrOfHangingNodes_;
578 
581  SizeCacheType * sizeCache_;
582 
583  // flag to make sure postAdapt is called after adapt
585 
586  // pointer to Dune boundary projection
587  const DuneBoundaryProjectionType* bndPrj_;
588 
589  // pointer to Dune boundary projection
590  const DuneBoundaryProjectionVector* bndVec_;
591 
592  // boundary projection for vertices
593  ALUGridBoundaryProjectionType* vertexProjection_ ;
594 
595  const DuneBoundaryProjectionType *globalProjection () const
596  {
597  return bndPrj_;
598  }
599 
601  const DuneBoundaryProjectionType* boundaryProjection(const int segmentIndex) const
602  {
603  if( bndPrj_ )
604  {
605  return bndPrj_;
606  }
607  else
608  {
609  // note pointer can be zero (identity mapping)
610  assert( bndVec_ );
611  assert( segmentIndex < (int) bndVec_->size() );
612  return (*bndVec_)[ segmentIndex ];
613  }
614  }
615 
616  public:
618  size_t numBoundarySegments () const
619  {
620 #ifdef ALUGRID_VERTEX_PROJECTION
621  return myGrid().numMacroBndSegments();
622 #else
623  derr << "Method available in any version of ALUGrid > 1.14 \n";
624  return 0;
625 #endif
626  }
627 
630  {
631  return (vertexProjection_ != 0);
632  }
633 
634  using BaseType :: getRealImplementation ;
635 
636  public:
637  template< class IntersectionType >
638  const typename BaseType
639  :: template ReturnImplementationType< IntersectionType>
640  :: ImplementationType &
641  getRealIntersection ( const IntersectionType &intersection ) const
642  {
643  return this->getRealImplementation( intersection );
644  }
645 
646  const GridObjectFactoryType& factory() const {
647 #ifdef USE_SMP_PARALLEL
648  assert( (int) factoryVec_.size() > GridObjectFactoryType :: threadNumber() );
649  return factoryVec_[ GridObjectFactoryType :: threadNumber() ];
650 #else
651  return factory_;
652 #endif
653  }
654 
655  protected:
656  // max level of grid
658  friend class IntersectionIteratorWrapper < const ThisType, LeafIntersectionIteratorImp > ;
659  friend class IntersectionIteratorWrapper < const ThisType, LevelIntersectionIteratorImp > ;
660  friend class LeafIntersectionIteratorWrapper < const ThisType > ;
661  friend class LevelIntersectionIteratorWrapper< const ThisType > ;
662 
663  mutable ALU2dGridMarkerVector marker_[MAXL];
664  public:
666  private:
667  // always update this marker!!!
668  mutable ALU2dGridLeafMarkerVectorType leafMarker_;
669 
670  public:
671  template < class EntitySeed >
672  typename Traits :: template Codim< EntitySeed :: codimension > :: EntityPointer
673  entityPointer( const EntitySeed& seed ) const
674  {
675  enum { codim = EntitySeed :: codimension };
677  return ALUPointer( factory(), seed ) ;
678  }
679 
683  {
684  assert( level >= 0);
685  assert( level <= MAXL);
686  return marker_[level];
687  }
688 
691  ALU2dGridLeafMarkerVectorType & getLeafMarker() const
692  {
693  return leafMarker_;
694  }
695 
698  template <GrapeIOFileFormatType ftype>
699  bool writeGrid( const std::string filename, alu2d_ctype time ) const ;
700 
701  bool writeGrid_Xdr( const std::string filename, alu2d_ctype time ) const ;
702  bool writeGrid_Ascii( const std::string filename, alu2d_ctype time ) const ;
703 
706  template <GrapeIOFileFormatType ftype>
707  bool readGrid( const std::string filename, alu2d_ctype & time );
708 
710  void backup( std::ostream& ) const ;
711 
713  void restore( std::istream& ) ;
714 
716  bool conformingRefinement () const
717  {
718  return ! nonConform ();
719  }
720 
721  protected:
724  bool nonConform () const
725  {
726  return (nrOfHangingNodes_ > 0);
727  }
728 
729 #if ALU2DGRID_PARALLEL
730  typedef RankManager<ThisType> RankManagerType;
731  RankManagerType rankManager_;
732  public:
733  const RankManagerType& rankManager() const
734  {
735  return rankManager_;
736  }
737 #endif
738 
739  public:
741  template<class DataHandleImp,class DataTypeImp>
742  void communicate (CommDataHandleIF<DataHandleImp,DataTypeImp> & data,
743  InterfaceType iftype, CommunicationDirection dir, int level) const;
744 
748  template<class DataHandleImp,class DataTypeImp>
749  void communicate (CommDataHandleIF<DataHandleImp,DataTypeImp> & data,
750  InterfaceType iftype, CommunicationDirection dir) const;
751 
752  int ghostSize ( int level, int codim ) const
753  {
754  return ghostSize( codim );
755  }
756 
757  int ghostSize ( int codim ) const
758  {
759 #if ALU2DGRID_PARALLEL
760  return 1;
761 #else
762  return 0;
763 #endif
764  }
765 
767  bool loadBalance() ;
768 
770  template<class DataHandle>
771  bool loadBalance(DataHandle& data) ;
772 
773  void checkManager() {
774 #if ALU2DGRID_PARALLEL
775  rankManager_.notifyMarking () ;
776 #endif
777  }
778 
779  }; // end class ALU2dGrid
780 
781  namespace Capabilities
782  {
783  template<int dim, int dimw, ALU2DSPACE ElementType eltype, int cdim>
784  struct hasEntity<ALU2dGrid<dim,dimw,eltype>, cdim >
785  {
786  static const bool v = true;
787  };
788 
789  template<int dim, int dimw, ALU2DSPACE ElementType eltype>
790  struct isLevelwiseConforming< ALU2dGrid<dim,dimw,eltype> >
791  {
792  static const bool v = false;
793  };
794 
795  } // end namespace Capabilities
796 
797 } // end namespace Dune
798 
799 #include "entity.hh"
800 #include "geometry.hh"
803 
804 #include "grid_imp.cc"
805 
806 #endif
Definition: objectfactory.hh:23
Id Set Interface.
Definition: common/grid.hh:362
Interface class for the Grid&#39;s adapt method where the parameter is a AdaptDataHandleInterface.
Definition: adaptcallback.hh:30
Class that wraps IntersectionIteratorImp of a grid and gets it&#39;s internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:306
int ghostSize(int level, int codim) const
Definition: alugrid/2d/grid.hh:752
DefaultIndexSet creates an index set by using the grids persistent container an a given pair of itera...
Definition: defaultindexsets.hh:66
Specialize with &#39;true&#39; if implementation guarantees conforming level grids. (default=false) ...
Definition: common/capabilities.hh:98
ALU2dGridObjectStream ObjectStreamType
dummy object stream
Definition: alugrid/2d/grid.hh:267
Definition: alugrid/2d/entityseed.hh:10
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
Traits::template Codim< EntitySeed::codimension >::EntityPointer entityPointer(const EntitySeed &seed) const
Definition: alugrid/2d/grid.hh:673
GridFamily::LevelIndexSetImp LevelIndexSetImp
Type of the level index set.
Definition: alugrid/2d/grid.hh:289
ObjectStreamType OutStreamType
Definition: alugrid/2d/grid.hh:269
ALUGridObjectFactory< ThisType > GridObjectFactoryType
Definition: alugrid/2d/grid.hh:228
const GridObjectFactoryType & factory() const
Definition: alugrid/2d/grid.hh:646
[ provides Dune::Grid ]
Definition: alugrid/common/declaration.hh:63
Provides a Interfaces for detection of specific behavior.
const int nrOfHangingNodes_
Definition: alugrid/2d/grid.hh:577
IdSet< GridImp, LocalIdSetImp, LocalIdType > LocalIdSet
Definition: alugrid/2d/grid.hh:174
int GlobalIdType
Definition: alugrid/2d/grid.hh:108
Interface class for vertex projection at the boundary.
Definition: boundaryprojection.hh:23
Wrapper class for geometries.
Definition: common/geometry.hh:65
ALU2dGridEntityPointer< cd, const GridImp > EntityPointerImpl
Definition: alugrid/2d/grid.hh:139
MakeableInterfaceObject< typename Traits::template Codim< 2 >::Entity > VertexObject
Definition: alugrid/2d/grid.hh:521
std::vector< const DuneBoundaryProjectionType * > DuneBoundaryProjectionVector
Definition: alugrid/2d/grid.hh:125
Definition: intersectioniteratorwrapper.hh:210
ALU2dGridLevelIterator< 0, All_Partition, const ThisType > LevelIteratorImp
a standard leaf iterator
Definition: alugrid/2d/grid.hh:299
Definition: alugrid/2d/grid.hh:62
#define ALU2DSPACE
Definition: alu2dinclude.hh:34
Definition: alugrid/2d/grid.hh:158
Dune::EntityIterator< cd, const GridImp, ALU2dGridLevelIterator< cd, pitype, const GridImp > > LevelIterator
Definition: alugrid/2d/grid.hh:148
Definition: alugrid/2d/grid.hh:60
ElementType
Definition: alu2dinclude.hh:55
Traits::template Codim< 0 >::LevelIterator LevelIteratorType
Definition: alugrid/2d/grid.hh:300
Definition: alugrid/common/declaration.hh:67
Definition: alugrid/2d/grid.hh:52
Traits::template Codim< 0 >::LeafIterator LeafIterator
Definition: alugrid/2d/grid.hh:296
organize the memory management for entitys used by the NeighborIterator
Definition: alugrid/2d/grid.hh:68
GeometryType
Type representing VTK&#39;s entity geometry types.
Definition: common.hh:178
double alu2d_ctype
Definition: alu2dinclude.hh:63
MakeableInterfaceObject< typename Traits::template Codim< 1 >::Entity > FaceObject
Definition: alugrid/2d/grid.hh:520
hierarchic index set of ALU2dGrid
Definition: alugrid/2d/grid.hh:66
ALU2dGridMarkerVector & getMarkerVector(int level) const
Definition: alugrid/2d/grid.hh:682
Definition: alugrid/2d/grid.hh:72
Definition: alugrid/common/declaration.hh:18
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:168
std::vector< std::vector< GeometryType > > geomTypes_
Definition: alugrid/2d/grid.hh:570
Wrapper class for entities.
Definition: common/entity.hh:61
Dune::GridView< DefaultLevelGridViewTraits< const GridImp, pitype > > LevelGridView
Definition: alugrid/2d/grid.hh:161
Definition: alu2dinclude.hh:288
Partition< All_Partition >::LeafIterator LeafIterator
Definition: alugrid/2d/grid.hh:153
ALU2dGridLeafMarkerVectorType & getLeafMarker() const
Definition: alugrid/2d/grid.hh:691
Partition< All_Partition >::LevelIterator LevelIterator
Definition: alugrid/2d/grid.hh:152
int LocalIdType
Definition: alugrid/2d/grid.hh:109
Definition: alugrid/2d/entity.hh:36
Definition: alugrid/2d/entity.hh:24
MakeableInterfaceObject< typename Traits::template Codim< 0 >::Entity > EntityObject
Definition: alugrid/2d/grid.hh:519
bool lockPostAdapt_
Definition: alugrid/2d/grid.hh:584
GridImp Grid
Definition: alugrid/2d/grid.hh:113
Provides proxy classes for IntersectionsIterators.
GridObjectFactoryType factory_
Definition: alugrid/2d/grid.hh:556
DuneBoundaryProjection< dimworld > DuneBoundaryProjectionType
Definition: alugrid/2d/grid.hh:124
Definition: alugrid/2d/entity.hh:30
all entities
Definition: gridenums.hh:139
Wrapper class for pointers to entities.
Definition: common/entitypointer.hh:112
Definition: common/geometry.hh:24
ALU2dGrid< 2, dimw, ALU2DSPACE triangle > BaseGrid
Definition: alugrid/2d/grid.hh:88
const DuneBoundaryProjectionVector * bndVec_
Definition: alugrid/2d/grid.hh:590
IdSet< GridImp, GlobalIdSetImp, GlobalIdType > GlobalIdSet
Definition: alugrid/2d/grid.hh:173
ALU2dGrid< dim, dimworld, eltype > GridImp
Definition: alugrid/2d/grid.hh:100
Definition: alugrid/common/declaration.hh:18
ALU2dGridLeafMarkerVector ALU2dGridLeafMarkerVectorType
Definition: alugrid/2d/grid.hh:665
Tagging interface to indicate that Grid provides typedef ObjectStreamType.
Definition: interfaces.hh:16
Dune::EntityIterator< 0, const GridImp, ALU2dGridHierarchicIterator< const GridImp > > HierarchicIterator
Definition: alugrid/2d/grid.hh:122
DefaultIndexSet< GridImp, typename Codim< 0 >::LevelIterator > LevelIndexSetImp
Type of the level index set.
Definition: alugrid/2d/grid.hh:167
bool conformingRefinement() const
return true if grid uses conforming refinement
Definition: alugrid/2d/grid.hh:716
Traits::DuneBoundaryProjectionType DuneBoundaryProjectionType
boundary projection type
Definition: alugrid/2d/grid.hh:329
const DuneBoundaryProjectionType * boundaryProjection(const int segmentIndex) const
return boudanry projection for given segment Id
Definition: alugrid/2d/grid.hh:601
hierarchic index set of ALU3dGrid
Definition: alugrid/2d/grid.hh:64
Hierarchic Iterator of ALU2dGrid.
Definition: alugrid/2d/entity.hh:28
CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
Definition: datahandleif.hh:72
IndexSet< GridImp, LevelIndexSetImp > LevelIndexSet
Definition: alugrid/2d/grid.hh:171
LocalIdSetImp localIdSet_
out global id set
Definition: alugrid/2d/grid.hh:563
Definition: alugrid/2d/entity.hh:26
Class that wraps IntersectionIteratorImp of a grid and gets it&#39;s internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:327
Index Set Interface base class.
Definition: common/grid.hh:361
int ghostSize(int codim) const
Definition: alugrid/2d/grid.hh:757
ALU2dGridHierarchicIterator< ThisType > HierarchicIteratorImp
Definition: alugrid/2d/grid.hh:303
ALU2dGridLocalIdSet< dim, dimworld, elementType > LocalIdSetImp
Type of the local id set.
Definition: alugrid/2d/grid.hh:278
SizeCacheType * sizeCache_
Definition: alugrid/2d/grid.hh:581
Traits::GlobalIdSet GlobalIdSet
Type of the global id set.
Definition: alugrid/2d/grid.hh:282
HmeshType * mygrid_
the real grid
Definition: alugrid/2d/grid.hh:545
Provides size cache classes to implement the grids size method efficiently.
const DuneBoundaryProjectionType * globalProjection() const
Definition: alugrid/2d/grid.hh:595
Traits::LevelIndexSetImp LevelIndexSetImp
Type of the level index set implementation.
Definition: alugrid/2d/grid.hh:186
ALU2dGridHierarchicIndexSet< dim, dimworld, elementType > HierarchicIndexSet
Type of the hierarchic index set.
Definition: alugrid/2d/grid.hh:275
std::vector< LevelIndexSetImp * > levelIndexVec_
the level index set ( default type )
Definition: alugrid/2d/grid.hh:566
Traits::template Codim< 0 >::LeafIterator LeafIteratorType
Definition: alugrid/2d/grid.hh:295
ALU2dGrid< 2, dimw, ALU2DSPACE quadrilateral > BaseGrid
Definition: alugrid/2d/grid.hh:82
ALU2dGridBoundaryProjection< ThisType > ALUGridBoundaryProjectionType
Definition: alugrid/2d/grid.hh:344
HmeshType::helement_t HElementType
Definition: alu2dinclude.hh:108
Traits::LeafIndexSetImp LeafIndexSetImp
Type of the leaf index set implementation.
Definition: alugrid/2d/grid.hh:189
Class that wraps IntersectionIteratorImp of a grid and gets it&#39;s internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:18
HmeshType & mesh() const
Definition: alugrid/2d/grid.hh:548
Dune::EntityIterator< cd, const GridImp, ALU2dGridLeafIterator< cd, pitype, const GridImp > > LeafIterator
Definition: alugrid/2d/grid.hh:149
ALU2dGridFamily< dim, dimworld, elementType >::Traits Traits
Definition: alugrid/2d/grid.hh:222
Dune::Intersection< const GridImp, LeafIntersectionWrapper< const GridImp > > LeafIntersection
Definition: alugrid/2d/grid.hh:115
HierarchicIndexSet hIndexSet_
the hierarchic index set
Definition: alugrid/2d/grid.hh:560
ALU2dGridGeometry< dim-cd, dim, const GridImp > LocalGeometryImpl
Definition: alugrid/2d/grid.hh:132
bool nonConform() const
Definition: alugrid/2d/grid.hh:724
ALUGridBoundaryProjectionType * vertexProjection_
Definition: alugrid/2d/grid.hh:593
Definition: alu2dinclude.hh:118
Dune::IntersectionIterator< const GridImp, LeafIntersectionIteratorWrapper< const GridImp >, LeafIntersectionWrapper< const GridImp > > LeafIntersectionIterator
Definition: alugrid/2d/grid.hh:119
int maxlevel_
Definition: alugrid/2d/grid.hh:657
Definition: alugrid/2d/entity.hh:32
ALU2dGridLocalIdSet< dim, dimworld, eltype > LocalIdSetImp
Type of the local id set.
Definition: alugrid/2d/grid.hh:106
LeafIndexSetImp LeafIndexSet
Definition: alugrid/2d/grid.hh:172
Traits::LocalIdSet LocalIdSet
Type of the local id set.
Definition: alugrid/2d/grid.hh:285
Dune::Entity< cd, dim, const GridImp, ALU2dGridEntity > Entity
Definition: alugrid/2d/grid.hh:137
const DuneBoundaryProjectionType * bndPrj_
Definition: alugrid/2d/grid.hh:587
Grid view abstract base class.
Definition: common/gridview.hh:58
MakeableInterfaceObject< typename Traits::template Codim< 0 >::Geometry > GeometryObject
Definition: alugrid/2d/grid.hh:260
Traits::DuneBoundaryProjectionVector DuneBoundaryProjectionVector
boundary projection type
Definition: alugrid/2d/grid.hh:331
Definition: 2d/bndprojection.hh:14
int maxLevel_
Definition: alugrid/2d/grid.hh:575
ALU2dGridFamily< dim, dimworld, eltype > GridFamily
my Traits class
Definition: alugrid/2d/grid.hh:272
ALUGrid boundary projection implementation DuneBndProjection has to fulfil the DuneBoundaryProjection...
Definition: common/bndprojection.hh:11
LocalIdSetImp GlobalIdSetImp
Definition: alugrid/2d/grid.hh:279
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition: gridenums.hh:134
Traits::CollectiveCommunication CollectiveCommunicationType
Definition: alugrid/2d/grid.hh:305
ALU2dGridEntitySeed< cd, const GridImp > EntitySeed
Definition: alugrid/2d/grid.hh:143
Provides default index set implementations for Level- and LeafIndexsets used by ALUGrid.
Dune::Geometry< dim-cd, dim, const GridImp, ALU2dGridGeometry > LocalGeometry
Definition: alugrid/2d/grid.hh:134
Definition: alu2dinclude.hh:185
interface class for an iterator over grid entitiesAn entity iterator is an iterator over a subset of ...
Definition: entityiterator.hh:35
Dune::IntersectionIterator< const GridImp, LeafIntersectionIteratorWrapper< const GridImp >, LeafIntersectionWrapper< const GridImp > > IntersectionIterator
Definition: alugrid/2d/grid.hh:118
Types for GridView.
Definition: common/grid.hh:420
SizeCache< ThisType > SizeCacheType
the type of our size cache
Definition: alugrid/2d/grid.hh:580
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
Dune::Intersection< const GridImp, LevelIntersectionWrapper< const GridImp > > LevelIntersection
Definition: alugrid/2d/grid.hh:116
Dune::Geometry< dim-cd, dimworld, const GridImp, ALU2dGridGeometry > Geometry
Definition: alugrid/2d/grid.hh:133
Definition: alugrid/2d/grid.hh:146
Include standard header files.
Definition: agrid.hh:59
Definition: common/entityseed.hh:28
ALU2dGridLocalIdSet< dim, dimworld, eltype > GlobalIdSetImp
Type of the global id set.
Definition: alugrid/2d/grid.hh:103
ALU2dGridLeafIterator< 0, All_Partition, const ThisType > LeafIteratorImp
a standard leaf iterator
Definition: alugrid/2d/grid.hh:294
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:360
STL namespace.
bool hasBoundaryProjection() const
return true if boudanry projection is set
Definition: alugrid/2d/grid.hh:629
Definition: alugrid/2d/grid.hh:98
ALU2dGridLeafIntersectionIterator< const ThisType > LeafIntersectionIteratorImp
Definition: alugrid/2d/grid.hh:225
Dune::CollectiveCommunication< GridImp > CollectiveCommunication
Definition: alugrid/2d/grid.hh:181
organizes the caching of sizes for one grid and one GeometryType
Definition: sizecache.hh:29
Traits::template Codim< 0 >::LevelIterator LevelIterator
Definition: alugrid/2d/grid.hh:301
const BaseType::template ReturnImplementationType< IntersectionType >::ImplementationType & getRealIntersection(const IntersectionType &intersection) const
Definition: alugrid/2d/grid.hh:641
A set of traits classes to store static information about grid implementation.
ALU2dGridLevelIntersectionIterator< const ThisType > LevelIntersectionIteratorImp
Definition: alugrid/2d/grid.hh:226
Definition: alugrid/2d/grid.hh:46
GridFamily::LeafIndexSetImp LeafIndexSetImp
Type of the leaf index set.
Definition: alugrid/2d/grid.hh:291
ObjectStreamType InStreamType
Definition: alugrid/2d/grid.hh:268
LeafIndexSetImp * leafIndexSet_
the leaf index set
Definition: alugrid/2d/grid.hh:573
Specialize with &#39;true&#39; for all codims that a grid implements entities for. (default=false) ...
Definition: common/capabilities.hh:57
Definition: alugrid/2d/entity.hh:20
Different resources needed by all grid implementations.
DefaultIndexSet< GridImp, typename Codim< 0 >::LeafIterator > LeafIndexSetImp
Type of the leaf index set.
Definition: alugrid/2d/grid.hh:169
Definition: alugrid/2d/grid.hh:111
Definition: alugrid/2d/grid.hh:128
size_t numBoundarySegments() const
return number of macro boundary segments
Definition: alugrid/2d/grid.hh:618
Definition: alu2dinclude.hh:97
[ provides Dune::Grid ]
Definition: alugrid/2d/entity.hh:38
Tagging interface to indicate that Grid has HierarchicIndexSet.
Definition: interfaces.hh:51
int refineMarked_
Definition: alugrid/2d/grid.hh:576
Dune::GridView< DefaultLeafGridViewTraits< const GridImp, pitype > > LeafGridView
Definition: alugrid/2d/grid.hh:163
void checkManager()
Definition: alugrid/2d/grid.hh:773
Class that wraps IntersectionIteratorImp of a grid and gets it&#39;s internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:232
ALU2dGridGeometry< dim-cd, dimworld, const GridImp > GeometryImpl
Definition: alugrid/2d/grid.hh:131
Dune::EntityPointer< const GridImp, EntityPointerImpl > EntityPointer
Definition: alugrid/2d/grid.hh:140
A Traits struct that collects all associated types of one implementation.
Definition: common/grid.hh:437
Definition: alugrid/2d/entity.hh:22
Store a reference to an entity with a minimal memory footprint.
Definition: common/entityseed.hh:23
Dune::IntersectionIterator< const GridImp, LevelIntersectionIteratorWrapper< const GridImp >, LevelIntersectionWrapper< const GridImp > > LevelIntersectionIterator
Definition: alugrid/2d/grid.hh:120