dune-grid  2.1.1
albertagrid/leafiterator.hh
Go to the documentation of this file.
00001 #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
00002 #define DUNE_ALBERTA_LEAFITERATOR_HH
00003 
00004 #include <dune/grid/common/leafiterator.hh>
00005 
00006 #include <dune/grid/albertagrid/treeiterator.hh>
00007 
00008 #if HAVE_ALBERTA
00009 
00010 namespace Dune
00011 {
00012 
00013   // AlbertaGridLeafIterator
00014   // -----------------------
00015 
00016   template< int codim, PartitionIteratorType pitype, class GridImp >
00017   class AlbertaGridLeafIterator
00018   : public AlbertaGridTreeIterator< codim, GridImp, true >
00019   {
00020     typedef AlbertaGridLeafIterator< codim, pitype, GridImp > This;
00021     typedef AlbertaGridTreeIterator< codim, GridImp, true > Base;
00022 
00023   public:  
00024     typedef typename Base::Entity Entity;
00025     typedef typename Base::MarkerVector MarkerVector;
00026 
00028     AlbertaGridLeafIterator ( const GridImp &grid, int level )
00029     : Base( grid, level )
00030     {}
00031 
00033     AlbertaGridLeafIterator ( const GridImp &grid,
00034                               const MarkerVector *vec,
00035                               int level )
00036     : Base( grid, vec, level )
00037     {}
00038 
00040     void increment () 
00041     {
00042       Base::increment();
00043     }
00044   };
00045 
00046 
00047   template< int codim, class GridImp >
00048   class AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
00049   : public AlbertaGridTreeIterator< codim, GridImp, true >
00050   {
00051     typedef AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp > This;
00052     typedef AlbertaGridTreeIterator< codim, GridImp, true > Base;
00053 
00054   public:  
00055     typedef typename Base::Entity Entity;
00056     typedef typename Base::MarkerVector MarkerVector;
00057 
00059     AlbertaGridLeafIterator ( const GridImp &grid, int level )
00060     : Base( grid, level )
00061     {}
00062 
00064     AlbertaGridLeafIterator ( const GridImp &grid,
00065                               const MarkerVector *vec,
00066                               int level )
00067     : Base( grid, level )
00068     {}
00069 
00071     void increment () 
00072     {
00073       Base::increment();
00074     }
00075   };
00076 
00077 }
00078 
00079 #endif // #if HAVE_ALBERTA
00080 
00081 #endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH