1 #ifndef DUNE_FEM_GRIDPART_GEOGRIDPART_ITERATOR_HH 2 #define DUNE_FEM_GRIDPART_GEOGRIDPART_ITERATOR_HH 9 #include <dune/grid/common/entitypointer.hh> 10 #include <dune/grid/common/gridenums.hh> 21 template<
int codim, PartitionIteratorType pitype,
class Gr
idFamily >
24 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
26 typedef typename Traits::HostGridPartType HostGridPartType;
30 typedef typename HostGridPartType::template Codim< codim >::template Partition< pitype >::IteratorType
HostIteratorType;
34 typedef typename Traits::template Codim< codimension >::Entity
Entity;
38 GeoIterator (
const CoordFunctionType &coordFunction, HostIteratorType hostIterator )
39 : coordFunction_( &coordFunction ),
40 hostIterator_(
std::
move( hostIterator ) )
50 return typename Entity::Implementation( coordFunction(), *hostIterator_ );
55 return hostIterator_ == rhs.hostIterator_;
60 return hostIterator_.level();
63 operator Dune::DefaultEntityPointer< Entity > ()
const 65 return Dune::DefaultEntityPointer< Entity >(
dereference() );
68 bool equals (
const Dune::DefaultEntityPointer< Entity > &rhs )
const 74 const CoordFunctionType &coordFunction ()
const 76 assert( coordFunction_ );
77 return *coordFunction_;
80 const CoordFunctionType *coordFunction_ =
nullptr;
81 HostIteratorType hostIterator_;
88 #endif // #ifndef DUNE_FEM_GRIDPART_GEOGRIDPART_ITERATOR_HH
static const int codimension
Definition: geogridpart/iterator.hh:32
GeoIterator(const CoordFunctionType &coordFunction, HostIteratorType hostIterator)
Definition: geogridpart/iterator.hh:38
Definition: geogridpart/iterator.hh:22
Definition: coordinate.hh:4
Traits::CoordFunctionType CoordFunctionType
Definition: geogridpart/iterator.hh:29
Traits::template Codim< codimension >::Entity Entity
Definition: geogridpart/iterator.hh:34
bool equals(const GeoIterator &rhs) const
Definition: geogridpart/iterator.hh:53
void increment()
Definition: geogridpart/iterator.hh:43
bool equals(const Dune::DefaultEntityPointer< Entity > &rhs) const
Definition: geogridpart/iterator.hh:68
void move(ArrayInterface< T > &array, const unsigned int oldOffset, const unsigned int newOffset, const unsigned int length)
Definition: array_inline.hh:38
int level() const
Definition: geogridpart/iterator.hh:58
HostGridPartType::template Codim< codim >::template Partition< pitype >::IteratorType HostIteratorType
Definition: geogridpart/iterator.hh:30
Entity dereference() const
Definition: geogridpart/iterator.hh:48