On 3 Nov 2017, at 09:22, Chris Stevens c.stevens@ru.ac.za wrote:
Hi Ian,
thanks for the quick reply.
SCHEDULE WorldTubeExtract_TEST AT CCTK_INITIAL AFTER WorldTubeExtract_RegisterSlices { LANG: C OPTIONS: LEVEL } "TEST"
Also the output of Carpet::is_global_mode() is 0 so definitely not in global mode.
Hi,
The problem is that it is in level mode ("OPTIONS: LEVEL"). Level mode is called once per refinement level, and on each refinement level, there may be multiple components (rectangular blocks of grid points). A function scheduled in level mode can access quantities which are defined on a given refinement level (or, for example, call interpolation or reduction functions for that level), but not those that are defined on a given component, for example accessing grid data like gridfunctions. When you schedule a function in local mode ("OPTIONS: LOCAL"), it is called once per component, and then you can access grid data.
I spent hours recently trying to track down exactly this problem!