dune-grid  2.3.1
alugrid/3d/iterator.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 
4 #ifndef DUNE_ALU3DGRIDITERATOR_HH
5 #define DUNE_ALU3DGRIDITERATOR_HH
6 
7 // System includes
8 
9 // Dune includes
10 #include <dune/grid/common/grid.hh>
13 
14 // Local includes
15 #include "alu3dinclude.hh"
16 #include "topology.hh"
17 #include "faceutility.hh"
18 #include "alu3diterators.hh"
19 
20 namespace Dune {
21  // Forward declarations
22  template<int cd, int dim, class GridImp>
23  class ALU3dGridEntity;
24  template<int cd, PartitionIteratorType pitype, class GridImp >
25  class ALU3dGridLevelIterator;
26  template<int cd, class GridImp >
27  class ALU3dGridEntityPointer;
28  template<int mydim, int coorddim, class GridImp>
29  class ALU3dGridGeometry;
30  template<class GridImp>
31  class ALU3dGridHierarchicIterator;
32  template<class GridImp>
33  class ALU3dGridIntersectionIterator;
34  template<int codim, PartitionIteratorType pitype, class GridImp>
35  class ALU3dGridLeafIterator;
36  template< ALU3dGridElementType, class >
37  class ALU3dGrid;
38  template< ALU3dGridElementType, class >
39  class ALU3dGridFaceInfo;
40  template< ALU3dGridElementType, class >
42 
43  //**********************************************************************
44  //
45  // --ALU3dGridIntersectionIterator
46  // --IntersectionIterator
54  template<class GridImp>
56  //: public IntersectionIteratorDefaultImplementation <GridImp,ALU3dGridIntersectionIterator>
57  {
58  enum { dim = GridImp::dimension };
59  enum { dimworld = GridImp::dimensionworld };
60 
61  typedef typename GridImp::MPICommunicatorType Comm;
62 
63  typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits;
64 
65  typedef typename ImplTraits::HElementType HElementType ;
66  typedef typename ImplTraits::HBndSegType HBndSegType;
67  typedef typename ImplTraits::GEOElementType GEOElementType;
68  typedef typename ImplTraits::IMPLElementType IMPLElementType;
69  typedef typename ImplTraits::GEOFaceType GEOFaceType;
70  typedef typename ImplTraits::NeighbourPairType NeighbourPairType;
71  typedef typename ImplTraits::BNDFaceType BNDFaceType;
72 
73  typedef typename ALU3dImplTraits< tetra, Comm >::GEOElementType GEOTetraElementType;
74  typedef typename ALU3dImplTraits< hexa, Comm >::GEOElementType GEOHexaElementType;
75  typedef typename ALU3dImplTraits< tetra, Comm >::BNDFaceType GEOTriangleBndType;
76  typedef typename ALU3dImplTraits< hexa, Comm >::BNDFaceType GEOQuadBndType;
77 
79  typedef typename std::auto_ptr< FaceInfoType > FaceInfoPointer;
80 
81  typedef typename conditional<
82  tetra == GridImp::elementType,
83  ALU3dGridGeometricFaceInfoTetra< Comm >,
84  ALU3dGridGeometricFaceInfoHexa< Comm > >::type GeometryInfoType;
85 
86  typedef ElementTopologyMapping<GridImp::elementType> ElementTopo;
87  typedef FaceTopologyMapping<GridImp::elementType> FaceTopo;
88 
89  enum { numFaces = EntityCount<GridImp::elementType>::numFaces };
90  enum { numVerticesPerFace =
91  EntityCount<GridImp::elementType>::numVerticesPerFace };
92  enum { numVertices = EntityCount<GridImp::elementType>::numVertices };
93 
94  typedef ALU3dGridIntersectionIterator<GridImp> ThisType;
95 
96  friend class ALU3dGridEntity<0,dim,GridImp>;
97  friend class IntersectionIteratorWrapper<GridImp,ThisType>;
98 
99  protected:
101 
102  typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
103  typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
104 
105  public:
106  typedef typename GridImp::GridObjectFactoryType FactoryType;
107 
108  typedef typename GridImp::template Codim<0>::Entity Entity;
109  typedef typename GridImp::template Codim<1>::Geometry Geometry;
110  typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
111 
115 
116  typedef FieldVector<alu3d_ctype, dimworld> NormalType;
118 
120 
124  HElementType *el,
125  int wLevel,bool end=false);
126 
127  ALU3dGridIntersectionIterator(const FactoryType& factory, int wLevel);
128 
131 
134 
136  bool equals (const ALU3dGridIntersectionIterator<GridImp> & i) const;
137 
139  void increment ();
140 
142  EntityPointer outside() const;
143 
145  EntityPointer inside() const;
146 
148  bool boundary () const;
149 
151  bool neighbor () const;
152 
154  int boundaryId () const;
155 
157  size_t boundarySegmentIndex() const;
158 
164 
169  Geometry geometry () const;
170 
172  GeometryType type () const;
173 
176  int indexInInside () const;
177 
182 
185  int indexInOutside () const;
186 
188  int twistInSelf() const { return twistInInside(); }
189 
191  int twistInNeighbor() const { return twistInOutside(); }
192 
194  int twistInInside() const;
195 
197  int twistInOutside() const;
198 
201  NormalType & unitOuterNormal (const FieldVector<alu3d_ctype, dim-1>& local) const ;
202 
205  NormalType & outerNormal (const FieldVector<alu3d_ctype, dim-1>& local) const;
206 
209  NormalType & integrationOuterNormal (const FieldVector<alu3d_ctype, dim-1>& local) const;
210 
212  int level () const;
213 
214  int outsideLevel () const { return connector_.outsideLevel(); }
215 
217  bool conforming () const
218  {
220  }
221 
223  const GEOFaceType& getItem() const { return connector_.face(); }
224 
225  protected:
226  // set interator to end iterator
227  void done () ;
228  template< class EntityType > void done ( const EntityType &en ) { done(); }
229 
230  // reset IntersectionIterator to first neighbour
231  void setFirstItem(const HElementType & elem, int wLevel);
232 
233  // reset IntersectionIterator to first neighbour
234  void setInteriorItem(const HElementType & elem,
235  const BNDFaceType& bnd, int wLevel);
236 
237  // reset IntersectionIterator to first neighbour
238  template <class EntityType>
239  void first(const EntityType & en, int wLevel);
240 
241  // set new face
242  void setNewFace(const GEOFaceType& newFace);
243 
244  private:
245  // set new face (only LeafIntersectionIterator)
246  void setGhostFace(const GEOFaceType& newFace);
247 
248  protected:
249  // generate local geometries
250  void buildLocalGeometries() const;
251 
252  // get the face corresponding to the index
254  getFace ( const GEOTriangleBndType &bnd, int index ) const;
255 
256  // get the face corresponding to the index
258  getFace ( const GEOQuadBndType &bnd, int index ) const;
259 
260  // get the face corresponding to the index
262  getFace ( const GEOTetraElementType &elem, int index ) const;
263 
265  getFace ( const GEOHexaElementType &elem, int index ) const;
266 
270  mutable GeometryInfoType geoProvider_; // need to initialise
271 
272  // reference to factory
274 
276  const IMPLElementType* item_;
277 
279  const BNDFaceType* ghost_;
280 
281  mutable int innerLevel_;
282  mutable int index_;
283 
287 
288  // unit outer normal
290  };
291 
292  template<class GridImp>
294  public ALU3dGridIntersectionIterator<GridImp>
295  {
296  enum { dim = GridImp::dimension };
297  enum { dimworld = GridImp::dimensionworld };
298 
299  typedef typename GridImp::MPICommunicatorType Comm;
300 
301  typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits;
302 
303  typedef typename ImplTraits::HElementType HElementType ;
304  typedef typename ImplTraits::GEOElementType GEOElementType;
305  typedef typename ImplTraits::IMPLElementType IMPLElementType;
306  typedef typename ImplTraits::GEOFaceType GEOFaceType;
307  typedef typename ImplTraits::NeighbourPairType NeighbourPairType;
308  typedef typename ImplTraits::BNDFaceType BNDFaceType;
309 
311  typedef typename std::auto_ptr< FaceInfoType > FaceInfoPointer;
312 
313  typedef typename conditional<
314  tetra == GridImp::elementType,
315  ALU3dGridGeometricFaceInfoTetra< Comm >,
316  ALU3dGridGeometricFaceInfoHexa< Comm > >::type GeometryInfoType;
317 
318  typedef ElementTopologyMapping<GridImp::elementType> ElementTopo;
319  typedef FaceTopologyMapping<GridImp::elementType> FaceTopo;
320 
321  enum { numFaces = EntityCount<GridImp::elementType>::numFaces };
322  enum { numVerticesPerFace =
323  EntityCount<GridImp::elementType>::numVerticesPerFace };
324  enum { numVertices = EntityCount<GridImp::elementType>::numVertices };
325 
326  typedef ALU3dGridIntersectionIterator<GridImp> BaseType;
327  typedef ALU3dGridLevelIntersectionIterator<GridImp> ThisType;
328 
329  friend class ALU3dGridEntity<0,dim,GridImp>;
330  friend class IntersectionIteratorWrapper<GridImp,ThisType>;
331  protected:
332  using BaseType :: item_;
333  using BaseType :: ghost_;
335  using BaseType :: index_;
338  using BaseType :: factory_;
339  using BaseType :: boundary;
340  using BaseType :: done ;
341  using BaseType :: getFace;
342  using BaseType :: neighbor ;
343 
344  public:
345  typedef typename GridImp::GridObjectFactoryType FactoryType;
346 
348 
352  HElementType *el,
353  int wLevel,bool end=false);
354 
355  ALU3dGridLevelIntersectionIterator(const FactoryType& factory, int wLevel);
356 
359 
361  void assign(const ThisType & org);
362 
364  void increment ();
365 
366  // reset IntersectionIterator to first neighbour
367  template <class EntityType>
368  void first(const EntityType & en, int wLevel);
369 
371  bool neighbor () const;
372 
374  bool conforming () const
375  {
376  assert( ( ! connector_.conformingRefinement() ) ?
377  ( !neighbor() || this->connector_.conformanceState() == FaceInfoType::CONFORMING ) : true );
378  // for conforming refinement use base implementation
379  // otherwise its true
381  BaseType :: conforming() : true ;
382  }
383  private:
384  // set new face
385  void setNewFace(const GEOFaceType& newFace);
386 
387  // reset IntersectionIterator to first neighbour
388  void setFirstItem(const HElementType & elem, int wLevel);
389 
390  // reset IntersectionIterator to first neighbour
391  void setInteriorItem(const HElementType & elem,
392  const BNDFaceType& bnd, int wLevel);
393 
394  bool levelNeighbor_;
395  bool isLeafItem_;
396  };
397 
399  //
400  // --IterationImpl
401  //
403  template <class InternalIteratorType >
405  {
406  public:
407  typedef typename InternalIteratorType :: val_t val_t;
408 
409  // here the items level will do
410  template <class GridImp, int codim>
411  class GetLevel
412  {
413  public:
414  template <class ItemType>
415  static int getLevel(const GridImp & grid, const ItemType & item, int level )
416  {
417  assert( & item );
418  return (level < 0) ? item.level() : level;
419  }
420  };
421 
422  // level is not needed for codim = 0
423  template <class GridImp>
424  class GetLevel<GridImp,0>
425  {
426  public:
427  template <class ItemType>
428  static int getLevel(const GridImp & grid, const ItemType & item, int level )
429  {
430  return level;
431  }
432  };
433 
434  template <class GridImp>
435  class GetLevel<GridImp,3>
436  {
437  public:
438  template <class ItemType>
439  static int getLevel(const GridImp & grid, const ItemType & item, int level)
440  {
441  return (level < 0) ? grid.getLevelOfLeafVertex(item) : level;
442  }
443  };
444 
445  protected:
446  // set iterator to first item
447  template <class GridImp, class IteratorImp>
448  void firstItem(const GridImp & grid, IteratorImp & it, int level )
449  {
450  InternalIteratorType & iter = it.internalIterator();
451  iter.first();
452  if( ! iter.done() )
453  {
454  assert( iter.size() > 0 );
455  setItem(grid,it,iter,level);
456  }
457  else
458  {
459  it.removeIter();
460  }
461  }
462 
463  // set the iterators entity to actual item
464  template <class GridImp, class IteratorImp>
465  void setItem (const GridImp & grid, IteratorImp & it, InternalIteratorType & iter, int level)
466  {
467  enum { codim = IteratorImp :: codimension };
468  val_t & item = iter.item();
469  assert( item.first || item.second );
470  if( item.first )
471  {
472  it.updateEntityPointer( item.first ,
473  GetLevel<GridImp,codim>::getLevel(grid, *(item.first) , level) );
474  }
475  else
476  it.updateGhostPointer( *item.second );
477  }
478 
479  // increment iterator
480  template <class GridImp, class IteratorImp>
481  void incrementIterator(const GridImp & grid, IteratorImp & it, int level)
482  {
483  // if iter_ is zero, then end iterator
484  InternalIteratorType & iter = it.internalIterator();
485 
486  iter.next();
487 
488  if(iter.done())
489  {
490  it.removeIter();
491  return ;
492  }
493 
494  setItem(grid,it,iter,level);
495  return ;
496  }
497  };
498 
499  //**********************************************************************
500  //
501  // --ALU3dGridLevelIterator
502  // --LevelIterator
506  template<int cd, PartitionIteratorType pitype, class GridImp>
507  class ALU3dGridLevelIterator
508  : public ALU3dGridEntityPointer< cd, GridImp >,
509  public ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, typename GridImp::MPICommunicatorType > >
510  {
511  enum { dim = GridImp::dimension };
512  enum { dimworld = GridImp::dimensionworld };
513 
514  typedef typename GridImp::MPICommunicatorType Comm;
515 
516  friend class ALU3dGridEntity<3,dim,GridImp>;
517  friend class ALU3dGridEntity<2,dim,GridImp>;
518  friend class ALU3dGridEntity<1,dim,GridImp>;
519  friend class ALU3dGridEntity<0,dim,GridImp>;
520  friend class ALU3dGrid< GridImp::elementType, Comm >;
521 
522  friend class ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > >;
523 
524  public:
525  typedef typename GridImp::GridObjectFactoryType FactoryType;
526 
527  typedef typename GridImp::template Codim<cd>::Entity Entity;
529 
531  typedef ALU3dGridLevelIterator<cd,pitype,GridImp> ThisType;
532  // the wrapper for the original iterator of the ALU3dGrid
533  typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > IteratorType;
535  typedef typename ALU3DSPACE IteratorElType< cd, Comm >::val_t val_t;
536 
538  ALU3dGridLevelIterator(const FactoryType& factory, int level, bool);
539 
541  ALU3dGridLevelIterator(const FactoryType& factory, int level);
542 
544  ALU3dGridLevelIterator(const ThisType & org);
545 
546  // destructor
548 
550  void increment ();
551 
553  Entity & dereference () const;
554 
556  void releaseEntity () {}
557 
559  ThisType & operator = (const ThisType & org);
560  private:
562  void assign (const ThisType & org);
563 
564  // actual level
565  int level_;
566 
567  // the internal iterator
568  IteratorType * iter_ ;
569 
570  // deletes iter_
571  void removeIter ();
572 
573  IteratorType & internalIterator ()
574  {
575  assert( iter_ );
576  return *iter_;
577  }
578  };
579 
580  //********************************************************************
581  //
582  // --ALU3dGridLeafIterator
583  // --LeafIterator
584  //
585  //********************************************************************
587  template<int cdim, PartitionIteratorType pitype, class GridImp>
588  class ALU3dGridLeafIterator
589  : public ALU3dGridEntityPointer< cdim, GridImp >,
590  public ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLeafIteratorWrapper< cdim, pitype, typename GridImp::MPICommunicatorType > >
591  {
592  enum { dim = GridImp :: dimension };
593 
594  friend class ALU3dGridEntity<cdim,dim,GridImp>;
595  enum { codim = cdim };
596 
597  typedef typename GridImp::MPICommunicatorType Comm;
598 
599  public:
600  typedef typename GridImp::GridObjectFactoryType FactoryType;
601 
602  typedef typename GridImp::template Codim<cdim>::Entity Entity;
603 
604  typedef typename ALU3DSPACE ALU3dGridLeafIteratorWrapper< cdim, pitype, Comm > IteratorType ;
606 
608  typedef typename ALU3DSPACE IteratorElType< cdim, Comm >::val_t val_t;
609 
611 
613  ALU3dGridLeafIterator(const FactoryType& factory, int level);
614 
616  ALU3dGridLeafIterator(const FactoryType& factory, int level , bool isBegin);
617 
619  ALU3dGridLeafIterator(const ThisType & org);
620 
623 
625  void increment ();
626 
628  Entity & dereference () const;
629 
631  void releaseEntity () {}
632 
634  ThisType & operator = (const ThisType & org);
635 
636  private:
637  // the internal iterator
638  IteratorType * iter_;
639 
640  // max level for iteration
641  int walkLevel_ ;
642 
644  void assign (const ThisType & org);
645 
646  // deletes iter_
647  void removeIter () ;
648 
649  // return reference to iter_
650  InternalIteratorType & internalIterator ()
651  {
652  assert( iter_ );
653  return *iter_;
654  }
655  };
656 
657  // - HierarchicIteraor
658  // --HierarchicIterator
659  template<class GridImp>
660  class ALU3dGridHierarchicIterator
661  : public ALU3dGridEntityPointer<0,GridImp>
662  // public HierarchicIteratorDefaultImplementation <GridImp,ALU3dGridHierarchicIterator>
663  {
664  typedef ALU3dGridHierarchicIterator<GridImp> ThisType;
665  enum { dim = GridImp::dimension };
666 
667  typedef typename GridImp::MPICommunicatorType Comm;
668 
669  typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits;
670  typedef typename ImplTraits::HElementType HElementType;
671  typedef typename ImplTraits::HBndSegType HBndSegType;
672 
673  template < class PointerType, class CommT >
674  class GhostElementStorage;
675 
677  template < class PointerType >
678  class GhostElementStorage< PointerType, No_Comm >
679  {
680  public:
681  GhostElementStorage() {}
682  explicit GhostElementStorage( const PointerType& ) {}
683  PointerType& operator * () { PointerType* p = 0; assert( false ); abort(); return *p; }
684  const PointerType* ghost () const { return 0; }
685  PointerType* nextGhost () const { return 0; }
686  PointerType* operator -> () const { return 0; }
687  bool operator != (const PointerType* ) const { return false; }
688  bool operator ! () const { return true ; }
689  GhostElementStorage& operator= (const GhostElementStorage& ) { return *this; }
690  GhostElementStorage& operator= (const PointerType* ) { return *this; }
691  bool valid () const { return false; }
692  };
693 
694 #if ALU3DGRID_PARALLEL
695  template < class PointerType >
697  class GhostElementStorage< PointerType, MPI_Comm >
698  {
699  private:
700  // pointers to ghost and current ghost
701  const HBndSegType * ghost_;
702  HBndSegType * nextGhost_;
703  public:
704  GhostElementStorage() : ghost_( 0 ), nextGhost_( 0 ) {}
705  explicit GhostElementStorage( const PointerType& gh ) : ghost_( &gh ), nextGhost_( 0 ) {}
706  GhostElementStorage( const GhostElementStorage& org )
707  : ghost_( org.ghost_ ), nextGhost_( org.nextGhost_ ) {}
708 
709  PointerType& operator * () { assert( nextGhost_ ); return *nextGhost_; }
710  const PointerType* ghost () const { return ghost_; }
711  PointerType* nextGhost () const { return nextGhost_; }
712  PointerType* operator -> () { return nextGhost_; }
713  bool operator != (const PointerType* p ) const { return (nextGhost_ != p); }
714  bool operator ! () const { return nextGhost_ == 0; }
715  GhostElementStorage& operator= (const GhostElementStorage& org)
716  {
717  ghost_ = org.ghost_;
718  nextGhost_ = org.nextGhost_;
719  return *this;
720  }
721  GhostElementStorage& operator= (PointerType* p)
722  {
723  nextGhost_ = p;
724  return *this;
725  }
726  bool valid () const { return (ghost_ != 0); }
727  };
728 #endif
729 
730  public:
731  typedef typename GridImp::GridObjectFactoryType FactoryType;
732 
733  typedef typename GridImp::template Codim<0>::Entity Entity;
734  typedef typename GridImp::ctype ctype;
735 
738  const HElementType & elem,
739  int maxlevel, bool end );
740 
743  const HBndSegType& ghost,
744  int maxlevel,
745  bool end);
746 
749 
751  void increment();
752 
754  Entity & dereference () const;
755 
757  void releaseEntity () {}
758 
760  ThisType & operator = (const ThisType & org);
761 
762  private:
763  // assign iterator
764  void assign(const ThisType & org);
765 
767  int getLevel(const HElementType* item) const;
768 
770  int getLevel(const HBndSegType* face) const;
771 
772  // go to next valid element
773  template <class HItemType>
774  HItemType* goNextElement (const HItemType* startElem, HItemType * oldEl);
775 
777  const HElementType * elem_;
778 
779  // pointers to ghost and current ghost
780  GhostElementStorage< HBndSegType, Comm > ghostElem_;
781 
783  int maxlevel_;
784  };
785 
786 
787 } // end namespace Dune
788 
789 #include "iterator_imp.cc"
790 
791 #endif
Entity & dereference() const
dereference Entity, faster then the entity pointersmethod
Definition: iterator.cc:459
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:731
Definition: alugrid/3d/grid.hh:68
GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl
Definition: alugrid/3d/iterator.hh:102
ThisType & operator=(const ThisType &org)
assignment of iterators
Definition: iterator.cc:200
GitterType::Geometric::hexa_GEO GEOElementType
Definition: alu3dinclude.hh:260
ALU3dGridHierarchicIterator(const FactoryType &factory, const HElementType &elem, int maxlevel, bool end)
the normal Constructor
Definition: iterator.cc:275
EntityPointer inside() const
access entity where iteration started
void increment()
prefix increment
Definition: iterator.cc:238
LocalGeometry geometryInInside() const
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition: alugrid/3d/iterator.hh:428
ALU3DSPACE ALU3dGridLeafIteratorWrapper< cdim, pitype, Comm > IteratorType
Definition: alugrid/3d/iterator.hh:604
int boundaryId() const
return information about the Boundary
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entity.hh:712
ThisType & operator=(const ThisType &org)
assignment of iterators
Definition: iterator.cc:103
Definition: alugrid/3d/entity.hh:32
void increment()
prefix increment
Definition: iterator.cc:111
GridImp::template Codim< 1 >::Geometry Geometry
Definition: alugrid/3d/iterator.hh:109
InternalIteratorType::val_t val_t
Definition: alugrid/3d/iterator.hh:407
ALU3dGridIntersectionIterator< GridImp > ImplementationType
Definition: alugrid/3d/iterator.hh:112
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
void setFirstItem(const HElementType &elem, int wLevel)
GridImp::template Codim< cdim >::Entity Entity
Definition: alugrid/3d/iterator.hh:602
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
void first(const EntityType &en, int wLevel)
void increment()
increment
Definition: iterator.cc:428
int twistInOutside() const
returns twist of face compared to outer element
void assign(const ALU3dGridIntersectionIterator< GridImp > &org)
assignment of iterators
const GEOFaceType & getItem() const
return current face
Definition: alugrid/3d/iterator.hh:223
void increment()
increment iterator
Entity & dereference() const
dereference Entity, faster then the entity pointersmethod
Definition: iterator.cc:119
void releaseEntity()
release entity
Definition: alugrid/3d/iterator.hh:556
const FactoryType & factory_
Definition: alugrid/3d/iterator.hh:273
FaceInfoType connector_
Definition: alugrid/3d/iterator.hh:269
Definition: topology.hh:13
int twistInSelf() const
returns twist of face compared to inner element
Definition: alugrid/3d/iterator.hh:188
bool boundary() const
return true if intersection is with boundary.
GitterImplType::Objects::Hbnd4Default BNDFaceType
Definition: alu3dinclude.hh:264
int level() const
return level of iterator (level of item)
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:18
void releaseEntity()
release entity
Definition: alugrid/3d/iterator.hh:757
int level() const
ask for level of entities
Definition: alugrid/3d/entity.hh:26
ALUMemoryProvider< ThisType > StorageType
Definition: alugrid/3d/iterator.hh:119
const GEOFaceType & face() const
Returns the ALU3dGrid face.
int outsideLevel() const
GeometryImpl intersectionNeighborLocal_
Definition: alugrid/3d/iterator.hh:286
#define ALU3DSPACE
Definition: alu3dinclude.hh:26
NormalType unitOuterNormal_
Definition: alugrid/3d/iterator.hh:289
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/entity.hh:613
ALU3dGridEntityPointer< 0, GridImp > EntityPointer
Definition: alugrid/3d/iterator.hh:117
GeometryInfoType geoProvider_
Definition: alugrid/3d/iterator.hh:270
void incrementIterator(const GridImp &grid, IteratorImp &it, int level)
Definition: alugrid/3d/iterator.hh:481
GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl
Definition: alugrid/3d/iterator.hh:103
int twistInInside() const
returns twist of face compared to inner element
Definition: alugrid/3d/iterator.hh:100
void increment()
increment iterator
void assign(const ThisType &org)
assignment of iterators
GitterImplType::Objects::Hbnd3Default BNDFaceType
Definition: alu3dinclude.hh:217
void setItem(const GridImp &grid, IteratorImp &it, InternalIteratorType &iter, int level)
Definition: alugrid/3d/iterator.hh:465
ConformanceState conformanceState() const
Description of conformance on the face.
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:345
const ALU3dImplTraits< tetra, Comm >::GEOFaceType * getFace(const GEOTriangleBndType &bnd, int index) const
Definition: alu3dinclude.hh:201
void setInteriorItem(const HElementType &elem, const BNDFaceType &bnd, int wLevel)
ALU3dGridIntersectionIterator(const FactoryType &factory, HElementType *el, int wLevel, bool end=false)
IteratorType InternalIteratorType
Definition: alugrid/3d/iterator.hh:607
bool neighbor() const
return true if across the face an neighbor on leaf exists
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/entity.hh:706
ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > IteratorType
Definition: alugrid/3d/iterator.hh:533
bool conforming() const
return true if intersection is conforming
Definition: alugrid/3d/iterator.hh:374
ALUMemoryProvider< ThisType > StorageType
Definition: alugrid/3d/iterator.hh:347
Entity & dereference() const
dereference Entity, faster then the entity pointersmethod
Definition: iterator.cc:247
GeometryImpl intersectionSelfLocal_
Definition: alugrid/3d/iterator.hh:285
int innerLevel_
Definition: alugrid/3d/iterator.hh:281
Definition: alugrid/3d/iterator.hh:100
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition: alugrid/3d/iterator.hh:110
GeometryImpl intersectionGlobal_
Definition: alugrid/3d/iterator.hh:284
void first(const EntityType &en, int wLevel)
ALU3dGridLevelIntersectionIterator(const FactoryType &factory, HElementType *el, int wLevel, bool end=false)
size_t boundarySegmentIndex() const
return the boundary segment index
bool neighbor() const
return true if across the edge an neighbor on this level exists
Leaf iterator.
Definition: alugrid/3d/entity.hh:34
const BNDFaceType * ghost_
current pointer to ghost face if iterator was started from ghost element
Definition: alugrid/3d/iterator.hh:279
GridImp::template Codim< 0 >::Entity Entity
Definition: alugrid/3d/iterator.hh:108
int twistInNeighbor() const
returns twist of face compared to outer element
Definition: alugrid/3d/iterator.hh:191
void done(const EntityType &en)
Definition: alugrid/3d/iterator.hh:228
ALU3dGridLeafIterator(const FactoryType &factory, int level)
Constructor for end iterators.
Definition: iterator.cc:143
NormalType & unitOuterNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
Provides proxy classes for IntersectionsIterators.
organize the memory management for entitys used by the NeighborIterator
Definition: alugrid/2d/grid.hh:69
Definition: alu3dinclude.hh:296
Definition: alugrid/3d/entity.hh:24
void releaseEntity()
release entity
Definition: alugrid/3d/iterator.hh:631
IntersectionIteratorType
Definition: alugrid/3d/iterator.hh:100
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
GeometryType type() const
obtain the type of reference element for this intersection
GitterType::Geometric::tetra_GEO GEOElementType
Definition: alu3dinclude.hh:213
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition: alugrid/3d/iterator.hh:415
GridImp::MPICommunicatorType Comm
Definition: alugrid/3d/entity.hh:686
int index_
Definition: alugrid/3d/iterator.hh:282
Different resources needed by all grid implementations.
const IMPLElementType * item_
current element from which we started the intersection iterator
Definition: alugrid/3d/iterator.hh:276
int outsideLevel() const
Definition: alugrid/3d/iterator.hh:214
Dune::Intersection< GridImp, Dune::ALU3dGridIntersectionIterator< GridImp > > Intersection
type of the intersection
Definition: alugrid/3d/iterator.hh:114
bool equals(const ALU3dGridIntersectionIterator< GridImp > &i) const
The copy constructor.
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:600
LocalGeometry geometryInOutside() const
void firstItem(const GridImp &grid, IteratorImp &it, int level)
Definition: alugrid/3d/iterator.hh:448
FieldVector< alu3d_ctype, dimworld > NormalType
Definition: alugrid/3d/iterator.hh:116
ALU3DSPACE IteratorElType< cd, Comm >::val_t val_t
Definition: alugrid/3d/iterator.hh:535
~ALU3dGridLeafIterator()
destructor deleting real iterator
Definition: iterator.cc:180
Definition: alugrid/3d/entity.hh:22
GridImp::ctype ctype
Definition: alugrid/3d/iterator.hh:734
ALU3dGridLevelIterator< cd, pitype, GridImp > ThisType
typedef of my type
Definition: alugrid/3d/iterator.hh:531
Definition: alugrid/3d/iterator.hh:411
EntityPointer outside() const
access neighbor
NormalType & outerNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
ALU3DSPACE IteratorElType< cdim, Comm >::val_t val_t
Definition: alugrid/3d/iterator.hh:608
Definition: alugrid/3d/entity.hh:583
bool conformingRefinement() const
return true if conforming refinement is enabled
Definition: faceutility.hh:140
NormalType & integrationOuterNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
ALU3dGridLeafIterator< cdim, pitype, GridImp > ThisType
Definition: alugrid/3d/iterator.hh:610
IteratorType InternalIteratorType
Definition: alugrid/3d/iterator.hh:534
void setNewFace(const GEOFaceType &newFace)
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entity.hh:619
ThisType & operator=(const ThisType &org)
the assignment operator
Definition: iterator.cc:347
GridImp::template Codim< 0 >::Entity Entity
Definition: alugrid/3d/iterator.hh:733
Definition: alugrid/3d/iterator.hh:100
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition: alugrid/3d/iterator.hh:439
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:106
bool conforming() const
return true if intersection is conforming
Definition: alugrid/3d/iterator.hh:217
Definition: alugrid/3d/iterator.hh:404
Definition: alugrid/3d/iterator.hh:41