Hello,
I have a question about CactusNumerical/Cartoon2D.
In the source file ApplyCartoon.c, there is a condition for the grid setup:
if(cctk_gsh[1] != 2*cctk_nghostzones[1]+1) { CCTK_WARN(0, "Grid size in y direction inappropriate."); }
As far as I could tell, this is generally violated in multilevel Carpet (CarpetRegrid2) runs, with standard settings that determine the minimum extension of the refined grids, like Carpet::use_buffer_zones = yes mol::ode_method = rk4
That condition for Cartoon2D can be achieved on the coarsest level by setting CoordBase::ymax equal to the spacing dy and CoordBase::ymin equal to -dy. But it cannot be set for refined levels, because CarpetRegrid2 adds as many points as required for the buffer zones. Indeed, Carpet adds enough buffer points for its own purposes that Cartoon2D seems to work fine.
Should the above condition be changed to
if(cctk_gsh[1] >= 2*cctk_nghostzones[1]+1)
?
Yours, Luca