dune-grid  2.3.0
albertagrid/leveliterator.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
4 #define DUNE_ALBERTA_LEVELITERATOR_HH
5 
7 
9 
10 #if HAVE_ALBERTA
11 
12 namespace Dune
13 {
14 
15  // AlbertaGridLevelIterator
16  // ------------------------
17 
18  template< int codim, PartitionIteratorType pitype, class GridImp >
19  class AlbertaGridLevelIterator
20  : public AlbertaGridTreeIterator< codim, GridImp, false >
21  {
22  typedef AlbertaGridLevelIterator< codim, pitype, GridImp > This;
24 
25  public:
26  typedef typename Base::Entity Entity;
27  typedef typename Base::MarkerVector MarkerVector;
28 
30  AlbertaGridLevelIterator ( const GridImp &grid, int level )
31  : Base( grid, level )
32  {}
33 
35  AlbertaGridLevelIterator ( const GridImp &grid,
36  const MarkerVector *vec,
37  int level )
38  : Base( grid, vec, level )
39  {}
40 
42  void increment ()
43  {
45  }
46  };
47 
48 
49  template< int codim, class GridImp >
50  class AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
51  : public AlbertaGridTreeIterator< codim, GridImp, false >
52  {
55 
56  public:
57  typedef typename Base::Entity Entity;
58  typedef typename Base::MarkerVector MarkerVector;
59 
61  AlbertaGridLevelIterator ( const GridImp &grid, int level )
62  : Base( grid, level )
63  {}
64 
66  AlbertaGridLevelIterator ( const GridImp &grid,
67  const MarkerVector *vec,
68  int level )
69  : Base( grid, level )
70  {}
71 
73  void increment ()
74  {
76  }
77  };
78 }
79 
80 #endif // #if HAVE_ALBERTA
81 
82 #endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
int level() const
ask for level of entities
Base::MarkerVector MarkerVector
Definition: albertagrid/leveliterator.hh:58
void increment()
increment the iterator
Definition: albertagrid/leveliterator.hh:73
Base::MarkerVector MarkerVector
Definition: albertagrid/leveliterator.hh:27
Definition: albertagrid/gridfamily.hh:72
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition: albertagrid/leveliterator.hh:61
AlbertaGridLevelIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition: albertagrid/leveliterator.hh:30
const GridImp & grid() const
obtain a reference to the grid
only ghost entities
Definition: gridenums.hh:136
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition: albertagrid/leveliterator.hh:66
GridImp::template Codim< codim >::Entity Entity
Definition: treeiterator.hh:202
Base::Entity Entity
Definition: albertagrid/leveliterator.hh:57
AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition: albertagrid/leveliterator.hh:35
marker assigning subentities to one element containing them
Definition: treeiterator.hh:29
Base::Entity Entity
Definition: albertagrid/leveliterator.hh:26
void increment()
increment the iterator
Definition: albertagrid/leveliterator.hh:42