#2418: have DECLARE_CCTK_ARGUMENTS_CHECKED hide cctkGH members that do not exist in LEVEL mode etc.
| Reporter: | Roland Haas |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | enhancement |
| Priority: | minor |
| Component: |
Comment (by Roland Haas):
There may be some issues to consider. Eg one use of “options: GLOBAL” is if the scheduled function does its own looping over components etc. Something like (I cannot remember the exact syntax of the various mode changing macros):
schedule MyThorn_Func
{
options: global
READS: mygf
lang: C
} "do something with the data on the grid"
and then
void MyTHorn_Func(CCTK_ARGUMENTS) { BEGIN_REFLEVEL_LOOP(cctkGH) { BEGIN_LOCAL_MAP_LOOP{(cctkGH, reflevel)} BEGIN_LOCAL_COMPONENT_LOOP(cctkGH, map) { DECLARE_CCTK_ARGUTMENTS_MyThorn_Fun; int idx = CCTK_GFINDEX3D(cctkGH, 0,0,0); double value = mygf[idx]; } END_LOCAL_COMPONENT_LOOP; } END_LOCAL_MAP_LOOP } --
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2418/have-declare_cctk_arguments_checked-hide