dune-grid  2.4.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::unique_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 twistInInside() const;
189 
191  int twistInOutside() const;
192 
195  NormalType & unitOuterNormal (const FieldVector<alu3d_ctype, dim-1>& local) const ;
196 
199  NormalType & outerNormal (const FieldVector<alu3d_ctype, dim-1>& local) const;
200 
203  NormalType & integrationOuterNormal (const FieldVector<alu3d_ctype, dim-1>& local) const;
204 
206  int level () const;
207 
208  int outsideLevel () const { return connector_.outsideLevel(); }
209 
211  bool conforming () const
212  {
214  }
215 
217  const GEOFaceType& getItem() const { return connector_.face(); }
218 
219  protected:
220  // set interator to end iterator
221  void done () ;
222  template< class EntityType > void done ( const EntityType &en ) { done(); }
223 
224  // reset IntersectionIterator to first neighbour
225  void setFirstItem(const HElementType & elem, int wLevel);
226 
227  // reset IntersectionIterator to first neighbour
228  void setInteriorItem(const HElementType & elem,
229  const BNDFaceType& bnd, int wLevel);
230 
231  // reset IntersectionIterator to first neighbour
232  template <class EntityType>
233  void first(const EntityType & en, int wLevel);
234 
235  // set new face
236  void setNewFace(const GEOFaceType& newFace);
237 
238  private:
239  // set new face (only LeafIntersectionIterator)
240  void setGhostFace(const GEOFaceType& newFace);
241 
242  protected:
243  // generate local geometries
244  void buildLocalGeometries() const;
245 
246  // get the face corresponding to the index
248  getFace ( const GEOTriangleBndType &bnd, int index ) const;
249 
250  // get the face corresponding to the index
252  getFace ( const GEOQuadBndType &bnd, int index ) const;
253 
254  // get the face corresponding to the index
256  getFace ( const GEOTetraElementType &elem, int index ) const;
257 
259  getFace ( const GEOHexaElementType &elem, int index ) const;
260 
264  mutable GeometryInfoType geoProvider_; // need to initialise
265 
266  // reference to factory
268 
270  const IMPLElementType* item_;
271 
273  const BNDFaceType* ghost_;
274 
275  mutable int innerLevel_;
276  mutable int index_;
277 
281 
282  // unit outer normal
284  };
285 
286  template<class GridImp>
288  public ALU3dGridIntersectionIterator<GridImp>
289  {
290  enum { dim = GridImp::dimension };
291  enum { dimworld = GridImp::dimensionworld };
292 
293  typedef typename GridImp::MPICommunicatorType Comm;
294 
295  typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits;
296 
297  typedef typename ImplTraits::HElementType HElementType ;
298  typedef typename ImplTraits::GEOElementType GEOElementType;
299  typedef typename ImplTraits::IMPLElementType IMPLElementType;
300  typedef typename ImplTraits::GEOFaceType GEOFaceType;
301  typedef typename ImplTraits::NeighbourPairType NeighbourPairType;
302  typedef typename ImplTraits::BNDFaceType BNDFaceType;
303 
305  typedef typename std::unique_ptr< FaceInfoType > FaceInfoPointer;
306 
307  typedef typename conditional<
308  tetra == GridImp::elementType,
309  ALU3dGridGeometricFaceInfoTetra< Comm >,
310  ALU3dGridGeometricFaceInfoHexa< Comm > >::type GeometryInfoType;
311 
312  typedef ElementTopologyMapping<GridImp::elementType> ElementTopo;
313  typedef FaceTopologyMapping<GridImp::elementType> FaceTopo;
314 
315  enum { numFaces = EntityCount<GridImp::elementType>::numFaces };
316  enum { numVerticesPerFace =
317  EntityCount<GridImp::elementType>::numVerticesPerFace };
318  enum { numVertices = EntityCount<GridImp::elementType>::numVertices };
319 
320  typedef ALU3dGridIntersectionIterator<GridImp> BaseType;
321  typedef ALU3dGridLevelIntersectionIterator<GridImp> ThisType;
322 
323  friend class ALU3dGridEntity<0,dim,GridImp>;
324  friend class IntersectionIteratorWrapper<GridImp,ThisType>;
325  protected:
326  using BaseType :: item_;
327  using BaseType :: ghost_;
329  using BaseType :: index_;
332  using BaseType :: factory_;
333  using BaseType :: boundary;
334  using BaseType :: done ;
335  using BaseType :: getFace;
336  using BaseType :: neighbor ;
337 
338  public:
339  typedef typename GridImp::GridObjectFactoryType FactoryType;
340 
342 
346  HElementType *el,
347  int wLevel,bool end=false);
348 
349  ALU3dGridLevelIntersectionIterator(const FactoryType& factory, int wLevel);
350 
353 
355  void assign(const ThisType & org);
356 
358  void increment ();
359 
360  // reset IntersectionIterator to first neighbour
361  template <class EntityType>
362  void first(const EntityType & en, int wLevel);
363 
365  bool neighbor () const;
366 
368  bool conforming () const
369  {
370  assert( ( ! connector_.conformingRefinement() ) ?
371  ( !neighbor() || this->connector_.conformanceState() == FaceInfoType::CONFORMING ) : true );
372  // for conforming refinement use base implementation
373  // otherwise its true
375  BaseType :: conforming() : true ;
376  }
377  private:
378  // set new face
379  void setNewFace(const GEOFaceType& newFace);
380 
381  // reset IntersectionIterator to first neighbour
382  void setFirstItem(const HElementType & elem, int wLevel);
383 
384  // reset IntersectionIterator to first neighbour
385  void setInteriorItem(const HElementType & elem,
386  const BNDFaceType& bnd, int wLevel);
387 
388  bool levelNeighbor_;
389  bool isLeafItem_;
390  };
391 
393  //
394  // --IterationImpl
395  //
397  template <class InternalIteratorType >
399  {
400  public:
401  typedef typename InternalIteratorType :: val_t val_t;
402 
403  // here the items level will do
404  template <class GridImp, int codim>
405  class GetLevel
406  {
407  public:
408  template <class ItemType>
409  static int getLevel(const GridImp & grid, const ItemType & item, int level )
410  {
411  assert( & item );
412  return (level < 0) ? item.level() : level;
413  }
414  };
415 
416  // level is not needed for codim = 0
417  template <class GridImp>
418  class GetLevel<GridImp,0>
419  {
420  public:
421  template <class ItemType>
422  static int getLevel(const GridImp & grid, const ItemType & item, int level )
423  {
424  return level;
425  }
426  };
427 
428  template <class GridImp>
429  class GetLevel<GridImp,3>
430  {
431  public:
432  template <class ItemType>
433  static int getLevel(const GridImp & grid, const ItemType & item, int level)
434  {
435  return (level < 0) ? grid.getLevelOfLeafVertex(item) : level;
436  }
437  };
438 
439  protected:
440  // set iterator to first item
441  template <class GridImp, class IteratorImp>
442  void firstItem(const GridImp & grid, IteratorImp & it, int level )
443  {
444  InternalIteratorType & iter = it.internalIterator();
445  iter.first();
446  if( ! iter.done() )
447  {
448  assert( iter.size() > 0 );
449  setItem(grid,it,iter,level);
450  }
451  else
452  {
453  it.removeIter();
454  }
455  }
456 
457  // set the iterators entity to actual item
458  template <class GridImp, class IteratorImp>
459  void setItem (const GridImp & grid, IteratorImp & it, InternalIteratorType & iter, int level)
460  {
461  enum { codim = IteratorImp :: codimension };
462  val_t & item = iter.item();
463  assert( item.first || item.second );
464  if( item.first )
465  {
466  it.updateEntityPointer( item.first ,
467  GetLevel<GridImp,codim>::getLevel(grid, *(item.first) , level) );
468  }
469  else
470  it.updateGhostPointer( *item.second );
471  }
472 
473  // increment iterator
474  template <class GridImp, class IteratorImp>
475  void incrementIterator(const GridImp & grid, IteratorImp & it, int level)
476  {
477  // if iter_ is zero, then end iterator
478  InternalIteratorType & iter = it.internalIterator();
479 
480  iter.next();
481 
482  if(iter.done())
483  {
484  it.removeIter();
485  return ;
486  }
487 
488  setItem(grid,it,iter,level);
489  return ;
490  }
491  };
492 
493  //**********************************************************************
494  //
495  // --ALU3dGridLevelIterator
496  // --LevelIterator
500  template<int cd, PartitionIteratorType pitype, class GridImp>
501  class ALU3dGridLevelIterator
502  : public ALU3dGridEntityPointer< cd, GridImp >,
503  public ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, typename GridImp::MPICommunicatorType > >
504  {
505  enum { dim = GridImp::dimension };
506  enum { dimworld = GridImp::dimensionworld };
507 
508  typedef typename GridImp::MPICommunicatorType Comm;
509 
510  friend class ALU3dGridEntity<3,dim,GridImp>;
511  friend class ALU3dGridEntity<2,dim,GridImp>;
512  friend class ALU3dGridEntity<1,dim,GridImp>;
513  friend class ALU3dGridEntity<0,dim,GridImp>;
514  friend class ALU3dGrid< GridImp::elementType, Comm >;
515 
516  friend class ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > >;
517 
518  public:
519  typedef typename GridImp::GridObjectFactoryType FactoryType;
520 
521  typedef typename GridImp::template Codim<cd>::Entity Entity;
523 
525  typedef ALU3dGridLevelIterator<cd,pitype,GridImp> ThisType;
526  // the wrapper for the original iterator of the ALU3dGrid
527  typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > IteratorType;
529  typedef typename ALU3DSPACE IteratorElType< cd, Comm >::val_t val_t;
530 
532  ALU3dGridLevelIterator(const FactoryType& factory, int level, bool);
533 
535  ALU3dGridLevelIterator(const FactoryType& factory, int level);
536 
538  ALU3dGridLevelIterator(const ThisType & org);
539 
540  // destructor
542 
544  void increment ();
545 
547  Entity & dereference () const;
548 
550  void releaseEntity () {}
551 
553  ThisType & operator = (const ThisType & org);
554  private:
556  void assign (const ThisType & org);
557 
558  // actual level
559  int level_;
560 
561  // the internal iterator
562  IteratorType * iter_ ;
563 
564  // deletes iter_
565  void removeIter ();
566 
567  IteratorType & internalIterator ()
568  {
569  assert( iter_ );
570  return *iter_;
571  }
572  };
573 
574  //********************************************************************
575  //
576  // --ALU3dGridLeafIterator
577  // --LeafIterator
578  //
579  //********************************************************************
581  template<int cdim, PartitionIteratorType pitype, class GridImp>
582  class ALU3dGridLeafIterator
583  : public ALU3dGridEntityPointer< cdim, GridImp >,
584  public ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLeafIteratorWrapper< cdim, pitype, typename GridImp::MPICommunicatorType > >
585  {
586  enum { dim = GridImp :: dimension };
587 
588  friend class ALU3dGridEntity<cdim,dim,GridImp>;
589  enum { codim = cdim };
590 
591  typedef typename GridImp::MPICommunicatorType Comm;
592 
593  public:
594  typedef typename GridImp::GridObjectFactoryType FactoryType;
595 
596  typedef typename GridImp::template Codim<cdim>::Entity Entity;
597 
598  typedef typename ALU3DSPACE ALU3dGridLeafIteratorWrapper< cdim, pitype, Comm > IteratorType ;
600 
602  typedef typename ALU3DSPACE IteratorElType< cdim, Comm >::val_t val_t;
603 
605 
607  ALU3dGridLeafIterator(const FactoryType& factory, int level);
608 
610  ALU3dGridLeafIterator(const FactoryType& factory, int level , bool isBegin);
611 
613  ALU3dGridLeafIterator(const ThisType & org);
614 
617 
619  void increment ();
620 
622  Entity & dereference () const;
623 
625  void releaseEntity () {}
626 
628  ThisType & operator = (const ThisType & org);
629 
630  private:
631  // the internal iterator
632  IteratorType * iter_;
633 
634  // max level for iteration
635  int walkLevel_ ;
636 
638  void assign (const ThisType & org);
639 
640  // deletes iter_
641  void removeIter () ;
642 
643  // return reference to iter_
644  InternalIteratorType & internalIterator ()
645  {
646  assert( iter_ );
647  return *iter_;
648  }
649  };
650 
651  // - HierarchicIteraor
652  // --HierarchicIterator
653  template<class GridImp>
654  class ALU3dGridHierarchicIterator
655  : public ALU3dGridEntityPointer<0,GridImp>
656  // public HierarchicIteratorDefaultImplementation <GridImp,ALU3dGridHierarchicIterator>
657  {
658  typedef ALU3dGridHierarchicIterator<GridImp> ThisType;
659  enum { dim = GridImp::dimension };
660 
661  typedef typename GridImp::MPICommunicatorType Comm;
662 
663  typedef ALU3dImplTraits< GridImp::elementType, Comm > ImplTraits;
664  typedef typename ImplTraits::HElementType HElementType;
665  typedef typename ImplTraits::HBndSegType HBndSegType;
666 
667  template < class PointerType, class CommT >
668  class GhostElementStorage;
669 
671  template < class PointerType >
672  class GhostElementStorage< PointerType, No_Comm >
673  {
674  public:
675  GhostElementStorage() {}
676  explicit GhostElementStorage( const PointerType& ) {}
677  PointerType& operator * () { PointerType* p = 0; assert( false ); abort(); return *p; }
678  const PointerType* ghost () const { return 0; }
679  PointerType* nextGhost () const { return 0; }
680  PointerType* operator -> () const { return 0; }
681  bool operator != (const PointerType* ) const { return false; }
682  bool operator ! () const { return true ; }
683  GhostElementStorage& operator= (const GhostElementStorage& ) { return *this; }
684  GhostElementStorage& operator= (const PointerType* ) { return *this; }
685  bool valid () const { return false; }
686  };
687 
688 #if ALU3DGRID_PARALLEL
689  template < class PointerType >
691  class GhostElementStorage< PointerType, MPI_Comm >
692  {
693  private:
694  // pointers to ghost and current ghost
695  const HBndSegType * ghost_;
696  HBndSegType * nextGhost_;
697  public:
698  GhostElementStorage() : ghost_( 0 ), nextGhost_( 0 ) {}
699  explicit GhostElementStorage( const PointerType& gh ) : ghost_( &gh ), nextGhost_( 0 ) {}
700  GhostElementStorage( const GhostElementStorage& org )
701  : ghost_( org.ghost_ ), nextGhost_( org.nextGhost_ ) {}
702 
703  PointerType& operator * () { assert( nextGhost_ ); return *nextGhost_; }
704  const PointerType* ghost () const { return ghost_; }
705  PointerType* nextGhost () const { return nextGhost_; }
706  PointerType* operator -> () { return nextGhost_; }
707  bool operator != (const PointerType* p ) const { return (nextGhost_ != p); }
708  bool operator ! () const { return nextGhost_ == 0; }
709  GhostElementStorage& operator= (const GhostElementStorage& org)
710  {
711  ghost_ = org.ghost_;
712  nextGhost_ = org.nextGhost_;
713  return *this;
714  }
715  GhostElementStorage& operator= (PointerType* p)
716  {
717  nextGhost_ = p;
718  return *this;
719  }
720  bool valid () const { return (ghost_ != 0); }
721  };
722 #endif
723 
724  public:
725  typedef typename GridImp::GridObjectFactoryType FactoryType;
726 
727  typedef typename GridImp::template Codim<0>::Entity Entity;
728  typedef typename GridImp::ctype ctype;
729 
732  const HElementType & elem,
733  int maxlevel, bool end );
734 
737  const HBndSegType& ghost,
738  int maxlevel,
739  bool end);
740 
743 
745  void increment();
746 
748  Entity & dereference () const;
749 
751  void releaseEntity () {}
752 
754  ThisType & operator = (const ThisType & org);
755 
756  private:
757  // assign iterator
758  void assign(const ThisType & org);
759 
761  int getLevel(const HElementType* item) const;
762 
764  int getLevel(const HBndSegType* face) const;
765 
766  // go to next valid element
767  template <class HItemType>
768  HItemType* goNextElement (const HItemType* startElem, HItemType * oldEl);
769 
771  const HElementType * elem_;
772 
773  // pointers to ghost and current ghost
774  GhostElementStorage< HBndSegType, Comm > ghostElem_;
775 
777  int maxlevel_;
778  };
779 
780 
781 } // end namespace Dune
782 
783 #include "iterator_imp.cc"
784 
785 #endif
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: albertagrid/dgfparser.hh:26
Entity & dereference() const
dereference Entity, faster then the entity pointersmethod
Definition: iterator.cc:459
Definition: topology.hh:13
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:725
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
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition: alugrid/3d/iterator.hh:422
LocalGeometry geometryInInside() const
ALU3DSPACE ALU3dGridLeafIteratorWrapper< cdim, pitype, Comm > IteratorType
Definition: alugrid/3d/iterator.hh:598
Different resources needed by all grid implementations.
int boundaryId() const
return information about the Boundary
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entity.hh:717
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:401
ALU3dGridIntersectionIterator< GridImp > ImplementationType
Definition: alugrid/3d/iterator.hh:112
void setFirstItem(const HElementType &elem, int wLevel)
GridImp::template Codim< cdim >::Entity Entity
Definition: alugrid/3d/iterator.hh:596
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
void first(const EntityType &en, int wLevel)
#define ALU3DSPACE
Definition: alu3dinclude.hh:26
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:217
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:550
const FactoryType & factory_
Definition: alugrid/3d/iterator.hh:267
FaceInfoType connector_
Definition: alugrid/3d/iterator.hh:263
Provides proxy classes for IntersectionsIterators.
bool boundary() const
return true if intersection is with boundary.
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition: alugrid/3d/iterator.hh:433
GitterImplType::Objects::Hbnd4Default BNDFaceType
Definition: alu3dinclude.hh:264
int level() const
return level of iterator (level of item)
void releaseEntity()
release entity
Definition: alugrid/3d/iterator.hh:751
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:280
NormalType unitOuterNormal_
Definition: alugrid/3d/iterator.hh:283
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/entity.hh:618
ALU3dGridEntityPointer< 0, GridImp > EntityPointer
Definition: alugrid/3d/iterator.hh:117
GeometryInfoType geoProvider_
Definition: alugrid/3d/iterator.hh:264
void incrementIterator(const GridImp &grid, IteratorImp &it, int level)
Definition: alugrid/3d/iterator.hh:475
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:18
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:459
ConformanceState conformanceState() const
Description of conformance on the face.
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:339
const ALU3dImplTraits< tetra, Comm >::GEOFaceType * getFace(const GEOTriangleBndType &bnd, int index) const
Definition: alu3dinclude.hh:201
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
void setInteriorItem(const HElementType &elem, const BNDFaceType &bnd, int wLevel)
ALU3dGridIntersectionIterator(const FactoryType &factory, HElementType *el, int wLevel, bool end=false)
organize the memory management for entitys used by the NeighborIterator
Definition: alugrid/2d/grid.hh:68
IteratorType InternalIteratorType
Definition: alugrid/3d/iterator.hh:601
bool neighbor() const
return true if across the face an neighbor on leaf exists
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/entity.hh:711
ALU3DSPACE ALU3dGridLevelIteratorWrapper< cd, pitype, Comm > IteratorType
Definition: alugrid/3d/iterator.hh:527
bool conforming() const
return true if intersection is conforming
Definition: alugrid/3d/iterator.hh:368
ALUMemoryProvider< ThisType > StorageType
Definition: alugrid/3d/iterator.hh:341
Entity & dereference() const
dereference Entity, faster then the entity pointersmethod
Definition: iterator.cc:247
GeometryImpl intersectionSelfLocal_
Definition: alugrid/3d/iterator.hh:279
int innerLevel_
Definition: alugrid/3d/iterator.hh:275
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:278
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
Ghost ghost
PartitionSet for the ghost partition.
Definition: partitionset.hh:238
const BNDFaceType * ghost_
current pointer to ghost face if iterator was started from ghost element
Definition: alugrid/3d/iterator.hh:273
GridImp::template Codim< 0 >::Entity Entity
Definition: alugrid/3d/iterator.hh:108
void done(const EntityType &en)
Definition: alugrid/3d/iterator.hh:222
Definition: alugrid/3d/iterator.hh:405
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition: alugrid/3d/iterator.hh:409
ALU3dGridLeafIterator(const FactoryType &factory, int level)
Constructor for end iterators.
Definition: iterator.cc:143
NormalType & unitOuterNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
Definition: alu3dinclude.hh:296
Definition: alugrid/3d/entity.hh:24
void releaseEntity()
release entity
Definition: alugrid/3d/iterator.hh:625
IntersectionIteratorType
Definition: alugrid/3d/iterator.hh:100
GeometryType type() const
obtain the type of reference element for this intersection
GitterType::Geometric::tetra_GEO GEOElementType
Definition: alu3dinclude.hh:213
GridImp::MPICommunicatorType Comm
Definition: alugrid/3d/entity.hh:691
int index_
Definition: alugrid/3d/iterator.hh:276
const IMPLElementType * item_
current element from which we started the intersection iterator
Definition: alugrid/3d/iterator.hh:270
int outsideLevel() const
Definition: alugrid/3d/iterator.hh:208
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:594
LocalGeometry geometryInOutside() const
void firstItem(const GridImp &grid, IteratorImp &it, int level)
Definition: alugrid/3d/iterator.hh:442
FieldVector< alu3d_ctype, dimworld > NormalType
Definition: alugrid/3d/iterator.hh:116
ALU3DSPACE IteratorElType< cd, Comm >::val_t val_t
Definition: alugrid/3d/iterator.hh:529
~ALU3dGridLeafIterator()
destructor deleting real iterator
Definition: iterator.cc:180
Definition: alugrid/3d/entity.hh:22
GridImp::ctype ctype
Definition: alugrid/3d/iterator.hh:728
ALU3dGridLevelIterator< cd, pitype, GridImp > ThisType
typedef of my type
Definition: alugrid/3d/iterator.hh:525
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:602
Definition: alugrid/3d/entity.hh:588
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:604
IteratorType InternalIteratorType
Definition: alugrid/3d/iterator.hh:528
void setNewFace(const GEOFaceType &newFace)
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entity.hh:624
ThisType & operator=(const ThisType &org)
the assignment operator
Definition: iterator.cc:347
GridImp::template Codim< 0 >::Entity Entity
Definition: alugrid/3d/iterator.hh:727
Definition: alugrid/3d/iterator.hh:100
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/3d/iterator.hh:106
bool conforming() const
return true if intersection is conforming
Definition: alugrid/3d/iterator.hh:211
Definition: alugrid/3d/iterator.hh:398
Definition: alugrid/3d/iterator.hh:41