#1906: CarpetRegrid2: possible off-by-one error when using regrid_every parameter ----------------------+----------------------------------------------------- Reporter: bmundim | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: Component: Carpet | Version: development version Resolution: | Keywords: CarpetRegrid2 ----------------------+-----------------------------------------------------
Comment (by eschnett):
It is possible that there is an off-by-one error, however:
The first iteration, right after setting up initial conditions, is iteration 1. Regridding occurs before the evolution step, and thus the first time it can occur is at iteration 1 (i.e. before the first time step).
Iteration 0 is setting up initial conditions. There can be regridding as well while setting up initial conditions, but this is governed by slightly different rules, so let's disregard this here.
Maybe it is just how iterations are counted that is confusing? With two levels, you have: * it=0: initial conditions * it=1: coarse grid step * it=1: fine grid step * it=2: fine grid step * it=2: restriction to coarse grid * it=3: coarse grid step * it=3: fine grid step * it=4: fine grid step * it=4: restriction to coarse grid
etc.