Hello Bernard,
Thanks, Roland. I'll have to check, but that sounds plausible: I sometimes am sloppy with my max_refinement_levels.
Do you know why it uses "max_refinement_levels" instead of the actual instantaneous finest level? For simplicity, or consistency over time (in case a derefinement happens)? The effect is counter-intuitive to me.
It cannot use the current ("actual") largest refinement level in use since you could decide to activate the dormant higher refinement level later on in the run (eg. Christian does that for core collapse runs). At the moment the new level becomes active the meaning of cctk_iteration would change and all previous iteration numbers would have to be multiplied by say two if you add one more level. So yes, it is for consistency in case de- and refinement happens. It is somewhat odd yes, that the iteration counter does not necessarily increase by one from one step to the other (actually it does internally to Carpet it is just that nothing is called on these levels [in Evolve.cc] in particular you cannot have a global routine run more frequent than the finest level).
Yours, Roland
PS I forgot to CC the list. Do you mind if I forward both emails?