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;
28 typedef typename GridPartType::template Codim< codim >::EntityPointerType EntityPointerType;
32 typedef typename HostIteratorType::Entity
Entity;
38 : gridPart_( gridPart ),
39 hostIterator_( hostIterator ),
40 hostEnd_( gridPart.hostGridPart().template end< codim, pitype >() )
45 if( !gridPart.contains( *hostIterator_ ) )
51 : gridPart_( other.gridPart_ ),
52 hostIterator_( other.hostIterator_ ),
53 hostEnd_( other.hostEnd_ )
59 assert( &gridPart_ == &other.gridPart_ );
60 hostIterator_ = other.hostIterator_;
61 hostEnd_ = other.hostEnd_;
69 do { ++hostIterator_; }
while ( !done() && !contains() );
73 int level ()
const {
return hostIterator_.level(); }
82 operator typename EntityPointerType::Implementation ()
const {
return hostIterator_.impl(); }
85 bool equals (
const ThisType &other )
const 87 return hostIterator_ == other.hostIterator_;
93 return (hostIterator_ == hostEnd_);
96 bool contains ()
const 99 return gridPart().contains( *hostIterator_ );
103 const GridPartType &gridPart ()
const {
return gridPart_; }
105 const GridPartType &gridPart_;
106 HostIteratorType hostIterator_;
107 HostIteratorType hostEnd_;
114 #endif // #ifndef DUNE_FEM_GRIDPART_FILTEREDGRIDPART_ITERATOR_HH
Entity dereference() const
return reference to entity object
Definition: filteredgridpart/iterator.hh:76
ThisType & operator=(const ThisType &other)
assignment operator
Definition: filteredgridpart/iterator.hh:57
FilteredGridPartIterator(const GridPartType &gridPart, const HostIteratorType &hostIterator)
constructor
Definition: filteredgridpart/iterator.hh:37
HostIteratorType::Entity Entity
Definition: filteredgridpart/iterator.hh:32
Definition: coordinate.hh:4
void increment()
increment
Definition: filteredgridpart/iterator.hh:66
static const int codimension
Definition: filteredgridpart/iterator.hh:34
bool equals(const ThisType &other) const
check for equality
Definition: filteredgridpart/iterator.hh:85
int level() const
return level
Definition: filteredgridpart/iterator.hh:73
FilteredGridPartIterator(const ThisType &other)
constructor
Definition: filteredgridpart/iterator.hh:50
Definition: filteredgridpart/iterator.hh:20