diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-07-18 20:40:40 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-07-18 20:40:40 +0000 |
commit | 578f426a5cae2067bd0a2a0943a584c15c3335df (patch) | |
tree | 2703a3b552db46699809088853ccd3b9a04151e9 /src/include/cctk.h | |
parent | 2cf31e125b0d67a53ed6d7dd35aac87173d645d7 (diff) |
Fixing indexing of stagger arrays. These are now in Fortran order with
no holes, and the macros protect against arguments being arithmetical expressions.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1759 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctk.h')
-rw-r--r-- | src/include/cctk.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/cctk.h b/src/include/cctk.h index ae7c2423..abda254f 100644 --- a/src/include/cctk.h +++ b/src/include/cctk.h @@ -1,4 +1,4 @@ - /*@@ +/*@@ @header cctk.h @date Tue Jan 26 17:29:34 1999 @author Tom Goodale @@ -63,8 +63,8 @@ #define CCTK_DELTA_SPACE(x) (cctk_delta_space(x)/cctk_levfac(x)) #define CCTK_DELTA_TIME cctk_delta_time -#define CCTK_LSSH(stag,dim) cctk_lssh(stag*CCTK_NSTAGGER+dim) -#define CCTK_LSSH_IDX(stag,dim) (stag*CCTK_NSTAGGER+dim) +#define CCTK_LSSH(stag,dim) cctk_lssh((stag)+CCTK_NSTAGGER+(dim)) +#define CCTK_LSSH_IDX(stag,dim) ((stag)+CCTK_NSTAGGER*(dim)) #define DECLARE_CCTK_FUNCTIONS &&\ integer CCTK_Equals, CCTK_MyProc, CCTK_nProcs, CCTK_IsThornActive&&\ @@ -197,8 +197,8 @@ extern int _cctk_one; #define CCTK_DELTA_SPACE(x) (cctk_delta_space[x]/cctk_levfac[x]) #define CCTK_DELTA_TIME cctk_delta_time -#define CCTK_LSSH(stag,dim) cctk_lssh[stag*CCTK_NSTAGGER+dim] -#define CCTK_LSSH_IDX(stag,dim) (stag*CCTK_NSTAGGER+dim) +#define CCTK_LSSH(stag,dim) cctk_lssh[(stag)+CCTK_NSTAGGER*(dim)] +#define CCTK_LSSH_IDX(stag,dim) ((stag)+CCTK_NSTAGGER*(dim)) #define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FILE__,CCTK_THORNSTRING,b) |