![]() ![]() ![]() ![]() Next: Examples Up: Using ADM Macros Previous: Fortran Contents CIf you are using the macros inside a C function then you must define the grid-function subscripting index ijk, which can be found from i, j and k using the macro CCTK_GFINDEX3D(cctkGH,i,j,k). Of course, since ijk depends on i, j and k, you have to assign ijk its value inside the loop-over-grid-points loops.
You must also define the grid-function strides di, dj
and dk to give the grid-function subscripting index offsets of
the grid points The C example below should make this clear(er). Note that you should assign all these variables their values before #includeing the <MACRONAME>_guts.h macro (it may do calculations which use these values).
|