Skip to content
Snippets Groups Projects
Commit 58e49fc5 authored by Peter Bastian's avatar Peter Bastian
Browse files

Bug in default implementation

For a grid with maxlevel=1 the first leaf was skipped

[[Imported from SVN: r1937]]
parent 20dc9111
Branches
Tags
No related merge requests found
......@@ -125,7 +125,7 @@ namespace Dune
grid(g), maxlevel(maxl),
lit(grid.template lbegin<0>(0)),
lend(grid.template lend<0>(0)),
hit(lit->hbegin(maxlevel)),
hit(lit->hbegin(maxlevel)), // wird hier wirklich die Reihenfolge eingehalten ?
hend(lit->hend(maxlevel))
{
if (end)
......@@ -138,7 +138,9 @@ namespace Dune
if (hit != hend)
{
// find first leaf
increment();
if (hit->level() != maxlevel && !hit->isLeaf()) // PB 25.04.05: Added this, otherwise grids with one level do not work!
increment();
// assign
static_cast<EntityPointerImp&>(*this) = hit.realIterator;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment