Skip to content

Add reverse grid iterators for YaspGrid

Steffen Müthing requested to merge feature/add-reverse-grid-iterators into master

This merge request extends the grid interface to support reverse iteration. For this purpose, it adds

  • a new type ReverseIterator to the Codim structs
  • a set of rbegin() and rend() methods (and their equivalents for leaf and level iterators)
  • new marker types Dune::Direction::Forward and Dune::Direction::Backward
  • overloads for the entity range generators (elements(gv)) etc. that take a direction marker

Right now, only YaspGrid provides support for reverse iteration. Grids without support will simply ignore the request and iterate in forward direction anyway.

Merge request reports