1#ifndef DUNE_FEM_GRIDPART_FILTEREDGRIDPART_ITERATOR_HH
2#define DUNE_FEM_GRIDPART_FILTEREDGRIDPART_ITERATOR_HH
8#include <dune/grid/common/gridenums.hh>
19 template<
int codim, PartitionIteratorType pitype,
class Gr
idPartImp >
24 typedef GridPartImp GridPartType;
25 typedef typename GridPartType::HostGridPartType HostGridPartType;
26 typedef typename HostGridPartType::template Codim< codim >::template Partition< pitype >::IteratorType HostIteratorType;
30 typedef typename HostIteratorType::Entity
Entity;
36 : gridPart_( gridPart ),
37 hostIterator_( hostIterator ),
38 hostEnd_( gridPart.hostGridPart().template end< codim, pitype >() )
43 if( !gridPart.contains( *hostIterator_ ) )
49 : gridPart_( other.gridPart_ ),
50 hostIterator_( other.hostIterator_ ),
51 hostEnd_( other.hostEnd_ )
57 assert( &gridPart_ == &other.gridPart_ );
58 hostIterator_ = other.hostIterator_;
59 hostEnd_ = other.hostEnd_;
67 do { ++hostIterator_; }
while ( !done() && !contains() );
71 int level ()
const {
return hostIterator_.level(); }
79 return hostIterator_ == other.hostIterator_;
85 return (hostIterator_ == hostEnd_);
88 bool contains ()
const
91 return gridPart().contains( *hostIterator_ );
95 const GridPartType &gridPart ()
const {
return gridPart_; }
97 const GridPartType &gridPart_;
98 HostIteratorType hostIterator_;
99 HostIteratorType hostEnd_;
Definition: bindguard.hh:11
Definition: filteredgridpart/iterator.hh:21
ThisType & operator=(const ThisType &other)
assignment operator
Definition: filteredgridpart/iterator.hh:55
static const int codimension
Definition: filteredgridpart/iterator.hh:32
void increment()
increment
Definition: filteredgridpart/iterator.hh:64
FilteredGridPartIterator(const ThisType &other)
constructor
Definition: filteredgridpart/iterator.hh:48
FilteredGridPartIterator(const GridPartType &gridPart, const HostIteratorType &hostIterator)
constructor
Definition: filteredgridpart/iterator.hh:35
HostIteratorType::Entity Entity
Definition: filteredgridpart/iterator.hh:30
int level() const
return level
Definition: filteredgridpart/iterator.hh:71
bool equals(const ThisType &other) const
check for equality
Definition: filteredgridpart/iterator.hh:77
Entity dereference() const
return reference to entity object
Definition: filteredgridpart/iterator.hh:74