dune-grid  2.9.0
leafiterator.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
6 #define DUNE_ALBERTA_LEAFITERATOR_HH
7 
9 
11 
12 #if HAVE_ALBERTA
13 
14 namespace Dune
15 {
16 
17  // AlbertaGridLeafIterator
18  // -----------------------
19 
20  template< int codim, PartitionIteratorType pitype, class GridImp >
22  : public AlbertaGridTreeIterator< codim, GridImp, true >
23  {
26 
27  public:
28  typedef typename Base::Entity Entity;
29  typedef typename Base::MarkerVector MarkerVector;
30 
32  {}
33 
35  AlbertaGridLeafIterator ( const GridImp &grid, int level )
36  : Base( grid, level )
37  {}
38 
40  AlbertaGridLeafIterator ( const GridImp &grid,
41  const MarkerVector *vec,
42  int level )
43  : Base( grid, vec, level )
44  {}
45 
47  void increment ()
48  {
50  }
51  };
52 
53 
54  template< int codim, class GridImp >
55  class AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
56  : public AlbertaGridTreeIterator< codim, GridImp, true >
57  {
60 
61  public:
62  typedef typename Base::Entity Entity;
63  typedef typename Base::MarkerVector MarkerVector;
64 
66  {}
67 
69  AlbertaGridLeafIterator ( const GridImp &grid, int level )
70  : Base( grid, level )
71  {}
72 
74  AlbertaGridLeafIterator ( const GridImp &grid,
75  const MarkerVector *,
76  int level )
77  : Base( grid, level )
78  {}
79 
81  void increment ()
82  {
84  }
85  };
86 
87 }
88 
89 #endif // #if HAVE_ALBERTA
90 
91 #endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
@ Ghost_Partition
only ghost entities
Definition: gridenums.hh:142
Include standard header files.
Definition: agrid.hh:60
Definition: treeiterator.hh:189
GridImp::template Codim< codim >::Entity Entity
Definition: treeiterator.hh:207
int level() const
ask for level of entities
Definition: treeiterator.hh:243
void increment()
increment
Definition: treeiterator.hh:411
const GridImp & grid() const
obtain a reference to the grid
Definition: treeiterator.hh:253
Definition: leafiterator.hh:23
Base::Entity Entity
Definition: leafiterator.hh:28
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition: leafiterator.hh:35
Base::MarkerVector MarkerVector
Definition: leafiterator.hh:29
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int level)
Constructor making begin iterator.
Definition: leafiterator.hh:40
AlbertaGridLeafIterator()
Definition: leafiterator.hh:31
void increment()
increment the iterator
Definition: leafiterator.hh:47
Base::Entity Entity
Definition: leafiterator.hh:62
void increment()
increment the iterator
Definition: leafiterator.hh:81
AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level)
Constructor making begin iterator (which is the end iterator in this case)
Definition: leafiterator.hh:74
Base::MarkerVector MarkerVector
Definition: leafiterator.hh:63
AlbertaGridLeafIterator(const GridImp &grid, int level)
Constructor making end iterator.
Definition: leafiterator.hh:69
marker assigning subentities to one element containing them
Definition: treeiterator.hh:35