dune-alugrid 3.0.0
iterator.hh
Go to the documentation of this file.
1#ifndef DUNE_ALU3DGRIDITERATOR_HH
2#define DUNE_ALU3DGRIDITERATOR_HH
3
4// System includes
5#include <type_traits>
6
7// Dune includes
8#include <dune/grid/common/grid.hh>
12
13// Local includes
14#include "alu3dinclude.hh"
15#include "topology.hh"
16#include "faceutility.hh"
17#include "alu3diterators.hh"
18
19namespace Dune {
20 // Forward declarations
21 template<int cd, int dim, class GridImp>
22 class ALU3dGridEntity;
23 template<int cd, PartitionIteratorType pitype, class GridImp >
24 class ALU3dGridLevelIterator;
25 template<int cd, class GridImp >
26 class ALU3dGridEntityPointer;
27 template<int mydim, int coorddim, class GridImp>
28 class ALU3dGridGeometry;
29 template<class GridImp>
30 class ALU3dGridHierarchicIterator;
31 template<class GridImp>
32 class ALU3dGridIntersectionIterator;
33 template<int codim, PartitionIteratorType pitype, class GridImp>
34 class ALU3dGridLeafIterator;
35 template< int, int, ALU3dGridElementType, class >
36 class ALU3dGrid;
37 template< int, int, ALU3dGridElementType, class >
38 class ALU3dGridFaceInfo;
39 template< ALU3dGridElementType, class >
41
42//**********************************************************************
43//
44// --ALU3dGridIntersectionIterator
45// --IntersectionIterator
53template<class GridImp>
55//: public IntersectionIteratorDefaultImplementation <GridImp,ALU3dGridIntersectionIterator>
56{
57 enum { dim = GridImp::dimension };
58 enum { dimworld = GridImp::dimensionworld };
59
60 typedef typename GridImp::MPICommunicatorType Comm;
61
63
64 typedef typename ImplTraits::HElementType HElementType ;
65 typedef typename ImplTraits::HBndSegType HBndSegType;
66 typedef typename ImplTraits::GEOElementType GEOElementType;
67 typedef typename ImplTraits::IMPLElementType IMPLElementType;
68 typedef typename ImplTraits::GEOFaceType GEOFaceType;
69 typedef typename ImplTraits::NeighbourPairType NeighbourPairType;
70 typedef typename ImplTraits::BNDFaceType BNDFaceType;
71
72 typedef typename ALU3dImplTraits< tetra, Comm >::GEOElementType GEOTetraElementType;
73 typedef typename ALU3dImplTraits< tetra, Comm >::BNDFaceType GEOTriangleBndType;
74 typedef typename ALU3dImplTraits< hexa, Comm >::GEOElementType GEOHexaElementType;
75 typedef typename ALU3dImplTraits< hexa, Comm >::BNDFaceType GEOQuadBndType;
76
78
79 typedef typename std::conditional<
80 tetra == GridImp::elementType,
83
86
87 enum { numFaces = (dim==3) ? EntityCount<GridImp::elementType>::numFaces : (GridImp::elementType==tetra ? 3 : 4) };
88 enum { numVerticesPerFace =
89 GeometryInfoType::numVerticesPerFace };
90 enum { numVertices = (dim==3) ? EntityCount<GridImp::elementType>::numVertices : (GridImp::elementType==tetra ? 3 : 4)};
91
93
94 friend class ALU3dGridEntity<0,dim,GridImp>;
95 friend class IntersectionIteratorWrapper<GridImp,ThisType>;
96
97protected:
99
100 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
101 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
102
103public:
104 typedef ALUTwists< (dim == 3 ) ? GridImp::elementType == tetra ? 3 : 4 : 2, dim-1 > Twists;
105 typedef typename Twists::Twist Twist;
106
107 typedef typename GridImp::template Codim<0>::Entity Entity;
108 typedef typename GridImp::template Codim<1>::Geometry Geometry;
109 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
110 typedef typename GridImp::template Codim<0>::EntityPointerImpl EntityPointerImpl;
111
114 typedef Dune::Intersection< GridImp, Dune::ALU3dGridIntersectionIterator< GridImp > > Intersection;
115
116 typedef FieldVector<alu3d_ctype, dimworld> NormalType;
117
119 explicit ALU3dGridIntersectionIterator( const bool levelIntersectionIterator = false );
120
123
126
128 bool equals (const ALU3dGridIntersectionIterator<GridImp> & i) const;
129
131 void increment ();
132
135
138
140 bool boundary () const;
141
143 bool neighbor () const;
144
146 int boundaryId () const;
147
149 size_t boundarySegmentIndex() const;
150
156
161 Geometry geometry () const;
162
164 GeometryType type () const;
165
168 int indexInInside () const;
169
174
177 int indexInOutside () const;
178
180 Twist twistInInside () const;
181
183 Twist twistInOutside () const;
184
187 NormalType unitOuterNormal (const FieldVector<alu3d_ctype, dim-1>& local) const ;
188
191 NormalType outerNormal (const FieldVector<alu3d_ctype, dim-1>& local) const;
192
195 NormalType integrationOuterNormal (const FieldVector<alu3d_ctype, dim-1>& local) const;
196
198 int level () const;
199
200 int outsideLevel () const { return connector_.outsideLevel(); }
201
203 bool conforming () const
204 {
206 }
207
209 const GEOFaceType& getItem() const { return connector_.face(); }
210
212 int weight() const
213 {
214 return this->getItem().weight();
215 }
216
217protected:
218 // set interator to end iterator
219 void done () ;
220 template< class EntityType > void done ( const EntityType &en ) { done(); }
221
222 // reset IntersectionIterator to first neighbour
223 void setFirstItem(const HElementType & elem, int wLevel);
224
225 // reset IntersectionIterator to first neighbour
226 void setInteriorItem(const HElementType & elem,
227 const BNDFaceType& bnd, int wLevel);
228
229 // reset IntersectionIterator to first neighbour
230 template <class EntityType>
231 void first(const EntityType & en, int wLevel,
232 const bool conformingRefinement,
233 const bool ghostCellsEnabled );
234
235 // set new face
236 void setNewFace(const GEOFaceType& newFace);
237
238private:
239 // set new face (only LeafIntersectionIterator)
240 void setGhostFace(const GEOFaceType& newFace);
241
242protected:
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
267 const IMPLElementType* item_;
268
270 const BNDFaceType* ghost_;
271
272 mutable int innerLevel_;
273 mutable int index_;
274
278
279 // unit outer normal
281
282public:
283 // used by SharedPointer
284 void invalidate() {}
285 // refCount used by SharedPointer
286 unsigned int refCount_;
287};
288
289template<class GridImp>
291public ALU3dGridIntersectionIterator<GridImp>
292{
293 enum { dim = GridImp::dimension };
294 enum { dimworld = GridImp::dimensionworld };
295
296 typedef typename GridImp::MPICommunicatorType Comm;
297
299
300 typedef typename ImplTraits::HElementType HElementType ;
301 typedef typename ImplTraits::GEOElementType GEOElementType;
302 typedef typename ImplTraits::IMPLElementType IMPLElementType;
303 typedef typename ImplTraits::GEOFaceType GEOFaceType;
304 typedef typename ImplTraits::NeighbourPairType NeighbourPairType;
305 typedef typename ImplTraits::BNDFaceType BNDFaceType;
306
308
309 typedef typename std::conditional<
310 tetra == GridImp::elementType,
313
316
317 enum { numFaces = (dim==3) ? EntityCount<GridImp::elementType>::numFaces : (GridImp::elementType==tetra ? 3 : 4) };
318 enum { numVerticesPerFace =
319 GeometryInfoType::numVerticesPerFace };
320 enum { numVertices = (dim==3) ? EntityCount<GridImp::elementType>::numVertices : (GridImp::elementType==tetra ? 3 : 4)};
321
324
325 friend class ALU3dGridEntity<0,dim,GridImp>;
326 friend class IntersectionIteratorWrapper<GridImp,ThisType>;
327protected:
328 using BaseType :: item_;
329 using BaseType :: ghost_;
331 using BaseType :: index_;
334 using BaseType :: boundary;
335 using BaseType :: done ;
336 using BaseType :: getFace;
337 using BaseType :: neighbor ;
338
339public:
342
345
347 void assign(const ThisType & org);
348
350 void increment ();
351
352 // reset IntersectionIterator to first neighbour
353 template <class EntityType>
354 void first(const EntityType & en, int wLevel,
355 const bool conformingRefinement,
356 const bool ghostCellsEnabled );
357
359 bool neighbor () const;
360
362 bool conforming () const
363 {
365 ( !neighbor() || this->connector_.conformanceState() == FaceInfoType::CONFORMING ) : true );
366 // for conforming refinement use base implementation
367 // otherwise its true
369 BaseType :: conforming() : true ;
370 }
371
372private:
373 // set new face
374 void setNewFace(const GEOFaceType& newFace);
375
376 // reset IntersectionIterator to first neighbour
377 void setFirstItem(const HElementType & elem, int wLevel);
378
379 // reset IntersectionIterator to first neighbour
380 void setInteriorItem(const HElementType & elem,
381 const BNDFaceType& bnd, int wLevel);
382
383 bool levelNeighbor_;
384 bool isLeafItem_;
385};
386
388//
389// --IterationImpl
390//
392template <class InternalIteratorType >
394{
395public:
396 typedef typename InternalIteratorType :: val_t val_t;
397
398 // here the items level will do
399 template <class GridImp, int codim>
401 {
402 public:
403 template <class ItemType>
404 static int getLevel(const GridImp & grid, const ItemType & item, int level )
405 {
406 alugrid_assert ( & item );
407 return (level < 0) ? item.level() : level;
408 }
409 };
410
411 // level is not needed for codim = 0
412 template <class GridImp>
413 class GetLevel<GridImp,0>
414 {
415 public:
416 template <class ItemType>
417 static int getLevel(const GridImp & grid, const ItemType & item, int level )
418 {
419 return level;
420 }
421 };
422
423 template <class GridImp>
424 class GetLevel<GridImp,3>
425 {
426 public:
427 template <class ItemType>
428 static int getLevel(const GridImp & grid, const ItemType & item, int level)
429 {
430 return (level < 0) ? grid.getLevelOfLeafVertex(item) : level;
431 }
432 };
433
434protected:
435 // set iterator to first item
436 template <class GridImp, class IteratorImp>
437 void firstItem(const GridImp & grid, IteratorImp & it, int level )
438 {
439 InternalIteratorType & iter = it.internalIterator();
440 iter.first();
441 ValidItem<IteratorImp::codimension, GridImp> validate;
442 while(!validate(grid,iter))
443 {
444 iter.next();
445 if(iter.done())
446 {
447 it.removeIter();
448 return ;
449 }
450 }
451 if( ! iter.done() )
452 {
453 alugrid_assert ( iter.size() > 0 );
454 setItem(grid,it,iter,level);
455 }
456 else
457 {
458 it.removeIter();
459 }
460 }
461
462 // set the iterators entity to actual item
463 template <class GridImp, class IteratorImp>
464 void setItem (const GridImp & grid, IteratorImp & it, InternalIteratorType & iter, int level)
465 {
466 enum { codim = IteratorImp :: codimension };
467 val_t & item = iter.item();
468 alugrid_assert ( item.first || item.second );
469 if( item.first )
470 {
471 it.updateEntityPointer( item.first ,
472 GetLevel<GridImp,codim>::getLevel(grid, *(item.first) , level) );
473 }
474 else
475 it.updateGhostPointer( *item.second );
476 }
477
478 // increment iterator
479 template <class GridImp, class IteratorImp>
480 void incrementIterator(const GridImp & grid, IteratorImp & it, int level)
481 {
482 // if iter_ is zero, then end iterator
483 InternalIteratorType & iter = it.internalIterator();
484 ValidItem<IteratorImp::codimension, GridImp> validate;
485 do{
486 iter.next();
487
488 if(iter.done())
489 {
490 it.removeIter();
491 return ;
492 }
493
494 }while(!(validate(grid,iter) ) );
495
496 setItem(grid,it,iter,level);
497 return ;
498 }
499
500private:
501 // in 2d check if item is valid
502 template <int codim, class GridImp>
503 struct ValidItem
504 {
505 bool operator()(const GridImp & grid, InternalIteratorType & iter)
506 {
507 if(GridImp::dimension ==3 || iter.done()) return true;
508 else if (GridImp::dimension == 2)
509 {
510 typedef typename ALU3dImplTraits<GridImp::elementType, typename GridImp::MPICommunicatorType>::template Codim<GridImp::dimension, codim>::ImplementationType GEOElementType;
511 val_t & item = iter.item();
512 alugrid_assert ( item.first || item.second );
513 if( item.first )
514 {
515 GEOElementType* elem = static_cast<GEOElementType*> (item.first);
516 //an element is valid if the 2d flag is set
517 return elem->is2d();
518 }
519 //if we have a ghost entity, it is the right one, as we did not insert non-2d elements into the ghostlist
520 // see alu3diterators.hh method updateGhostlist
521 else if( item.second )
522 return true;
523 }
524 return false;
525 }
526 };
527
528 template <class GridImp>
529 struct ValidItem<0, GridImp>
530 {
531 bool operator()(const GridImp & grid, InternalIteratorType & iter)
532 {
533 return true;
534 }
535 };
536
537};
538
539//**********************************************************************
540//
541// --ALU3dGridLevelIterator
542// --LevelIterator
546template<int cd, PartitionIteratorType pitype, class GridImp>
548: public ALU3dGridEntityPointer< cd, GridImp >,
549 public ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< (GridImp::dimension == 2 && cd == 2) ? 3 : cd, pitype, typename GridImp::MPICommunicatorType > >
550{
551 enum { dim = GridImp::dimension };
552 enum { dimworld = GridImp::dimensionworld };
553
554 typedef typename GridImp::MPICommunicatorType Comm;
555
556 friend class ALU3dGridEntity<3,dim,GridImp>;
557 friend class ALU3dGridEntity<2,dim,GridImp>;
558 friend class ALU3dGridEntity<1,dim,GridImp>;
559 friend class ALU3dGridEntity<0,dim,GridImp>;
560 friend class ALU3dGrid< dim, dimworld, GridImp::elementType, Comm >;
561
562 friend class ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLevelIteratorWrapper< (GridImp::dimension == 2 && cd == 2) ? 3 : cd, pitype, Comm > >;
563 typedef ALU3dGridEntityPointer< cd, GridImp > BaseType;
564
565public:
566 typedef typename GridImp::template Codim<cd>::Entity Entity;
568
570 typedef ALU3dGridLevelIterator<cd,pitype,GridImp> ThisType;
571 // the wrapper for the original iterator of the ALU3dGrid
572 typedef typename ALU3DSPACE ALU3dGridLevelIteratorWrapper< (GridImp::dimension == 2 && cd == 2) ? 3 : cd, pitype, Comm > IteratorType;
574 typedef typename ALU3DSPACE IteratorElType< (GridImp::dimension == 2 && cd == 2) ? 3 : cd, Comm >::val_t val_t;
575
577 ALU3dGridLevelIterator () : grid_( nullptr ), iter_(), level_( 0 ) {}
578
580 ALU3dGridLevelIterator(const GridImp& grid, int level, bool);
581
583 ALU3dGridLevelIterator(const GridImp& grid, int level);
584
586 ALU3dGridLevelIterator(const ThisType & org);
587
588 // destructor
590
592 void increment ();
593
595 void releaseEntity () {}
596
598 ThisType & operator = (const ThisType & org);
599private:
601 void assign (const ThisType & org);
602
603 const GridImp &grid () const { alugrid_assert( grid_ ); return *grid_; }
604
605 // reference to factory class (ie grid)
606 const GridImp *grid_;
607
608 // the internal iterator
609 std::unique_ptr< IteratorType > iter_ ;
610
611 // actual level
612 int level_;
613
614 // deletes iter_
615 void removeIter ();
616
617 IteratorType & internalIterator ()
618 {
619 alugrid_assert ( iter_ );
620 return *iter_;
621 }
622};
623
624//********************************************************************
625//
626// --ALU3dGridLeafIterator
627// --LeafIterator
628//
629//********************************************************************
631template<int cdim, PartitionIteratorType pitype, class GridImp>
633: public ALU3dGridEntityPointer< cdim, GridImp >,
634 public ALU3dGridTreeIterator< ALU3DSPACE ALU3dGridLeafIteratorWrapper< (GridImp::dimension == 2 && cdim == 2) ? 3 : cdim, pitype, typename GridImp::MPICommunicatorType > >
635{
636 enum { dim = GridImp :: dimension };
637
638 friend class ALU3dGridEntity<cdim,dim,GridImp>;
639 enum { codim = cdim };
640
641 typedef typename GridImp::MPICommunicatorType Comm;
642
644
645public:
646 typedef typename GridImp::template Codim<cdim>::Entity Entity;
647
648 typedef typename ALU3DSPACE ALU3dGridLeafIteratorWrapper< (GridImp::dimension == 2 && cdim == 2) ? 3 : cdim, pitype, Comm > IteratorType ;
649 friend class ALU3dGridTreeIterator< IteratorType > ;
650
652 typedef typename ALU3DSPACE IteratorElType< (GridImp::dimension == 2 && cdim == 2) ? 3 : cdim, Comm >::val_t val_t;
653
655
657 ALU3dGridLeafIterator () : grid_( nullptr ), iter_() {}
658
660 ALU3dGridLeafIterator(const GridImp& grid, int level);
661
663 ALU3dGridLeafIterator(const GridImp& grid, int level , bool isBegin);
664
666 ALU3dGridLeafIterator(const ThisType & org);
667
670
672 void increment ();
673
675 void releaseEntity () {}
676
678 ThisType & operator = (const ThisType & org);
679
680private:
681 const GridImp &grid () const { alugrid_assert( grid_ ); return *grid_; }
682
683 // reference to grid class (ie grid)
684 const GridImp *grid_;
685
686 // the internal iterator
687 std::unique_ptr< IteratorType > iter_;
688
690 void assign (const ThisType & org);
691
692 // deletes iter_
693 void removeIter () ;
694
695 // return reference to iter_
696 InternalIteratorType & internalIterator ()
697 {
698 alugrid_assert ( iter_ );
699 return *iter_;
700 }
701};
702
703// - HierarchicIteraor
704// --HierarchicIterator
705template<class GridImp>
707: public ALU3dGridEntityPointer<0,GridImp>
708// public HierarchicIteratorDefaultImplementation <GridImp,ALU3dGridHierarchicIterator>
709{
711 enum { dim = GridImp::dimension };
712
713 typedef typename GridImp::MPICommunicatorType Comm;
714
716 typedef typename ImplTraits::HElementType HElementType;
717 typedef typename ImplTraits::HBndSegType HBndSegType;
718
719 template < class PointerType, class CommT >
720 class GhostElementStorage;
721
723 template < class PointerType >
724 class GhostElementStorage< PointerType, ALUGridNoComm >
725 {
726 public:
727 GhostElementStorage() {}
728 explicit GhostElementStorage( const PointerType& ) {}
729 PointerType& operator * () { PointerType* p = 0; alugrid_assert ( false ); abort(); return *p; }
730 const PointerType* ghost () const { return 0; }
731 PointerType* nextGhost () const { return 0; }
732 PointerType* operator -> () const { return 0; }
733 bool operator != (const PointerType* ) const { return false; }
734 bool operator ! () const { return true ; }
735 GhostElementStorage& operator= (const GhostElementStorage& ) { return *this; }
736 GhostElementStorage& operator= (const PointerType* ) { return *this; }
737 bool valid () const { return false; }
738 };
739
741 template < class PointerType >
742 class GhostElementStorage< PointerType, ALUGridMPIComm >
743 {
744 private:
745 // pointers to ghost and current ghost
746 const HBndSegType * ghost_;
747 HBndSegType * nextGhost_;
748 public:
749 GhostElementStorage() : ghost_( 0 ), nextGhost_( 0 ) {}
750 explicit GhostElementStorage( const PointerType& gh ) : ghost_( &gh ), nextGhost_( 0 ) {}
751 GhostElementStorage( const GhostElementStorage& org )
752 : ghost_( org.ghost_ ), nextGhost_( org.nextGhost_ ) {}
753
754 PointerType& operator * () { alugrid_assert ( nextGhost_ ); return *nextGhost_; }
755 const PointerType* ghost () const { return ghost_; }
756 PointerType* nextGhost () const { return nextGhost_; }
757 PointerType* operator -> () { return nextGhost_; }
758 bool operator != (const PointerType* p ) const { return (nextGhost_ != p); }
759 bool operator ! () const { return nextGhost_ == 0; }
760 GhostElementStorage& operator= (const GhostElementStorage& org)
761 {
762 ghost_ = org.ghost_;
763 nextGhost_ = org.nextGhost_;
764 return *this;
765 }
766 GhostElementStorage& operator= (PointerType* p)
767 {
768 nextGhost_ = p;
769 return *this;
770 }
771 bool valid () const { return (ghost_ != 0); }
772 };
773
774public:
775 typedef typename GridImp::template Codim<0>::Entity Entity;
776 typedef typename GridImp::ctype ctype;
777
779 ALU3dGridHierarchicIterator(const HElementType & elem,
780 int maxlevel, bool end );
781
783 ALU3dGridHierarchicIterator(const HBndSegType& ghost,
784 int maxlevel,
785 bool end);
786
789
791 void increment();
792
794 void releaseEntity () {}
795
797 ThisType & operator = (const ThisType & org);
798
799private:
800 // assign iterator
801 void assign(const ThisType & org);
802
804 int getLevel(const HElementType* item) const;
805
807 int getLevel(const HBndSegType* face) const;
808
809 // go to next valid element
810 template <class HItemType>
811 HItemType* goNextElement (const HItemType* startElem, HItemType * oldEl);
812
814 const HElementType * elem_;
815
816 // pointers to ghost and current ghost
817 GhostElementStorage< HBndSegType, Comm > ghostElem_;
818
820 int maxlevel_;
821};
822
823
824} // end namespace Dune
825
826#include "iterator_imp.cc"
827
828#endif
Provides proxy classes for IntersectionsIterators.
#define alugrid_assert(EX)
Definition alugrid_assert.hh:20
#define ALU3DSPACE
Definition alu3dinclude.hh:24
Definition alu3dinclude.hh:80
@ tetra
Definition topology.hh:12
Definition alu3dinclude.hh:259
Definition alu3dinclude.hh:345
[ provides Dune::Grid ]
Definition 3d/grid.hh:468
Definition entity.hh:47
Definition iterator.hh:550
void increment()
prefix increment
Definition iterator.cc:112
ALU3DSPACE ALU3dGridLevelIteratorWrapper<(GridImp::dimension==2 &&cd==2) ? 3 :cd, pitype, Comm > IteratorType
Definition iterator.hh:572
void releaseEntity()
release entity
Definition iterator.hh:595
GridImp::template Codim< cd >::Entity Entity
Definition iterator.hh:566
ALU3dGridVertexList< Comm > VertexListType
Definition iterator.hh:567
ThisType & operator=(const ThisType &org)
assignment of iterators
Definition iterator.cc:104
ALU3dGridLevelIterator< cd, pitype, GridImp > ThisType
typedef of my type
Definition iterator.hh:570
~ALU3dGridLevelIterator()
Definition iterator.cc:65
ALU3dGridLevelIterator()
default constructor
Definition iterator.hh:577
ALU3DSPACE IteratorElType<(GridImp::dimension==2 &&cd==2)?3:cd, Comm >::val_t val_t
Definition iterator.hh:574
IteratorType InternalIteratorType
Definition iterator.hh:573
Definition entity.hh:629
Definition iterator.hh:709
GridImp::ctype ctype
Definition iterator.hh:776
void releaseEntity()
release entity
Definition iterator.hh:794
GridImp::template Codim< 0 >::Entity Entity
Definition iterator.hh:775
ThisType & operator=(const ThisType &org)
the assignment operator
Definition iterator.cc:295
void increment()
increment
Definition iterator.cc:376
Definition iterator.hh:56
void increment()
increment iterator
Definition iterator_imp.cc:179
GridImp::template Codim< 0 >::Entity Entity
Definition iterator.hh:107
ALU3dGridIntersectionIterator< GridImp > ImplementationType
Definition iterator.hh:112
LocalGeometry geometryInInside() const
Definition iterator_imp.cc:287
LocalGeometryImpl intersectionNeighborLocal_
Definition iterator.hh:277
NormalType outerNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
Definition iterator_imp.cc:335
int outsideLevel() const
Definition iterator.hh:200
int boundaryId() const
return information about the Boundary
Definition iterator_imp.cc:397
int indexInInside() const
Definition iterator_imp.cc:279
void done()
Definition iterator_imp.cc:39
void setInteriorItem(const HElementType &elem, const BNDFaceType &bnd, int wLevel)
Definition iterator_imp.cc:66
const BNDFaceType * ghost_
current pointer to ghost face if iterator was started from ghost element
Definition iterator.hh:270
void done(const EntityType &en)
Definition iterator.hh:220
GridImp::template Codim< 1 >::Geometry Geometry
Definition iterator.hh:108
Geometry geometry() const
Definition iterator_imp.cc:377
int index_
Definition iterator.hh:273
const GEOFaceType & getItem() const
return current face
Definition iterator.hh:209
unsigned int refCount_
Definition iterator.hh:286
void setFirstItem(const HElementType &elem, int wLevel)
Definition iterator_imp.cc:49
GeometryImpl intersectionGlobal_
Definition iterator.hh:275
GeometryInfoType geoProvider_
Definition iterator.hh:264
EntityPointerImpl inside() const
access entity where iteration started
Definition iterator_imp.cc:252
IntersectionIteratorType
Definition iterator.hh:98
@ IntersectionLeaf
Definition iterator.hh:98
@ IntersectionLevel
Definition iterator.hh:98
@ IntersectionBoth
Definition iterator.hh:98
NormalType integrationOuterNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
Definition iterator_imp.cc:327
int level() const
return level of iterator (level of item)
Definition iterator_imp.cc:478
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Definition iterator.hh:109
bool boundary() const
return true if intersection is with boundary.
Definition iterator_imp.cc:266
Twist twistInInside() const
returns twist of face compared to inner element
Definition iterator_imp.cc:303
Twist twistInOutside() const
returns twist of face compared to outer element
Definition iterator_imp.cc:310
NormalType unitOuterNormal(const FieldVector< alu3d_ctype, dim-1 > &local) const
Definition iterator_imp.cc:368
LocalGeometry geometryInOutside() const
Definition iterator_imp.cc:317
void invalidate()
Definition iterator.hh:284
int innerLevel_
Definition iterator.hh:272
bool equals(const ALU3dGridIntersectionIterator< GridImp > &i) const
The copy constructor.
Definition iterator_imp.cc:169
FaceInfoType connector_
Definition iterator.hh:263
EntityPointerImpl outside() const
access neighbor
Definition iterator_imp.cc:235
void buildLocalGeometries() const
Definition iterator_imp.cc:413
GridImp::template Codim< 0 >::EntityPointerImpl EntityPointerImpl
Definition iterator.hh:110
ALUTwists<(dim==3) ? GridImp::elementType==tetra ? 3 :4 :2, dim-1 > Twists
Definition iterator.hh:104
void setNewFace(const GEOFaceType &newFace)
Definition iterator_imp.cc:456
FieldVector< alu3d_ctype, dimworld > NormalType
Definition iterator.hh:116
const ALU3dImplTraits< tetra, Comm >::GEOFaceType * getFace(const GEOTriangleBndType &bnd, int index) const
Definition iterator_imp.cc:423
NormalType unitOuterNormal_
Definition iterator.hh:280
Twists::Twist Twist
Definition iterator.hh:105
void assign(const ALU3dGridIntersectionIterator< GridImp > &org)
assignment of iterators
Definition iterator_imp.cc:144
GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl
Definition iterator.hh:101
LocalGeometryImpl intersectionSelfLocal_
Definition iterator.hh:276
bool neighbor() const
return true if across the face an neighbor on leaf exists
Definition iterator_imp.cc:272
const IMPLElementType * item_
current element from which we started the intersection iterator
Definition iterator.hh:267
bool conforming() const
return true if intersection is conforming
Definition iterator.hh:203
int weight() const
return communication weight
Definition iterator.hh:212
GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl
Definition iterator.hh:100
Dune::Intersection< GridImp, Dune::ALU3dGridIntersectionIterator< GridImp > > Intersection
type of the intersection
Definition iterator.hh:114
GeometryType type() const
obtain the type of reference element for this intersection
Definition iterator_imp.cc:386
size_t boundarySegmentIndex() const
return the boundary segment index
Definition iterator_imp.cc:405
void first(const EntityType &en, int wLevel, const bool conformingRefinement, const bool ghostCellsEnabled)
Definition iterator_imp.cc:88
int indexInOutside() const
Definition iterator_imp.cc:296
Leaf iterator.
Definition iterator.hh:635
ALU3dGridLeafIterator< cdim, pitype, GridImp > ThisType
Definition iterator.hh:654
GridImp::template Codim< cdim >::Entity Entity
Definition iterator.hh:646
void increment()
prefix increment
Definition iterator.cc:216
ALU3DSPACE IteratorElType<(GridImp::dimension==2 &&cdim==2)?3:cdim, Comm >::val_t val_t
Definition iterator.hh:652
IteratorType InternalIteratorType
Definition iterator.hh:651
void releaseEntity()
release entity
Definition iterator.hh:675
ThisType & operator=(const ThisType &org)
assignment of iterators
Definition iterator.cc:179
ALU3dGridLeafIterator()
default constructor
Definition iterator.hh:657
ALU3DSPACE ALU3dGridLeafIteratorWrapper<(GridImp::dimension==2 &&cdim==2) ? 3 :cdim, pitype, Comm > IteratorType
Definition iterator.hh:648
~ALU3dGridLeafIterator()
destructor deleting real iterator
Definition iterator.cc:163
int level() const
ask for level of entities
Definition entity.hh:524
int outsideLevel() const
Definition faceutility_imp.cc:357
bool conformingRefinement() const
return true if conforming refinement is enabled
Definition faceutility.hh:138
const GEOFaceType & face() const
Returns the ALU3dGrid face.
Definition faceutility_imp.cc:320
ConformanceState conformanceState() const
Description of conformance on the face.
Definition faceutility_imp.cc:438
Definition faceutility.hh:326
Definition faceutility.hh:370
void first(const EntityType &en, int wLevel, const bool conformingRefinement, const bool ghostCellsEnabled)
Definition iterator_imp.cc:506
void assign(const ThisType &org)
assignment of iterators
Definition iterator_imp.cc:576
ALU3dGridLevelIntersectionIterator()
The default Constructor.
Definition iterator_imp.cc:496
bool conforming() const
return true if intersection is conforming
Definition iterator.hh:362
void increment()
increment iterator
Definition iterator_imp.cc:584
bool neighbor() const
return true if across the edge an neighbor on this level exists
Definition iterator_imp.cc:609
Definition iterator.hh:40
Definition iterator.hh:394
void incrementIterator(const GridImp &grid, IteratorImp &it, int level)
Definition iterator.hh:480
void firstItem(const GridImp &grid, IteratorImp &it, int level)
Definition iterator.hh:437
void setItem(const GridImp &grid, IteratorImp &it, InternalIteratorType &iter, int level)
Definition iterator.hh:464
InternalIteratorType::val_t val_t
Definition iterator.hh:396
Definition iterator.hh:401
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition iterator.hh:404
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition iterator.hh:417
static int getLevel(const GridImp &grid, const ItemType &item, int level)
Definition iterator.hh:428
Definition topology.hh:15
Definition topology.hh:40
Definition topology.hh:151
type of class for specialization of serial ALUGrid (No_Comm as communicator)
Definition declaration.hh:31
type of class for specialization of parallel ALUGrid (MPI_Comm as communicator)
Definition declaration.hh:39
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition intersectioniteratorwrapper.hh:26
Definition twists.hh:22