diff options
author | eschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2012-07-04 01:25:29 +0000 |
---|---|---|
committer | eschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2012-07-04 01:25:29 +0000 |
commit | 5890fa36427bdea8efe70079e3cd1e5612312e77 (patch) | |
tree | 47d730568fc835f8f37d54728de142c767699f3d /src/include | |
parent | d9fda6d54df1e6de28a99e812e6c5769e4d9be4a (diff) |
Introduce cctk_ash, retire cctk_lssh
Introduce cctk_ash, describing the process-local array shape that has
been allocated. This may be larger than cctk_lsh, the process-local
shape that should be used.
Retire cctk_lssh and related infrastructure to handle staggered grid
functions.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4841 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/cGH.h | 4 | ||||
-rw-r--r-- | src/include/cctk_Constants.h | 3 | ||||
-rw-r--r-- | src/include/cctk_Groups.h | 3 | ||||
-rw-r--r-- | src/include/cctk_GroupsOnGH.h | 11 | ||||
-rw-r--r-- | src/include/cctk_Loop.h | 328 | ||||
-rwxr-xr-x | src/include/cctk_Loop.h.pl | 52 | ||||
-rw-r--r-- | src/include/cctk_Stagger.h | 35 | ||||
-rw-r--r-- | src/include/cctk_core.h | 63 | ||||
-rw-r--r-- | src/include/cctki_Groups.h | 1 | ||||
-rw-r--r-- | src/include/cctki_Stagger.h | 79 |
10 files changed, 224 insertions, 355 deletions
diff --git a/src/include/cGH.h b/src/include/cGH.h index e2f62098..f92be81e 100644 --- a/src/include/cGH.h +++ b/src/include/cGH.h @@ -30,8 +30,8 @@ typedef struct _cGH int *cctk_lbnd; int *cctk_ubnd; - /* local stagger shape lssh[3*dim] (3 staggerings) */ - int *cctk_lssh; + /* allocated shape */ + int *cctk_ash; /* unused */ int *cctk_to; diff --git a/src/include/cctk_Constants.h b/src/include/cctk_Constants.h index 89f561ad..680e77f5 100644 --- a/src/include/cctk_Constants.h +++ b/src/include/cctk_Constants.h @@ -40,9 +40,6 @@ #define CCTK_STEERABLE_ALWAYS 201 #define CCTK_STEERABLE_RECOVER 202 -/* number of staggerings */ -#define CCTK_NSTAGGER 3 - /* group distributions */ #define CCTK_DISTRIB_CONSTANT 301 #define CCTK_DISTRIB_DEFAULT 302 diff --git a/src/include/cctk_Groups.h b/src/include/cctk_Groups.h index 0d101a76..bcd64402 100644 --- a/src/include/cctk_Groups.h +++ b/src/include/cctk_Groups.h @@ -16,7 +16,6 @@ typedef struct int grouptype; int vartype; int disttype; - int stagtype; int dim; int numvars; int numtimelevels; @@ -34,8 +33,6 @@ extern "C" #include "cctk_Types.h" -int CCTK_StaggerVars(void); - int CCTK_DecomposeName(const char *fullname, char **implementation, char **name); diff --git a/src/include/cctk_GroupsOnGH.h b/src/include/cctk_GroupsOnGH.h index e2e38c96..2883afa8 100644 --- a/src/include/cctk_GroupsOnGH.h +++ b/src/include/cctk_GroupsOnGH.h @@ -18,8 +18,7 @@ typedef struct GROUPDYNAMICDATA const int *lsh; const int *lbnd; const int *ubnd; -#define CCTK_GROUPDYNAMICDATA_HAS_LSSH - const int *lssh; + const int *ash; const int *bbox; const int *nghostzones; int activetimelevels; @@ -55,10 +54,10 @@ int CCTK_GrouplshVN(const cGH *GH, int dim, int *lsh, const char *varname); int CCTK_GrouplshGI(const cGH *GH, int dim, int *lsh, int groupindex); int CCTK_GrouplshVI(const cGH *GH, int dim, int *lsh, int varindex); -int CCTK_GrouplsshGN(const cGH *GH, int dim, int *lssh, const char *groupname); -int CCTK_GrouplsshVN(const cGH *GH, int dim, int *lssh, const char *varname); -int CCTK_GrouplsshGI(const cGH *GH, int dim, int *lssh, int groupindex); -int CCTK_GrouplsshVI(const cGH *GH, int dim, int *lssh, int varindex); +int CCTK_GroupashGN(const cGH *GH, int dim, int *ash, const char *groupname); +int CCTK_GroupashVN(const cGH *GH, int dim, int *ash, const char *varname); +int CCTK_GroupashGI(const cGH *GH, int dim, int *ash, int groupindex); +int CCTK_GroupashVI(const cGH *GH, int dim, int *ash, int varindex); int CCTK_GroupgshGN(const cGH *GH, int dim, int *gsh, const char *groupname); int CCTK_GroupgshVN(const cGH *GH, int dim, int *gsh, const char *varname); diff --git a/src/include/cctk_Loop.h b/src/include/cctk_Loop.h index aae37034..3919dc16 100644 --- a/src/include/cctk_Loop.h +++ b/src/include/cctk_Loop.h @@ -27,14 +27,14 @@ idir, \ imin, \ imax, \ - ilsh) \ + iash) \ CCTK_LOOP1STR_NORMAL(name, \ i, \ ni, \ (idir), \ (imin), \ (imax), \ - (ilsh), \ + (iash), \ 1) \ #define CCTK_ENDLOOP1_NORMAL(name) \ @@ -46,7 +46,7 @@ idir, \ imin, \ imax, \ - ilsh, \ + iash, \ istr) \ do { \ typedef int cctki0_loop1_normal_##name; \ @@ -72,12 +72,12 @@ i, \ imin, \ imax, \ - ilsh) \ + iash) \ CCTK_LOOP1STR(name, \ i, \ (imin), \ (imax), \ - (ilsh), \ + (iash), \ 1) \ #define CCTK_ENDLOOP1(name) \ @@ -87,7 +87,7 @@ i, \ imin, \ imax, \ - ilsh, \ + iash, \ istr) \ CCTK_LOOP1STR_NORMAL(name, \ i, \ @@ -95,7 +95,7 @@ 0, \ imin, \ imax, \ - ilsh, \ + iash, \ istr) \ #define CCTK_ENDLOOP1STR(name) \ @@ -134,8 +134,8 @@ CCTK_LOOP1STR(name##_interior, \ i, \ (iblo), \ - cctki2_cctkGH->CCTK_LSSH(0,0)-(ibhi), \ - cctki2_cctkGH->cctk_lsh[0], \ + cctki2_cctkGH->cctk_lsh[0]-(ibhi), \ + cctki2_cctkGH->cctk_ash[0], \ (istr)) { \ #define CCTK_ENDLOOP1STR_INTERIOR(name) \ @@ -185,7 +185,7 @@ int const cctki2_blo[] = { (iblo) }; \ int const cctki2_bhi[] = { (ibhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_idir=-1; cctki2_idir<=+1; ++cctki2_idir) { \ @@ -193,10 +193,10 @@ (cctki2_idir==-1 ? cctki2_bbox[0] : 0) || (cctki2_idir==+1 ? cctki2_bbox[1] : 0); \ if (cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ }; \ CCTK_LOOP1STR_NORMAL(name##_boundaries, \ i, \ @@ -204,7 +204,7 @@ cctki2_idir, \ cctki2_bmin[0], \ cctki2_bmax[0], \ - cctki2_cctkGH->cctk_lsh[0], \ + cctki2_cctkGH->cctk_ash[0], \ cctki2_istr1) { \ #define CCTK_ENDLOOP1STR_BOUNDARIES(name) \ @@ -256,7 +256,7 @@ int const cctki2_blo[] = { (iblo) }; \ int const cctki2_bhi[] = { (ibhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_idir=-1; cctki2_idir<=+1; ++cctki2_idir) { \ @@ -266,10 +266,10 @@ (cctki2_idir==-1 ? cctki2_bbox[0] : 1) && (cctki2_idir==+1 ? cctki2_bbox[1] : 1); \ if (cctki2_all_bbox && cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ }; \ CCTK_LOOP1STR_NORMAL(name##_intboundaries, \ i, \ @@ -277,7 +277,7 @@ cctki2_idir, \ cctki2_bmin[0], \ cctki2_bmax[0], \ - cctki2_cctkGH->cctk_lsh[0], \ + cctki2_cctkGH->cctk_ash[0], \ cctki2_istr1) { \ #define CCTK_ENDLOOP1STR_INTBOUNDARIES(name) \ @@ -314,8 +314,8 @@ CCTK_LOOP1STR(name##_all, \ i, \ 0, \ - cctki3_cctkGH->CCTK_LSSH(0,0), \ cctki3_cctkGH->cctk_lsh[0], \ + cctki3_cctkGH->cctk_ash[0], \ (istr)) { \ #define CCTK_ENDLOOP1STR_ALL(name) \ @@ -483,19 +483,19 @@ i, \ imin, \ imax, \ - ilsh) \ + iash) \ CCTK_LOOP1STR(name, \ i, \ imin, \ imax, \ - ilsh, \ + iash, \ 1) \ #define CCTK_LOOP1STR(name, \ i, \ imin, \ imax, \ - ilsh, \ + iash, \ istr) \ && name/**/_imin = imin \ && name/**/_imax = imax \ @@ -530,8 +530,8 @@ CCTK_LOOP1STR(name, \ i, \ 1, \ - CCTK_LSSH(0,1), \ cctk_lsh(1), \ + cctk_ash(1), \ istr) \ #define CCTK_ENDLOOP1_ALL(name) \ @@ -568,8 +568,8 @@ CCTK_LOOP1STR(name, \ i, \ (iblo), \ - CCTK_LSSH(0,1)-(ibhi), \ - cctk_lsh(1), \ + cctk_lsh(1)-(ibhi), \ + cctk_ash(1), \ istr) \ #define CCTK_ENDLOOP1_INTERIOR(name) \ @@ -615,7 +615,7 @@ && do lc_face=1,2 \ && do lc_d=1,1 \ && lc_bmin(lc_d) = 1 \ - && lc_bmax(lc_d) = CCTK_LSSH(0,lc_d) \ + && lc_bmax(lc_d) = cctk_lsh(lc_d) \ && if (lc_d<lc_dir) then \ && lc_bmin(lc_d) = lc_bmin(lc_d)+lc_blo(lc_d) \ && lc_bmax(lc_d) = lc_bmax(lc_d)-lc_bhi(lc_d) \ @@ -630,7 +630,7 @@ i, \ lc_bmin(1), \ lc_bmax(1), \ - cctk_lsh(1), \ + cctk_ash(1), \ lc_istr) \ #define CCTK_ENDLOOP1_BOUNDARIES(name) \ @@ -657,14 +657,14 @@ idir,jdir, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh) \ + iash,jash) \ CCTK_LOOP2STR_NORMAL(name, \ i,j, \ ni,nj, \ (idir),(jdir), \ (imin),(jmin), \ (imax),(jmax), \ - (ilsh),(jlsh), \ + (iash),(jash), \ 1) \ #define CCTK_ENDLOOP2_NORMAL(name) \ @@ -676,7 +676,7 @@ idir,jdir, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh, \ + iash,jash, \ istr) \ do { \ typedef int cctki0_loop2_normal_##name; \ @@ -708,12 +708,12 @@ i,j, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh) \ + iash,jash) \ CCTK_LOOP2STR(name, \ i,j, \ (imin),(jmin), \ (imax),(jmax), \ - (ilsh),(jlsh), \ + (iash),(jash), \ 1) \ #define CCTK_ENDLOOP2(name) \ @@ -723,7 +723,7 @@ i,j, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh, \ + iash,jash, \ istr) \ CCTK_LOOP2STR_NORMAL(name, \ i,j, \ @@ -731,7 +731,7 @@ 0,0, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh, \ + iash,jash, \ istr) \ #define CCTK_ENDLOOP2STR(name) \ @@ -770,10 +770,10 @@ CCTK_LOOP2STR(name##_interior, \ i,j, \ (iblo),(jblo), \ - cctki2_cctkGH->CCTK_LSSH(0,0)-(ibhi), \ - cctki2_cctkGH->CCTK_LSSH(0,1)-(jbhi), \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ + cctki2_cctkGH->cctk_lsh[0]-(ibhi), \ + cctki2_cctkGH->cctk_lsh[1]-(jbhi), \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ (istr)) { \ #define CCTK_ENDLOOP2STR_INTERIOR(name) \ @@ -823,7 +823,7 @@ int const cctki2_blo[] = { (iblo),(jblo) }; \ int const cctki2_bhi[] = { (ibhi),(jbhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi),(jbboxlo), (jbboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0),cctki2_cctkGH->CCTK_LSSH(0,1) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0],cctki2_cctkGH->cctk_lsh[1] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_jdir=-1; cctki2_jdir<=+1; ++cctki2_jdir) { \ @@ -833,12 +833,12 @@ (cctki2_jdir==-1 ? cctki2_bbox[2] : 0) || (cctki2_jdir==+1 ? cctki2_bbox[3] : 0); \ if (cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ - cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lssh[1] - cctki2_bhi[1], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ + cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lsh[1] - cctki2_bhi[1], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ - cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lssh[1] - cctki2_bhi[1] : cctki2_lssh[1], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ + cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lsh[1] - cctki2_bhi[1] : cctki2_lsh[1], \ }; \ CCTK_LOOP2STR_NORMAL(name##_boundaries, \ i,j, \ @@ -846,8 +846,8 @@ cctki2_idir,cctki2_jdir, \ cctki2_bmin[0],cctki2_bmin[1], \ cctki2_bmax[0],cctki2_bmax[1], \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ cctki2_istr1) { \ #define CCTK_ENDLOOP2STR_BOUNDARIES(name) \ @@ -900,7 +900,7 @@ int const cctki2_blo[] = { (iblo),(jblo) }; \ int const cctki2_bhi[] = { (ibhi),(jbhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi),(jbboxlo), (jbboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0),cctki2_cctkGH->CCTK_LSSH(0,1) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0],cctki2_cctkGH->cctk_lsh[1] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_jdir=-1; cctki2_jdir<=+1; ++cctki2_jdir) { \ @@ -913,12 +913,12 @@ (cctki2_jdir==-1 ? cctki2_bbox[2] : 1) && (cctki2_jdir==+1 ? cctki2_bbox[3] : 1); \ if (cctki2_all_bbox && cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ - cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lssh[1] - cctki2_bhi[1], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ + cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lsh[1] - cctki2_bhi[1], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ - cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lssh[1] - cctki2_bhi[1] : cctki2_lssh[1], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ + cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lsh[1] - cctki2_bhi[1] : cctki2_lsh[1], \ }; \ CCTK_LOOP2STR_NORMAL(name##_intboundaries, \ i,j, \ @@ -926,8 +926,8 @@ cctki2_idir,cctki2_jdir, \ cctki2_bmin[0],cctki2_bmin[1], \ cctki2_bmax[0],cctki2_bmax[1], \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ cctki2_istr1) { \ #define CCTK_ENDLOOP2STR_INTBOUNDARIES(name) \ @@ -965,10 +965,10 @@ CCTK_LOOP2STR(name##_all, \ i,j, \ 0,0, \ - cctki3_cctkGH->CCTK_LSSH(0,0), \ - cctki3_cctkGH->CCTK_LSSH(0,1), \ cctki3_cctkGH->cctk_lsh[0], \ cctki3_cctkGH->cctk_lsh[1], \ + cctki3_cctkGH->cctk_ash[0], \ + cctki3_cctkGH->cctk_ash[1], \ (istr)) { \ #define CCTK_ENDLOOP2STR_ALL(name) \ @@ -1136,19 +1136,19 @@ i,j, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh) \ + iash,jash) \ CCTK_LOOP2STR(name, \ i,j, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh, \ + iash,jash, \ 1) \ #define CCTK_LOOP2STR(name, \ i,j, \ imin,jmin, \ imax,jmax, \ - ilsh,jlsh, \ + iash,jash, \ istr) \ && name/**/_imin = imin \ && name/**/_jmin = jmin \ @@ -1187,8 +1187,8 @@ CCTK_LOOP2STR(name, \ i,j, \ 1,1, \ - CCTK_LSSH(0,1),CCTK_LSSH(0,2), \ cctk_lsh(1),cctk_lsh(2), \ + cctk_ash(1),cctk_ash(2), \ istr) \ #define CCTK_ENDLOOP2_ALL(name) \ @@ -1225,9 +1225,9 @@ CCTK_LOOP2STR(name, \ i,j, \ (iblo),(jblo), \ - CCTK_LSSH(0,1)-(ibhi), \ - CCTK_LSSH(0,2)-(jbhi), \ - cctk_lsh(1),cctk_lsh(2), \ + cctk_lsh(1)-(ibhi), \ + cctk_lsh(2)-(jbhi), \ + cctk_ash(1),cctk_ash(2), \ istr) \ #define CCTK_ENDLOOP2_INTERIOR(name) \ @@ -1273,7 +1273,7 @@ && do lc_face=1,2 \ && do lc_d=1,2 \ && lc_bmin(lc_d) = 1 \ - && lc_bmax(lc_d) = CCTK_LSSH(0,lc_d) \ + && lc_bmax(lc_d) = cctk_lsh(lc_d) \ && if (lc_d<lc_dir) then \ && lc_bmin(lc_d) = lc_bmin(lc_d)+lc_blo(lc_d) \ && lc_bmax(lc_d) = lc_bmax(lc_d)-lc_bhi(lc_d) \ @@ -1288,7 +1288,7 @@ i,j, \ lc_bmin(1),lc_bmin(2), \ lc_bmax(1),lc_bmax(2), \ - cctk_lsh(1),cctk_lsh(2), \ + cctk_ash(1),cctk_ash(2), \ lc_istr) \ #define CCTK_ENDLOOP2_BOUNDARIES(name) \ @@ -1315,14 +1315,14 @@ idir,jdir,kdir, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh) \ + iash,jash,kash) \ CCTK_LOOP3STR_NORMAL(name, \ i,j,k, \ ni,nj,nk, \ (idir),(jdir),(kdir), \ (imin),(jmin),(kmin), \ (imax),(jmax),(kmax), \ - (ilsh),(jlsh),(klsh), \ + (iash),(jash),(kash), \ 1) \ #define CCTK_ENDLOOP3_NORMAL(name) \ @@ -1334,7 +1334,7 @@ idir,jdir,kdir, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh, \ + iash,jash,kash, \ istr) \ do { \ typedef int cctki0_loop3_normal_##name; \ @@ -1372,12 +1372,12 @@ i,j,k, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh) \ + iash,jash,kash) \ CCTK_LOOP3STR(name, \ i,j,k, \ (imin),(jmin),(kmin), \ (imax),(jmax),(kmax), \ - (ilsh),(jlsh),(klsh), \ + (iash),(jash),(kash), \ 1) \ #define CCTK_ENDLOOP3(name) \ @@ -1387,7 +1387,7 @@ i,j,k, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh, \ + iash,jash,kash, \ istr) \ CCTK_LOOP3STR_NORMAL(name, \ i,j,k, \ @@ -1395,7 +1395,7 @@ 0,0,0, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh, \ + iash,jash,kash, \ istr) \ #define CCTK_ENDLOOP3STR(name) \ @@ -1434,12 +1434,12 @@ CCTK_LOOP3STR(name##_interior, \ i,j,k, \ (iblo),(jblo),(kblo), \ - cctki2_cctkGH->CCTK_LSSH(0,0)-(ibhi), \ - cctki2_cctkGH->CCTK_LSSH(0,1)-(jbhi), \ - cctki2_cctkGH->CCTK_LSSH(0,2)-(kbhi), \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ - cctki2_cctkGH->cctk_lsh[2], \ + cctki2_cctkGH->cctk_lsh[0]-(ibhi), \ + cctki2_cctkGH->cctk_lsh[1]-(jbhi), \ + cctki2_cctkGH->cctk_lsh[2]-(kbhi), \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ + cctki2_cctkGH->cctk_ash[2], \ (istr)) { \ #define CCTK_ENDLOOP3STR_INTERIOR(name) \ @@ -1489,7 +1489,7 @@ int const cctki2_blo[] = { (iblo),(jblo),(kblo) }; \ int const cctki2_bhi[] = { (ibhi),(jbhi),(kbhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi),(jbboxlo), (jbboxhi),(kbboxlo), (kbboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0),cctki2_cctkGH->CCTK_LSSH(0,1),cctki2_cctkGH->CCTK_LSSH(0,2) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0],cctki2_cctkGH->cctk_lsh[1],cctki2_cctkGH->cctk_lsh[2] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_kdir=-1; cctki2_kdir<=+1; ++cctki2_kdir) { \ @@ -1501,14 +1501,14 @@ (cctki2_kdir==-1 ? cctki2_bbox[4] : 0) || (cctki2_kdir==+1 ? cctki2_bbox[5] : 0); \ if (cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ - cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lssh[1] - cctki2_bhi[1], \ - cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lssh[2] - cctki2_bhi[2], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ + cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lsh[1] - cctki2_bhi[1], \ + cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lsh[2] - cctki2_bhi[2], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ - cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lssh[1] - cctki2_bhi[1] : cctki2_lssh[1], \ - cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lssh[2] - cctki2_bhi[2] : cctki2_lssh[2], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ + cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lsh[1] - cctki2_bhi[1] : cctki2_lsh[1], \ + cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lsh[2] - cctki2_bhi[2] : cctki2_lsh[2], \ }; \ CCTK_LOOP3STR_NORMAL(name##_boundaries, \ i,j,k, \ @@ -1516,9 +1516,9 @@ cctki2_idir,cctki2_jdir,cctki2_kdir, \ cctki2_bmin[0],cctki2_bmin[1],cctki2_bmin[2], \ cctki2_bmax[0],cctki2_bmax[1],cctki2_bmax[2], \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ - cctki2_cctkGH->cctk_lsh[2], \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ + cctki2_cctkGH->cctk_ash[2], \ cctki2_istr1) { \ #define CCTK_ENDLOOP3STR_BOUNDARIES(name) \ @@ -1572,7 +1572,7 @@ int const cctki2_blo[] = { (iblo),(jblo),(kblo) }; \ int const cctki2_bhi[] = { (ibhi),(jbhi),(kbhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi),(jbboxlo), (jbboxhi),(kbboxlo), (kbboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0),cctki2_cctkGH->CCTK_LSSH(0,1),cctki2_cctkGH->CCTK_LSSH(0,2) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0],cctki2_cctkGH->cctk_lsh[1],cctki2_cctkGH->cctk_lsh[2] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_kdir=-1; cctki2_kdir<=+1; ++cctki2_kdir) { \ @@ -1588,14 +1588,14 @@ (cctki2_kdir==-1 ? cctki2_bbox[4] : 1) && (cctki2_kdir==+1 ? cctki2_bbox[5] : 1); \ if (cctki2_all_bbox && cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ - cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lssh[1] - cctki2_bhi[1], \ - cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lssh[2] - cctki2_bhi[2], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ + cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lsh[1] - cctki2_bhi[1], \ + cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lsh[2] - cctki2_bhi[2], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ - cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lssh[1] - cctki2_bhi[1] : cctki2_lssh[1], \ - cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lssh[2] - cctki2_bhi[2] : cctki2_lssh[2], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ + cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lsh[1] - cctki2_bhi[1] : cctki2_lsh[1], \ + cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lsh[2] - cctki2_bhi[2] : cctki2_lsh[2], \ }; \ CCTK_LOOP3STR_NORMAL(name##_intboundaries, \ i,j,k, \ @@ -1603,9 +1603,9 @@ cctki2_idir,cctki2_jdir,cctki2_kdir, \ cctki2_bmin[0],cctki2_bmin[1],cctki2_bmin[2], \ cctki2_bmax[0],cctki2_bmax[1],cctki2_bmax[2], \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ - cctki2_cctkGH->cctk_lsh[2], \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ + cctki2_cctkGH->cctk_ash[2], \ cctki2_istr1) { \ #define CCTK_ENDLOOP3STR_INTBOUNDARIES(name) \ @@ -1644,12 +1644,12 @@ CCTK_LOOP3STR(name##_all, \ i,j,k, \ 0,0,0, \ - cctki3_cctkGH->CCTK_LSSH(0,0), \ - cctki3_cctkGH->CCTK_LSSH(0,1), \ - cctki3_cctkGH->CCTK_LSSH(0,2), \ cctki3_cctkGH->cctk_lsh[0], \ cctki3_cctkGH->cctk_lsh[1], \ cctki3_cctkGH->cctk_lsh[2], \ + cctki3_cctkGH->cctk_ash[0], \ + cctki3_cctkGH->cctk_ash[1], \ + cctki3_cctkGH->cctk_ash[2], \ (istr)) { \ #define CCTK_ENDLOOP3STR_ALL(name) \ @@ -1817,19 +1817,19 @@ i,j,k, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh) \ + iash,jash,kash) \ CCTK_LOOP3STR(name, \ i,j,k, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh, \ + iash,jash,kash, \ 1) \ #define CCTK_LOOP3STR(name, \ i,j,k, \ imin,jmin,kmin, \ imax,jmax,kmax, \ - ilsh,jlsh,klsh, \ + iash,jash,kash, \ istr) \ && name/**/_imin = imin \ && name/**/_jmin = jmin \ @@ -1872,8 +1872,8 @@ CCTK_LOOP3STR(name, \ i,j,k, \ 1,1,1, \ - CCTK_LSSH(0,1),CCTK_LSSH(0,2),CCTK_LSSH(0,3), \ cctk_lsh(1),cctk_lsh(2),cctk_lsh(3), \ + cctk_ash(1),cctk_ash(2),cctk_ash(3), \ istr) \ #define CCTK_ENDLOOP3_ALL(name) \ @@ -1910,10 +1910,10 @@ CCTK_LOOP3STR(name, \ i,j,k, \ (iblo),(jblo),(kblo), \ - CCTK_LSSH(0,1)-(ibhi), \ - CCTK_LSSH(0,2)-(jbhi), \ - CCTK_LSSH(0,3)-(kbhi), \ - cctk_lsh(1),cctk_lsh(2),cctk_lsh(3), \ + cctk_lsh(1)-(ibhi), \ + cctk_lsh(2)-(jbhi), \ + cctk_lsh(3)-(kbhi), \ + cctk_ash(1),cctk_ash(2),cctk_ash(3), \ istr) \ #define CCTK_ENDLOOP3_INTERIOR(name) \ @@ -1959,7 +1959,7 @@ && do lc_face=1,2 \ && do lc_d=1,3 \ && lc_bmin(lc_d) = 1 \ - && lc_bmax(lc_d) = CCTK_LSSH(0,lc_d) \ + && lc_bmax(lc_d) = cctk_lsh(lc_d) \ && if (lc_d<lc_dir) then \ && lc_bmin(lc_d) = lc_bmin(lc_d)+lc_blo(lc_d) \ && lc_bmax(lc_d) = lc_bmax(lc_d)-lc_bhi(lc_d) \ @@ -1974,7 +1974,7 @@ i,j,k, \ lc_bmin(1),lc_bmin(2),lc_bmin(3), \ lc_bmax(1),lc_bmax(2),lc_bmax(3), \ - cctk_lsh(1),cctk_lsh(2),cctk_lsh(3), \ + cctk_ash(1),cctk_ash(2),cctk_ash(3), \ lc_istr) \ #define CCTK_ENDLOOP3_BOUNDARIES(name) \ @@ -2001,14 +2001,14 @@ idir,jdir,kdir,ldir, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh) \ + iash,jash,kash,lash) \ CCTK_LOOP4STR_NORMAL(name, \ i,j,k,l, \ ni,nj,nk,nl, \ (idir),(jdir),(kdir),(ldir), \ (imin),(jmin),(kmin),(lmin), \ (imax),(jmax),(kmax),(lmax), \ - (ilsh),(jlsh),(klsh),(llsh), \ + (iash),(jash),(kash),(lash), \ 1) \ #define CCTK_ENDLOOP4_NORMAL(name) \ @@ -2020,7 +2020,7 @@ idir,jdir,kdir,ldir, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh, \ + iash,jash,kash,lash, \ istr) \ do { \ typedef int cctki0_loop4_normal_##name; \ @@ -2064,12 +2064,12 @@ i,j,k,l, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh) \ + iash,jash,kash,lash) \ CCTK_LOOP4STR(name, \ i,j,k,l, \ (imin),(jmin),(kmin),(lmin), \ (imax),(jmax),(kmax),(lmax), \ - (ilsh),(jlsh),(klsh),(llsh), \ + (iash),(jash),(kash),(lash), \ 1) \ #define CCTK_ENDLOOP4(name) \ @@ -2079,7 +2079,7 @@ i,j,k,l, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh, \ + iash,jash,kash,lash, \ istr) \ CCTK_LOOP4STR_NORMAL(name, \ i,j,k,l, \ @@ -2087,7 +2087,7 @@ 0,0,0,0, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh, \ + iash,jash,kash,lash, \ istr) \ #define CCTK_ENDLOOP4STR(name) \ @@ -2126,14 +2126,14 @@ CCTK_LOOP4STR(name##_interior, \ i,j,k,l, \ (iblo),(jblo),(kblo),(lblo), \ - cctki2_cctkGH->CCTK_LSSH(0,0)-(ibhi), \ - cctki2_cctkGH->CCTK_LSSH(0,1)-(jbhi), \ - cctki2_cctkGH->CCTK_LSSH(0,2)-(kbhi), \ - cctki2_cctkGH->CCTK_LSSH(0,3)-(lbhi), \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ - cctki2_cctkGH->cctk_lsh[2], \ - cctki2_cctkGH->cctk_lsh[3], \ + cctki2_cctkGH->cctk_lsh[0]-(ibhi), \ + cctki2_cctkGH->cctk_lsh[1]-(jbhi), \ + cctki2_cctkGH->cctk_lsh[2]-(kbhi), \ + cctki2_cctkGH->cctk_lsh[3]-(lbhi), \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ + cctki2_cctkGH->cctk_ash[2], \ + cctki2_cctkGH->cctk_ash[3], \ (istr)) { \ #define CCTK_ENDLOOP4STR_INTERIOR(name) \ @@ -2183,7 +2183,7 @@ int const cctki2_blo[] = { (iblo),(jblo),(kblo),(lblo) }; \ int const cctki2_bhi[] = { (ibhi),(jbhi),(kbhi),(lbhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi),(jbboxlo), (jbboxhi),(kbboxlo), (kbboxhi),(lbboxlo), (lbboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0),cctki2_cctkGH->CCTK_LSSH(0,1),cctki2_cctkGH->CCTK_LSSH(0,2),cctki2_cctkGH->CCTK_LSSH(0,3) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0],cctki2_cctkGH->cctk_lsh[1],cctki2_cctkGH->cctk_lsh[2],cctki2_cctkGH->cctk_lsh[3] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_ldir=-1; cctki2_ldir<=+1; ++cctki2_ldir) { \ @@ -2197,16 +2197,16 @@ (cctki2_ldir==-1 ? cctki2_bbox[6] : 0) || (cctki2_ldir==+1 ? cctki2_bbox[7] : 0); \ if (cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ - cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lssh[1] - cctki2_bhi[1], \ - cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lssh[2] - cctki2_bhi[2], \ - cctki2_ldir==-1 ? 0 : cctki2_ldir==0 ? cctki2_blo[3] : cctki2_lssh[3] - cctki2_bhi[3], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ + cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lsh[1] - cctki2_bhi[1], \ + cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lsh[2] - cctki2_bhi[2], \ + cctki2_ldir==-1 ? 0 : cctki2_ldir==0 ? cctki2_blo[3] : cctki2_lsh[3] - cctki2_bhi[3], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ - cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lssh[1] - cctki2_bhi[1] : cctki2_lssh[1], \ - cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lssh[2] - cctki2_bhi[2] : cctki2_lssh[2], \ - cctki2_ldir==-1 ? cctki2_blo[3] : cctki2_ldir==0 ? cctki2_lssh[3] - cctki2_bhi[3] : cctki2_lssh[3], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ + cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lsh[1] - cctki2_bhi[1] : cctki2_lsh[1], \ + cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lsh[2] - cctki2_bhi[2] : cctki2_lsh[2], \ + cctki2_ldir==-1 ? cctki2_blo[3] : cctki2_ldir==0 ? cctki2_lsh[3] - cctki2_bhi[3] : cctki2_lsh[3], \ }; \ CCTK_LOOP4STR_NORMAL(name##_boundaries, \ i,j,k,l, \ @@ -2214,10 +2214,10 @@ cctki2_idir,cctki2_jdir,cctki2_kdir,cctki2_ldir, \ cctki2_bmin[0],cctki2_bmin[1],cctki2_bmin[2],cctki2_bmin[3], \ cctki2_bmax[0],cctki2_bmax[1],cctki2_bmax[2],cctki2_bmax[3], \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ - cctki2_cctkGH->cctk_lsh[2], \ - cctki2_cctkGH->cctk_lsh[3], \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ + cctki2_cctkGH->cctk_ash[2], \ + cctki2_cctkGH->cctk_ash[3], \ cctki2_istr1) { \ #define CCTK_ENDLOOP4STR_BOUNDARIES(name) \ @@ -2272,7 +2272,7 @@ int const cctki2_blo[] = { (iblo),(jblo),(kblo),(lblo) }; \ int const cctki2_bhi[] = { (ibhi),(jbhi),(kbhi),(lbhi) }; \ int const cctki2_bbox[] = { (ibboxlo), (ibboxhi),(jbboxlo), (jbboxhi),(kbboxlo), (kbboxhi),(lbboxlo), (lbboxhi) }; \ - int const cctki2_lssh[] = { cctki2_cctkGH->CCTK_LSSH(0,0),cctki2_cctkGH->CCTK_LSSH(0,1),cctki2_cctkGH->CCTK_LSSH(0,2),cctki2_cctkGH->CCTK_LSSH(0,3) }; \ + int const cctki2_lsh[] = { cctki2_cctkGH->cctk_lsh[0],cctki2_cctkGH->cctk_lsh[1],cctki2_cctkGH->cctk_lsh[2],cctki2_cctkGH->cctk_lsh[3] }; \ int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr); \ /* Loop over all faces, edges, and corners */ \ for (int cctki2_ldir=-1; cctki2_ldir<=+1; ++cctki2_ldir) { \ @@ -2291,16 +2291,16 @@ (cctki2_ldir==-1 ? cctki2_bbox[6] : 1) && (cctki2_ldir==+1 ? cctki2_bbox[7] : 1); \ if (cctki2_all_bbox && cctki2_any_bbox) { \ int const cctki2_bmin[] = { \ - cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lssh[0] - cctki2_bhi[0], \ - cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lssh[1] - cctki2_bhi[1], \ - cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lssh[2] - cctki2_bhi[2], \ - cctki2_ldir==-1 ? 0 : cctki2_ldir==0 ? cctki2_blo[3] : cctki2_lssh[3] - cctki2_bhi[3], \ + cctki2_idir==-1 ? 0 : cctki2_idir==0 ? cctki2_blo[0] : cctki2_lsh[0] - cctki2_bhi[0], \ + cctki2_jdir==-1 ? 0 : cctki2_jdir==0 ? cctki2_blo[1] : cctki2_lsh[1] - cctki2_bhi[1], \ + cctki2_kdir==-1 ? 0 : cctki2_kdir==0 ? cctki2_blo[2] : cctki2_lsh[2] - cctki2_bhi[2], \ + cctki2_ldir==-1 ? 0 : cctki2_ldir==0 ? cctki2_blo[3] : cctki2_lsh[3] - cctki2_bhi[3], \ }; \ int const cctki2_bmax[] = { \ - cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lssh[0] - cctki2_bhi[0] : cctki2_lssh[0], \ - cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lssh[1] - cctki2_bhi[1] : cctki2_lssh[1], \ - cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lssh[2] - cctki2_bhi[2] : cctki2_lssh[2], \ - cctki2_ldir==-1 ? cctki2_blo[3] : cctki2_ldir==0 ? cctki2_lssh[3] - cctki2_bhi[3] : cctki2_lssh[3], \ + cctki2_idir==-1 ? cctki2_blo[0] : cctki2_idir==0 ? cctki2_lsh[0] - cctki2_bhi[0] : cctki2_lsh[0], \ + cctki2_jdir==-1 ? cctki2_blo[1] : cctki2_jdir==0 ? cctki2_lsh[1] - cctki2_bhi[1] : cctki2_lsh[1], \ + cctki2_kdir==-1 ? cctki2_blo[2] : cctki2_kdir==0 ? cctki2_lsh[2] - cctki2_bhi[2] : cctki2_lsh[2], \ + cctki2_ldir==-1 ? cctki2_blo[3] : cctki2_ldir==0 ? cctki2_lsh[3] - cctki2_bhi[3] : cctki2_lsh[3], \ }; \ CCTK_LOOP4STR_NORMAL(name##_intboundaries, \ i,j,k,l, \ @@ -2308,10 +2308,10 @@ cctki2_idir,cctki2_jdir,cctki2_kdir,cctki2_ldir, \ cctki2_bmin[0],cctki2_bmin[1],cctki2_bmin[2],cctki2_bmin[3], \ cctki2_bmax[0],cctki2_bmax[1],cctki2_bmax[2],cctki2_bmax[3], \ - cctki2_cctkGH->cctk_lsh[0], \ - cctki2_cctkGH->cctk_lsh[1], \ - cctki2_cctkGH->cctk_lsh[2], \ - cctki2_cctkGH->cctk_lsh[3], \ + cctki2_cctkGH->cctk_ash[0], \ + cctki2_cctkGH->cctk_ash[1], \ + cctki2_cctkGH->cctk_ash[2], \ + cctki2_cctkGH->cctk_ash[3], \ cctki2_istr1) { \ #define CCTK_ENDLOOP4STR_INTBOUNDARIES(name) \ @@ -2351,14 +2351,14 @@ CCTK_LOOP4STR(name##_all, \ i,j,k,l, \ 0,0,0,0, \ - cctki3_cctkGH->CCTK_LSSH(0,0), \ - cctki3_cctkGH->CCTK_LSSH(0,1), \ - cctki3_cctkGH->CCTK_LSSH(0,2), \ - cctki3_cctkGH->CCTK_LSSH(0,3), \ cctki3_cctkGH->cctk_lsh[0], \ cctki3_cctkGH->cctk_lsh[1], \ cctki3_cctkGH->cctk_lsh[2], \ cctki3_cctkGH->cctk_lsh[3], \ + cctki3_cctkGH->cctk_ash[0], \ + cctki3_cctkGH->cctk_ash[1], \ + cctki3_cctkGH->cctk_ash[2], \ + cctki3_cctkGH->cctk_ash[3], \ (istr)) { \ #define CCTK_ENDLOOP4STR_ALL(name) \ @@ -2526,19 +2526,19 @@ i,j,k,l, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh) \ + iash,jash,kash,lash) \ CCTK_LOOP4STR(name, \ i,j,k,l, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh, \ + iash,jash,kash,lash, \ 1) \ #define CCTK_LOOP4STR(name, \ i,j,k,l, \ imin,jmin,kmin,lmin, \ imax,jmax,kmax,lmax, \ - ilsh,jlsh,klsh,llsh, \ + iash,jash,kash,lash, \ istr) \ && name/**/_imin = imin \ && name/**/_jmin = jmin \ @@ -2585,8 +2585,8 @@ CCTK_LOOP4STR(name, \ i,j,k,l, \ 1,1,1,1, \ - CCTK_LSSH(0,1),CCTK_LSSH(0,2),CCTK_LSSH(0,3),CCTK_LSSH(0,4), \ cctk_lsh(1),cctk_lsh(2),cctk_lsh(3),cctk_lsh(4), \ + cctk_ash(1),cctk_ash(2),cctk_ash(3),cctk_ash(4), \ istr) \ #define CCTK_ENDLOOP4_ALL(name) \ @@ -2623,11 +2623,11 @@ CCTK_LOOP4STR(name, \ i,j,k,l, \ (iblo),(jblo),(kblo),(lblo), \ - CCTK_LSSH(0,1)-(ibhi), \ - CCTK_LSSH(0,2)-(jbhi), \ - CCTK_LSSH(0,3)-(kbhi), \ - CCTK_LSSH(0,4)-(lbhi), \ - cctk_lsh(1),cctk_lsh(2),cctk_lsh(3),cctk_lsh(4), \ + cctk_lsh(1)-(ibhi), \ + cctk_lsh(2)-(jbhi), \ + cctk_lsh(3)-(kbhi), \ + cctk_lsh(4)-(lbhi), \ + cctk_ash(1),cctk_ash(2),cctk_ash(3),cctk_ash(4), \ istr) \ #define CCTK_ENDLOOP4_INTERIOR(name) \ @@ -2673,7 +2673,7 @@ && do lc_face=1,2 \ && do lc_d=1,4 \ && lc_bmin(lc_d) = 1 \ - && lc_bmax(lc_d) = CCTK_LSSH(0,lc_d) \ + && lc_bmax(lc_d) = cctk_lsh(lc_d) \ && if (lc_d<lc_dir) then \ && lc_bmin(lc_d) = lc_bmin(lc_d)+lc_blo(lc_d) \ && lc_bmax(lc_d) = lc_bmax(lc_d)-lc_bhi(lc_d) \ @@ -2688,7 +2688,7 @@ i,j,k,l, \ lc_bmin(1),lc_bmin(2),lc_bmin(3),lc_bmin(4), \ lc_bmax(1),lc_bmax(2),lc_bmax(3),lc_bmax(4), \ - cctk_lsh(1),cctk_lsh(2),cctk_lsh(3),cctk_lsh(4), \ + cctk_ash(1),cctk_ash(2),cctk_ash(3),cctk_ash(4), \ lc_istr) \ #define CCTK_ENDLOOP4_BOUNDARIES(name) \ diff --git a/src/include/cctk_Loop.h.pl b/src/include/cctk_Loop.h.pl index 3a03272f..fa8e7df8 100755 --- a/src/include/cctk_Loop.h.pl +++ b/src/include/cctk_Loop.h.pl @@ -202,14 +202,14 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '[C]dir').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').')'), + (bsnl ' '.(crpt '[C]ash').')'), (bsnl ' CCTK_LOOP[DIM]STR_NORMAL(name,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt 'n[C]').','), (bsnl ' '.(crpt '([C]dir)').','), (bsnl ' '.(crpt '([C]min)').','), (bsnl ' '.(crpt '([C]max)').','), - (bsnl ' '.(crpt '([C]lsh)').','), + (bsnl ' '.(crpt '([C]ash)').','), (bsnl ' 1)'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]_NORMAL(name)'), @@ -221,7 +221,7 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '[C]dir').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').','), + (bsnl ' '.(crpt '[C]ash').','), (bsnl ' istr)'), (bsnl ' do {'), (bsnl ' typedef int cctki0_loop[DIM]_normal_##name;'), @@ -247,12 +247,12 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').')'), + (bsnl ' '.(crpt '[C]ash').')'), (bsnl ' CCTK_LOOP[DIM]STR(name,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '([C]min)').','), (bsnl ' '.(crpt '([C]max)').','), - (bsnl ' '.(crpt '([C]lsh)').','), + (bsnl ' '.(crpt '([C]ash)').','), (bsnl ' 1)'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM](name)'), @@ -262,7 +262,7 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').','), + (bsnl ' '.(crpt '[C]ash').','), (bsnl ' istr)'), (bsnl ' CCTK_LOOP[DIM]STR_NORMAL(name,'), (bsnl ' '.(crpt '[C]').','), @@ -270,7 +270,7 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '0').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').','), + (bsnl ' '.(crpt '[C]ash').','), (bsnl ' istr)'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]STR(name)'), @@ -309,8 +309,8 @@ for $dim (1,2,3,4) { (bsnl ' CCTK_LOOP[DIM]STR(name##_interior,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '([C]blo)').','), - (rpt (bsnl ' cctki2_cctkGH->CCTK_LSSH(0,[I])-([C]bhi),')), - (rpt (bsnl ' cctki2_cctkGH->cctk_lsh[[I]],')), + (rpt (bsnl ' cctki2_cctkGH->cctk_lsh[[I]]-([C]bhi),')), + (rpt (bsnl ' cctki2_cctkGH->cctk_ash[[I]],')), (bsnl ' (istr)) {'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]STR_INTERIOR(name)'), @@ -360,7 +360,7 @@ for $dim (1,2,3,4) { (bsnl ' int const cctki2_blo[] = { '.(crpt '([C]blo)').' };'), (bsnl ' int const cctki2_bhi[] = { '.(crpt '([C]bhi)').' };'), (bsnl ' int const cctki2_bbox[] = { '.(crpt '([C]bboxlo), ([C]bboxhi)').' };'), - (bsnl ' int const cctki2_lssh[] = { '.(crpt 'cctki2_cctkGH->CCTK_LSSH(0,[I])').' };'), + (bsnl ' int const cctki2_lsh[] = { '.(crpt 'cctki2_cctkGH->cctk_lsh[[I]]').' };'), (bsnl ' int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr);'), (bsnl ' /* Loop over all faces, edges, and corners */'), (reverse (rpt (bsnl ' for (int cctki2_[C]dir=-1; cctki2_[C]dir<=+1; ++cctki2_[C]dir) {'))), @@ -368,10 +368,10 @@ for $dim (1,2,3,4) { (bsnlsep [rpt ' (cctki2_[C]dir==-1 ? cctki2_bbox[[2*I]] : 0) || (cctki2_[C]dir==+1 ? cctki2_bbox[[2*I+1]] : 0)'], '||', ';'), (bsnl ' if (cctki2_any_bbox) {'), (bsnl ' int const cctki2_bmin[] = {'), - (rpt (bsnl ' cctki2_[C]dir==-1 ? 0 : cctki2_[C]dir==0 ? cctki2_blo[[I]] : cctki2_lssh[[I]] - cctki2_bhi[[I]],')), + (rpt (bsnl ' cctki2_[C]dir==-1 ? 0 : cctki2_[C]dir==0 ? cctki2_blo[[I]] : cctki2_lsh[[I]] - cctki2_bhi[[I]],')), (bsnl ' };'), (bsnl ' int const cctki2_bmax[] = {'), - (rpt (bsnl ' cctki2_[C]dir==-1 ? cctki2_blo[[I]] : cctki2_[C]dir==0 ? cctki2_lssh[[I]] - cctki2_bhi[[I]] : cctki2_lssh[[I]],')), + (rpt (bsnl ' cctki2_[C]dir==-1 ? cctki2_blo[[I]] : cctki2_[C]dir==0 ? cctki2_lsh[[I]] - cctki2_bhi[[I]] : cctki2_lsh[[I]],')), (bsnl ' };'), (bsnl ' CCTK_LOOP[DIM]STR_NORMAL(name##_boundaries,'), (bsnl ' '.(crpt '[C]').','), @@ -379,7 +379,7 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt 'cctki2_[C]dir').','), (bsnl ' '.(crpt 'cctki2_bmin[[I]]').','), (bsnl ' '.(crpt 'cctki2_bmax[[I]]').','), - (rpt (bsnl ' cctki2_cctkGH->cctk_lsh[[I]],')), + (rpt (bsnl ' cctki2_cctkGH->cctk_ash[[I]],')), (bsnl ' cctki2_istr1) {'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]STR_BOUNDARIES(name)'), @@ -431,7 +431,7 @@ for $dim (1,2,3,4) { (bsnl ' int const cctki2_blo[] = { '.(crpt '([C]blo)').' };'), (bsnl ' int const cctki2_bhi[] = { '.(crpt '([C]bhi)').' };'), (bsnl ' int const cctki2_bbox[] = { '.(crpt '([C]bboxlo), ([C]bboxhi)').' };'), - (bsnl ' int const cctki2_lssh[] = { '.(crpt 'cctki2_cctkGH->CCTK_LSSH(0,[I])').' };'), + (bsnl ' int const cctki2_lsh[] = { '.(crpt 'cctki2_cctkGH->cctk_lsh[[I]]').' };'), (bsnl ' int const cctki2_istr1 CCTK_ATTRIBUTE_UNUSED = (istr);'), (bsnl ' /* Loop over all faces, edges, and corners */'), (reverse (rpt (bsnl ' for (int cctki2_[C]dir=-1; cctki2_[C]dir<=+1; ++cctki2_[C]dir) {'))), @@ -441,10 +441,10 @@ for $dim (1,2,3,4) { (bsnlsep [rpt ' (cctki2_[C]dir==-1 ? cctki2_bbox[[2*I]] : 1) && (cctki2_[C]dir==+1 ? cctki2_bbox[[2*I+1]] : 1)'], '&&', ';'), (bsnl ' if (cctki2_all_bbox && cctki2_any_bbox) {'), (bsnl ' int const cctki2_bmin[] = {'), - (rpt (bsnl ' cctki2_[C]dir==-1 ? 0 : cctki2_[C]dir==0 ? cctki2_blo[[I]] : cctki2_lssh[[I]] - cctki2_bhi[[I]],')), + (rpt (bsnl ' cctki2_[C]dir==-1 ? 0 : cctki2_[C]dir==0 ? cctki2_blo[[I]] : cctki2_lsh[[I]] - cctki2_bhi[[I]],')), (bsnl ' };'), (bsnl ' int const cctki2_bmax[] = {'), - (rpt (bsnl ' cctki2_[C]dir==-1 ? cctki2_blo[[I]] : cctki2_[C]dir==0 ? cctki2_lssh[[I]] - cctki2_bhi[[I]] : cctki2_lssh[[I]],')), + (rpt (bsnl ' cctki2_[C]dir==-1 ? cctki2_blo[[I]] : cctki2_[C]dir==0 ? cctki2_lsh[[I]] - cctki2_bhi[[I]] : cctki2_lsh[[I]],')), (bsnl ' };'), (bsnl ' CCTK_LOOP[DIM]STR_NORMAL(name##_intboundaries,'), (bsnl ' '.(crpt '[C]').','), @@ -452,7 +452,7 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt 'cctki2_[C]dir').','), (bsnl ' '.(crpt 'cctki2_bmin[[I]]').','), (bsnl ' '.(crpt 'cctki2_bmax[[I]]').','), - (rpt (bsnl ' cctki2_cctkGH->cctk_lsh[[I]],')), + (rpt (bsnl ' cctki2_cctkGH->cctk_ash[[I]],')), (bsnl ' cctki2_istr1) {'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]STR_INTBOUNDARIES(name)'), @@ -489,8 +489,8 @@ for $dim (1,2,3,4) { (bsnl ' CCTK_LOOP[DIM]STR(name##_all,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '0').','), - (rpt (bsnl ' cctki3_cctkGH->CCTK_LSSH(0,[I]),')), (rpt (bsnl ' cctki3_cctkGH->cctk_lsh[[I]],')), + (rpt (bsnl ' cctki3_cctkGH->cctk_ash[[I]],')), (bsnl ' (istr)) {'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]STR_ALL(name)'), @@ -658,19 +658,19 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').')'), + (bsnl ' '.(crpt '[C]ash').')'), (bsnl ' CCTK_LOOP[DIM]STR(name,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').','), + (bsnl ' '.(crpt '[C]ash').','), (bsnl ' 1)'), (nl ''), (bsnl '#define CCTK_LOOP[DIM]STR(name,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '[C]min').','), (bsnl ' '.(crpt '[C]max').','), - (bsnl ' '.(crpt '[C]lsh').','), + (bsnl ' '.(crpt '[C]ash').','), (bsnl ' istr)'), (rpt (bsnl ' && name/**/_[C]min = [C]min')), (rpt (bsnl ' && name/**/_[C]max = [C]max')), @@ -705,8 +705,8 @@ for $dim (1,2,3,4) { (bsnl ' CCTK_LOOP[DIM]STR(name,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '1').','), - (bsnl ' '.(crpt 'CCTK_LSSH(0,[I+1])').','), (bsnl ' '.(crpt 'cctk_lsh([I+1])').','), + (bsnl ' '.(crpt 'cctk_ash([I+1])').','), (bsnl ' istr)'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]_ALL(name)'), @@ -743,8 +743,8 @@ for $dim (1,2,3,4) { (bsnl ' CCTK_LOOP[DIM]STR(name,'), (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt '([C]blo)').','), - (rpt (bsnl ' CCTK_LSSH(0,[I+1])-([C]bhi),')), - (bsnl ' '.(crpt 'cctk_lsh([I+1])').','), + (rpt (bsnl ' cctk_lsh([I+1])-([C]bhi),')), + (bsnl ' '.(crpt 'cctk_ash([I+1])').','), (bsnl ' istr)'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]_INTERIOR(name)'), @@ -790,7 +790,7 @@ for $dim (1,2,3,4) { (bsnl ' && do lc_face=1,2'), (bsnl ' && do lc_d=1,[DIM]'), (bsnl ' && lc_bmin(lc_d) = 1'), - (bsnl ' && lc_bmax(lc_d) = CCTK_LSSH(0,lc_d)'), + (bsnl ' && lc_bmax(lc_d) = cctk_lsh(lc_d)'), (bsnl ' && if (lc_d<lc_dir) then'), (bsnl ' && lc_bmin(lc_d) = lc_bmin(lc_d)+lc_blo(lc_d)'), (bsnl ' && lc_bmax(lc_d) = lc_bmax(lc_d)-lc_bhi(lc_d)'), @@ -805,7 +805,7 @@ for $dim (1,2,3,4) { (bsnl ' '.(crpt '[C]').','), (bsnl ' '.(crpt 'lc_bmin([I+1])').','), (bsnl ' '.(crpt 'lc_bmax([I+1])').','), - (bsnl ' '.(crpt 'cctk_lsh([I+1])').','), + (bsnl ' '.(crpt 'cctk_ash([I+1])').','), (bsnl ' lc_istr)'), (nl ''), (bsnl '#define CCTK_ENDLOOP[DIM]_BOUNDARIES(name)'), diff --git a/src/include/cctk_Stagger.h b/src/include/cctk_Stagger.h deleted file mode 100644 index 9dc29604..00000000 --- a/src/include/cctk_Stagger.h +++ /dev/null @@ -1,35 +0,0 @@ - /*@@ - @header cctk_Stagger.h - @date Thu Jan 20 2000 - @author Gerd Lanfermann - @desc - Prototypes and constants for stagger functions. - @enddesc - @version $Header$ - @@*/ - -#ifndef _CCTK_STAGGER_H_ -#define _CCTK_STAGGER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -int CCTK_GroupStaggerIndexGI(int gindex); -int CCTK_GroupStaggerIndexGN(const char *gname); -int CCTK_StaggerIndex(const char *stype); -int CCTK_StaggerDirIndex(int dir, int sc); -int CCTK_StaggerDirArray(int *dindex , int dim, int sindex) ; -int CCTK_GroupStaggerDirArrayGI(int *dindex, int dim, int gi); -int CCTK_StaggerDirName(int dir, const char *stype); - -int CCTKi_ParseStaggerString(int dim, - const char *imp, - const char *gname, - const char *stype); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/include/cctk_core.h b/src/include/cctk_core.h index 340172f1..16709e30 100644 --- a/src/include/cctk_core.h +++ b/src/include/cctk_core.h @@ -31,11 +31,11 @@ print '("--------------------------------------------------------------------------------")' #define _CCTK_FARGUMENTS \ -cctk_dim,cctk_gsh,cctk_lsh,cctk_lbnd,cctk_ubnd,cctk_lssh,cctk_from,cctk_to,\ +cctk_dim,cctk_gsh,cctk_lsh,cctk_lbnd,cctk_ubnd,cctk_ash,cctk_from,cctk_to,\ cctk_bbox,cctk_delta_time,cctk_time,cctk_delta_space,cctk_origin_space,\ cctk_levfac,cctk_levoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,\ cctk_convfac,cctk_nghostzones,cctk_iteration,cctkGH,\ -cctk_lsh1,cctk_lsh2,cctk_lsh3 +cctk_ash1,cctk_ash2,cctk_ash3 #define _DECLARE_CCTK_ARGUMENTS _DECLARE_CCTK_FARGUMENTS #define _DECLARE_CCTK_FARGUMENTS &&\ @@ -44,7 +44,7 @@ cctk_lsh1,cctk_lsh2,cctk_lsh3 CCTK_DECLARE(INTEGER,cctk_lsh,(cctk_dim))&&\ CCTK_DECLARE(INTEGER,cctk_lbnd,(cctk_dim))&&\ CCTK_DECLARE(INTEGER,cctk_ubnd,(cctk_dim))&&\ - CCTK_DECLARE(INTEGER,cctk_lssh,(CCTK_NSTAGGER*cctk_dim))&&\ + CCTK_DECLARE(INTEGER,cctk_ash,(cctk_dim))&&\ CCTK_DECLARE(INTEGER,cctk_from,(cctk_dim))&&\ CCTK_DECLARE(INTEGER,cctk_to,(cctk_dim))&&\ CCTK_DECLARE(INTEGER,cctk_bbox,(2*cctk_dim))&&\ @@ -61,9 +61,9 @@ cctk_lsh1,cctk_lsh2,cctk_lsh3 CCTK_DECLARE(INTEGER,cctk_nghostzones,(cctk_dim))&&\ CCTK_DECLARE(INTEGER,cctk_iteration,)&&\ CCTK_DECLARE(CCTK_POINTER,cctkGH,)&&\ - CCTK_DECLARE(INTEGER,cctk_lsh1,)&&\ - CCTK_DECLARE(INTEGER,cctk_lsh2,)&&\ - CCTK_DECLARE(INTEGER,cctk_lsh3,)&& + CCTK_DECLARE(INTEGER,cctk_ash1,)&&\ + CCTK_DECLARE(INTEGER,cctk_ash2,)&&\ + CCTK_DECLARE(INTEGER,cctk_ash3,)&& #define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FORTRANFILE__,CCTK_THORNSTRING,b) @@ -79,10 +79,6 @@ cctk_lsh1,cctk_lsh2,cctk_lsh3 #define CCTK_ORIGIN_SPACE(x) (cctk_origin_space(x)+cctk_delta_space(x)/cctk_levfac(x)*cctk_levoff(x)/cctk_levoffdenom(x)) #define CCTK_DELTA_SPACE(x) (cctk_delta_space(x)/cctk_levfac(x)) #define CCTK_DELTA_TIME (cctk_delta_time/cctk_timefac) -/* The "stagger index" stag is zero-based (0,1,...), the direction dim - is one-based in Fortran (1,2,3,...) */ -#define CCTK_LSSH(stag,dim) cctk_lssh(CCTK_LSSH_IDX(stag,dim)) -#define CCTK_LSSH_IDX(stag,dim) (1+(stag)+CCTK_NSTAGGER*((dim)-1)) #ifdef F90CODE @@ -156,7 +152,6 @@ cctk_lsh1,cctk_lsh2,cctk_lsh3 #include "cctk_Misc.h" #include "cctk_Parameter.h" #include "cctk_Reduction.h" -#include "cctk_Stagger.h" #include "cctk_Sync.h" #include "cctk_Timers.h" #include "cctk_Termination.h" @@ -211,22 +206,22 @@ static inline int CCTK_GFINDEX1D (const cGH *restrict cctkGH, static inline int CCTK_GFINDEX2D (const cGH *restrict cctkGH, int i, int j) { - return i + cctkGH->cctk_lsh[0] * j; + return i + cctkGH->cctk_ash[0] * j; } static inline int CCTK_GFINDEX3D (const cGH *restrict cctkGH, int i, int j, int k) { - return (i + cctkGH->cctk_lsh[0] * - (j + cctkGH->cctk_lsh[1] * k)); + return (i + cctkGH->cctk_ash[0] * + (j + cctkGH->cctk_ash[1] * k)); } static inline int CCTK_GFINDEX4D (const cGH *restrict cctkGH, int i, int j, int k, int l) { - return (i + cctkGH->cctk_lsh[0] * - (j + cctkGH->cctk_lsh[1] * - (k + cctkGH->cctk_lsh[2] * l))); + return (i + cctkGH->cctk_ash[0] * + (j + cctkGH->cctk_ash[1] * + (k + cctkGH->cctk_ash[2] * l))); } static inline int CCTK_VECTGFINDEX0D (const cGH *restrict cctkGH, @@ -238,31 +233,31 @@ static inline int CCTK_VECTGFINDEX0D (const cGH *restrict cctkGH, static inline int CCTK_VECTGFINDEX1D (const cGH *restrict cctkGH, int i, int n) { - return i + cctkGH->cctk_lsh[0] * n; + return i + cctkGH->cctk_ash[0] * n; } static inline int CCTK_VECTGFINDEX2D (const cGH *restrict cctkGH, int i, int j, int n) { - return (i + cctkGH->cctk_lsh[0] * - (j + cctkGH->cctk_lsh[1] * n)); + return (i + cctkGH->cctk_ash[0] * + (j + cctkGH->cctk_ash[1] * n)); } static inline int CCTK_VECTGFINDEX3D (const cGH *restrict cctkGH, int i, int j, int k, int n) { - return (i + cctkGH->cctk_lsh[0] * - (j + cctkGH->cctk_lsh[1] * - (k + cctkGH->cctk_lsh[2] * n))); + return (i + cctkGH->cctk_ash[0] * + (j + cctkGH->cctk_ash[1] * + (k + cctkGH->cctk_ash[2] * n))); } static inline int CCTK_VECTGFINDEX4D (const cGH *restrict cctkGH, int i, int j, int k, int l, int n) { - return (i + cctkGH->cctk_lsh[0] * - (j + cctkGH->cctk_lsh[1] * - (k + cctkGH->cctk_lsh[2] * - (l + cctkGH->cctk_lsh[3] * n)))); + return (i + cctkGH->cctk_ash[0] * + (j + cctkGH->cctk_ash[1] * + (k + cctkGH->cctk_ash[2] * + (l + cctkGH->cctk_ash[3] * n)))); } #endif @@ -281,7 +276,7 @@ static inline int CCTK_VECTGFINDEX4D (const cGH *restrict cctkGH, CCTK_DECLARE_INIT(int const *restrict const,cctk_lsh,cctkGH->cctk_lsh);\ CCTK_DECLARE_INIT(int const *restrict const,cctk_lbnd,cctkGH->cctk_lbnd);\ CCTK_DECLARE_INIT(int const *restrict const,cctk_ubnd,cctkGH->cctk_ubnd);\ - CCTK_DECLARE_INIT(int const *restrict const,cctk_lssh,cctkGH->cctk_lssh);\ + CCTK_DECLARE_INIT(int const *restrict const,cctk_ash,cctkGH->cctk_ash);\ CCTK_DECLARE_INIT(int const *restrict const,cctk_from,cctkGH->cctk_from);\ CCTK_DECLARE_INIT(int const *restrict const,cctk_to,cctkGH->cctk_to);\ CCTK_DECLARE_INIT(int const *restrict const,cctk_bbox,cctkGH->cctk_bbox);\ @@ -303,7 +298,7 @@ static inline int CCTK_VECTGFINDEX4D (const cGH *restrict cctkGH, #define _PASS_CCTK_C2F(xGH) &((xGH)->cctk_dim),\ (xGH)->cctk_gsh,(xGH)->cctk_lsh,\ (xGH)->cctk_lbnd,(xGH)->cctk_ubnd,\ - (xGH)->cctk_lssh,\ + (xGH)->cctk_ash,\ (xGH)->cctk_from,(xGH)->cctk_to,\ (xGH)->cctk_bbox,\ &((xGH)->cctk_delta_time), &((xGH)->cctk_time),\ @@ -317,9 +312,9 @@ static inline int CCTK_VECTGFINDEX4D (const cGH *restrict cctkGH, (xGH)->cctk_nghostzones,\ &((xGH)->cctk_iteration),\ &(xGH),\ - &(xGH)->cctk_lsh[0],\ - &(xGH)->cctk_lsh[1],\ - &(xGH)->cctk_lsh[2] + &(xGH)->cctk_ash[0],\ + &(xGH)->cctk_ash[1],\ + &(xGH)->cctk_ash[2] #define _CCTK_C2F_PROTO int const *,\ int const *, int const *,\ int const *, int const *,\ @@ -348,10 +343,6 @@ static inline int CCTK_VECTGFINDEX4D (const cGH *restrict cctkGH, #define CCTK_ORIGIN_SPACE(x) (cctk_origin_space[x]+cctk_delta_space[x]/cctk_levfac[x]*cctk_levoff[x]/cctk_levoffdenom[x]) #define CCTK_DELTA_SPACE(x) (cctk_delta_space[x]/cctk_levfac[x]) #define CCTK_DELTA_TIME (cctk_delta_time/cctk_timefac) -/* The "stagger index" stag is zero-based (0,1,...), the direction dim - is zero-based in C (0,1,2,...) */ -#define CCTK_LSSH(stag,dim) cctk_lssh[CCTK_LSSH_IDX(stag,dim)] -#define CCTK_LSSH_IDX(stag,dim) ((stag)+CCTK_NSTAGGER*(dim)) #define CCTK_WARN(a,b) CCTK_Warn(a,__LINE__,__FILE__,CCTK_THORNSTRING,b) diff --git a/src/include/cctki_Groups.h b/src/include/cctki_Groups.h index a4b7d34b..ce6724cf 100644 --- a/src/include/cctki_Groups.h +++ b/src/include/cctki_Groups.h @@ -27,7 +27,6 @@ int CCTKi_CreateGroup(const char *gname, const char *gscope, int dimension, int ntimelevels, - const char *stype, const char *dtype, const char *size, const char *ghostsize, diff --git a/src/include/cctki_Stagger.h b/src/include/cctki_Stagger.h deleted file mode 100644 index 3c98e5bc..00000000 --- a/src/include/cctki_Stagger.h +++ /dev/null @@ -1,79 +0,0 @@ - /*@@ - @header cctki_Stagger.h - @date Thu Jan 20 2000 - @author Gerd Lanfermann - @desc - Prototypes and constants for stagger functions. - @enddesc - @version $Header$ - @@*/ - -#ifndef _CCTKI_STAGGER_H_ -#define _CCTKI_STAGGER_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -int CCTKi_ParseStaggerString(int dim, - const char *imp, - const char *gname, - const char *stype); - -#ifdef __cplusplus -} -#endif - -/* number of implemented staggerings */ -#define CCTK_NUM_STAGGER 3 - -/* number of staggerings (3); stagger flags: yes/no, */ -#define CCTK_NSTAG 3 -#define CCTK_NO_STAGGER 0 -#define CCTK_STAGGER 1 - -/* stagger code in one direction */ -#define CCTK_STAG_M 0 -#define CCTK_STAG_C 1 -#define CCTK_STAG_P 2 - -/* stagger code of three directions */ -#define CCTK_STAG_MMM 0 -#define CCTK_STAG_CMM 1 -#define CCTK_STAG_PMM 2 - -#define CCTK_STAG_MCM 3 -#define CCTK_STAG_CCM 4 -#define CCTK_STAG_PCM 5 - -#define CCTK_STAG_MPM 6 -#define CCTK_STAG_CPM 7 -#define CCTK_STAG_PPM 8 - -#define CCTK_STAG_MMC 9 -#define CCTK_STAG_CMC 10 -#define CCTK_STAG_PMC 11 - -#define CCTK_STAG_MCC 12 -#define CCTK_STAG_CCC 13 -#define CCTK_STAG_PCC 14 - -#define CCTK_STAG_MPC 15 -#define CCTK_STAG_CPC 16 -#define CCTK_STAG_PPC 17 - -#define CCTK_STAG_MMP 18 -#define CCTK_STAG_CMP 19 -#define CCTK_STAG_PMP 20 - -#define CCTK_STAG_MCP 21 -#define CCTK_STAG_CCP 22 -#define CCTK_STAG_PCP 23 - -#define CCTK_STAG_MPP 24 -#define CCTK_STAG_CPP 25 -#define CCTK_STAG_PPP 26 - - -#endif /* _CCTKI_STAGGER_H_ */ |