Hello Ian,
ah, these are all tricky questions.
which is a bit surprising. This might come from the old issue of the intersection between outer boundaries and interpatch boundaries not being correctly initialised by the combination of Interpolate2 and McLachlan. Last time I checked though, this may have been fixed. If you don't use poison, does Carpet zero the variables, or leave them uninitialised? In which case, does the OS zero them? Presumably new memory from the OS is zeroed (for security/privacy reasons), but if the memory has been malloc/freed already by the cactus process, then maybe it is random.
Yes, the OS would zero, malloc does not have to. new() on the other hand will also zero (you'd have to check if CarpetLib uses new() or malloc() or posix_memalign() to get new memory, I believe it is actually malloc).
Now, another related question. Is it possible to change the number of CarpetRegrid2 centres during evolution? The num_centres parameter is non-steerable, and indeed CarpetRegrid2 only looks at the centre parameters initially (otherwise every recovery would overwrite the dynamical centre variables with the parameter values). Ideally, I would have set num_centres to a larger value when I started the run, but I didn't.
We just need to make sure that CarpetRegrid2 runs INIT_CENTRE (from initialise.cc) on any newly added centres on recovery. This is done in WRAGH, and then similar to the previous issue, overwritten by recovery. So this should just work?
Yes that would work. You just have to make sure you can identify new levels, eg. by their number of levels being -42 or similar. The alternative is to use the Trigger thorn and set the grid scalars (see the NSNS gallery parfile and look for
Trigger::Trigger_Steered_Scalar[1] = "CarpetRegrid2::num_levels[2]"
Since you can change the grid scalars and "activate" more levels.
Yours, Roland