Hello Steve,
I was wondering if there a way to do something like this (I'm making up the function names, I don't know if there are real ones)
for(int n=0;n<CCTK_Max_Variable_Index(cctkGH);n++) { CCTK_REAL *gf = CCTK_LookupCCTKRealGF(n); for(int i=.... for(int j=... for(int k=... gf[CCTK_GFINDEX3D(cctkGH, i, j, k)] = 0 }
There is CCTK_NumVars, CCTK_NumTimeLevelsVI, CCTK_VarDataPtrI to get the number of Cactus variables, the number of timelevels for a variable, and the pointer to the data of this variable. Information on the type of the variable (GF, scalar, CCTK_REAL, CCTK_INT) is likely somehwere in GroupTypeFromVarI and CCTK_GroupData though those I have not used myself.
Yours, Roland