summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-07-04 01:25:29 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2012-07-04 01:25:29 +0000
commit5890fa36427bdea8efe70079e3cd1e5612312e77 (patch)
tree47d730568fc835f8f37d54728de142c767699f3d /src
parentd9fda6d54df1e6de28a99e812e6c5769e4d9be4a (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')
-rw-r--r--src/comm/CactusDefaultComm.c4
-rw-r--r--src/include/cGH.h4
-rw-r--r--src/include/cctk_Constants.h3
-rw-r--r--src/include/cctk_Groups.h3
-rw-r--r--src/include/cctk_GroupsOnGH.h11
-rw-r--r--src/include/cctk_Loop.h328
-rwxr-xr-xsrc/include/cctk_Loop.h.pl52
-rw-r--r--src/include/cctk_Stagger.h35
-rw-r--r--src/include/cctk_core.h63
-rw-r--r--src/include/cctki_Groups.h1
-rw-r--r--src/include/cctki_Stagger.h79
-rw-r--r--src/main/DebugDefines.c16
-rw-r--r--src/main/Groups.c47
-rw-r--r--src/main/GroupsOnGH.c102
-rw-r--r--src/main/Stagger.c440
-rw-r--r--src/main/make.code.defn1
16 files changed, 290 insertions, 899 deletions
diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c
index 1cbc82e3..b3d341c9 100644
--- a/src/comm/CactusDefaultComm.c
+++ b/src/comm/CactusDefaultComm.c
@@ -171,7 +171,7 @@ cGH *CactusDefaultSetupGH(tFleshConfig *config, int convergence_level)
thisGH->cctk_lbnd = malloc(cctk_dim*sizeof(int));
thisGH->cctk_ubnd = malloc(cctk_dim*sizeof(int));
- thisGH->cctk_lssh = malloc(CCTK_NSTAGGER*cctk_dim*sizeof(int));
+ thisGH->cctk_ash = malloc(cctk_dim*sizeof(int));
thisGH->cctk_to = malloc(cctk_dim*sizeof(int));
thisGH->cctk_from = malloc(cctk_dim*sizeof(int));
thisGH->cctk_bbox = malloc(2*cctk_dim*sizeof(int));
@@ -221,7 +221,7 @@ cGH *CactusDefaultSetupGH(tFleshConfig *config, int convergence_level)
thisGH->cctk_lsh &&
thisGH->cctk_lbnd &&
thisGH->cctk_ubnd &&
- thisGH->cctk_lssh &&
+ thisGH->cctk_ash &&
thisGH->cctk_from &&
thisGH->cctk_to &&
thisGH->cctk_bbox &&
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_ */
diff --git a/src/main/DebugDefines.c b/src/main/DebugDefines.c
index bc7a68eb..b7a1ea9c 100644
--- a/src/main/DebugDefines.c
+++ b/src/main/DebugDefines.c
@@ -79,7 +79,7 @@ int CCTK_GFIndex2D (const cGH *GH, int i, int j)
i, j, GH->cctk_lsh[0], GH->cctk_lsh[1]);
}
#endif
- return (i + GH->cctk_lsh[0]*j);
+ return (i + GH->cctk_ash[0]*j);
}
int CCTK_GFIndex3D (const cGH *GH, int i, int j, int k)
@@ -95,7 +95,7 @@ int CCTK_GFIndex3D (const cGH *GH, int i, int j, int k)
i, j, k, GH->cctk_lsh[0], GH->cctk_lsh[1], GH->cctk_lsh[2]);
}
#endif
- return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*k));
+ return (i + GH->cctk_ash[0]*(j + GH->cctk_ash[1]*k));
}
int CCTK_GFIndex4D (const cGH *GH, int i, int j, int k, int l)
@@ -112,7 +112,7 @@ int CCTK_GFIndex4D (const cGH *GH, int i, int j, int k, int l)
i, j, k, l, GH->cctk_lsh[0], GH->cctk_lsh[1], GH->cctk_lsh[2], GH->cctk_lsh[3]);
}
#endif
- return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2] * l)));
+ return (i + GH->cctk_ash[0]*(j + GH->cctk_ash[1]*(k + GH->cctk_ash[2] * l)));
}
int CCTK_VectGFIndex0D (const cGH *GH, int n)
@@ -147,7 +147,7 @@ int CCTK_VectGFIndex1D (const cGH *GH, int i, int n)
n);
}
#endif
- return (i + GH->cctk_lsh[0]*n);
+ return (i + GH->cctk_ash[0]*n);
}
int CCTK_VectGFIndex2D (const cGH *GH, int i, int j, int n)
@@ -169,7 +169,7 @@ int CCTK_VectGFIndex2D (const cGH *GH, int i, int j, int n)
n);
}
#endif
- return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*n));
+ return (i + GH->cctk_ash[0]*(j + GH->cctk_ash[1]*n));
}
int CCTK_VectGFIndex3D (const cGH *GH, int i, int j, int k, int n)
@@ -192,7 +192,7 @@ int CCTK_VectGFIndex3D (const cGH *GH, int i, int j, int k, int n)
n);
}
#endif
- return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2]*n)));
+ return (i + GH->cctk_ash[0]*(j + GH->cctk_ash[1]*(k + GH->cctk_ash[2]*n)));
}
int CCTK_VectGFIndex4D (const cGH *GH, int i, int j, int k, int l, int n)
@@ -216,6 +216,6 @@ int CCTK_VectGFIndex4D (const cGH *GH, int i, int j, int k, int l, int n)
n);
}
#endif
- return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2]*
- (l + GH->cctk_lsh[3]*n))));
+ return (i + GH->cctk_ash[0]*(j + GH->cctk_ash[1]*(k + GH->cctk_ash[2]*
+ (l + GH->cctk_ash[3]*n))));
}
diff --git a/src/main/Groups.c b/src/main/Groups.c
index cf501a53..6716692f 100644
--- a/src/main/Groups.c
+++ b/src/main/Groups.c
@@ -24,7 +24,6 @@
#include "cctk_Types.h"
#include "cctk_ActiveThorns.h"
-#include "cctki_Stagger.h"
#include "cctki_Groups.h"
#include "util_Expression.h"
@@ -159,8 +158,7 @@ typedef struct
/* The types. */
int gtype,
vtype,
- dtype,
- staggertype;
+ dtype;
int gscope;
@@ -209,15 +207,12 @@ static int *group_of_variable = NULL;
static int maxdim = 0;
static int gfdim = 0;
-static int staggered = 0;
-
/********************************************************************
******************** Internal Routines ************************
********************************************************************/
static cGroupDefinition *CCTKi_SetupGroup (const char *implementation,
const char *name,
- int staggercode,
int n_variables,
int vectorlength);
static CCTK_INT **CCTKi_ExtractSize (int dimension,
@@ -227,24 +222,6 @@ static CCTK_INT **CCTKi_ExtractSize (int dimension,
static int CCTKi_ParamExpressionToInt(const char *expression, const char *thorn);
- /*@@
- @routine CCTK_StaggerVars
- @date
- @author Gerd Lanfermann
- @desc
- Checks if staggered group(s) exist
- @enddesc
-
- @returntype int
- @returndesc
- 0 if no staggered group exists, non-zero otherwise
- @endreturndesc
-@@*/
-int CCTK_StaggerVars (void)
-{
- return (staggered);
-}
-
/*@@
@routine CCTK_GroupIndex
@@ -1119,7 +1096,6 @@ int CCTK_GroupData (int group, cGroup *gp)
gp->numvars = groups[group].n_variables;
gp->vectorlength = groups[group].vectorlength;
gp->numtimelevels = groups[group].n_timelevels;
- gp->stagtype = groups[group].staggertype;
gp->tagstable = groups[group].tags_table;
if(groups[group].vararraysize)
@@ -2340,11 +2316,10 @@ void CCTKi_PrintGroupInfo (void)
for (group_num = 0; group_num < n_groups; group_num++)
{
- printf ("GROUP INFO: GrpNo./imp_name/name/stag %d >%s< >%s< %d\n",
+ printf ("GROUP INFO: GrpNo./imp_name/name %d >%s< >%s<\n",
group_num,
groups[group_num].implementation,
- groups[group_num].name,
- groups[group_num].staggertype);
+ groups[group_num].name);
}
}
#endif
@@ -2371,7 +2346,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,
@@ -2383,7 +2357,6 @@ int CCTKi_CreateGroup (const char *gname,
{
int retval;
int groupscope;
- int staggercode;
int variable;
int vectorlength;
@@ -2404,9 +2377,6 @@ int CCTKi_CreateGroup (const char *gname,
va_start (ap, n_basevars);
- /* get the staggercode */
- staggercode = CCTKi_ParseStaggerString (dimension, imp, gname, stype);
-
if (vararraysize)
{
vararraysize = Util_Strdup(vararraysize);
@@ -2426,12 +2396,12 @@ int CCTKi_CreateGroup (const char *gname,
groupscope = CCTK_GroupScopeNumber (gscope);
if (groupscope == CCTK_PUBLIC || groupscope == CCTK_PROTECTED)
{
- group = CCTKi_SetupGroup (imp, gname, staggercode,
+ group = CCTKi_SetupGroup (imp, gname,
n_basevars * vectorlength, vectorlength);
}
else if (groupscope == CCTK_PRIVATE)
{
- group = CCTKi_SetupGroup (thorn, gname, staggercode,
+ group = CCTKi_SetupGroup (thorn, gname,
n_basevars * vectorlength, vectorlength);
}
else
@@ -2447,7 +2417,6 @@ int CCTKi_CreateGroup (const char *gname,
group->gtype = CCTK_GroupTypeNumber (gtype);
group->vtype = CCTK_VarTypeNumber (vtype);
group->gscope = groupscope;
- group->staggertype = staggercode;
group->dtype = CCTK_GroupDistribNumber (dtype);
group->n_timelevels = ntimelevels;
group->tags_string = Util_Strdup(tags);
@@ -2491,10 +2460,6 @@ int CCTKi_CreateGroup (const char *gname,
{
maxdim = dimension;
}
- if (staggercode > 0)
- {
- staggered = 1;
- }
group->size = CCTKi_ExtractSize (dimension, thorn, size, gname);
group->ghostsize = CCTKi_ExtractSize (dimension, thorn, ghostsize, gname);
@@ -2572,7 +2537,6 @@ const char *CCTK_GroupImplementationI(int group)
@@*/
static cGroupDefinition *CCTKi_SetupGroup (const char *implementation,
const char *name,
- int staggercode,
int n_variables,
int vectorlength)
{
@@ -2625,7 +2589,6 @@ static cGroupDefinition *CCTKi_SetupGroup (const char *implementation,
strcpy (groups[n_groups].name, name);
groups[n_groups].number = n_groups;
- groups[n_groups].staggertype = staggercode;
groups[n_groups].n_variables = n_variables;
groups[n_groups].vectorlength = vectorlength;
diff --git a/src/main/GroupsOnGH.c b/src/main/GroupsOnGH.c
index 5dc3dbd1..55a4f5da 100644
--- a/src/main/GroupsOnGH.c
+++ b/src/main/GroupsOnGH.c
@@ -109,29 +109,29 @@ void CCTK_FCALL CCTK_FNAME (CCTK_GrouplshVN)
const int *dim,
int *lsh,
ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshGI)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashGI)
(int *ierr,
const cGH **cctkGH,
const int *dim,
- int *lssh,
+ int *ash,
const int *groupindex);
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshGN)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashGN)
(int *ierr,
const cGH **cctkGH,
const int *dim,
- int *lssh,
+ int *ash,
ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshVI)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashVI)
(int *ierr,
const cGH **cctkGH,
const int *dim,
- int *lssh,
+ int *ash,
const int *varindex);
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshVN)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashVN)
(int *ierr,
const cGH **cctkGH,
const int *dim,
- int *lssh,
+ int *ash,
ONE_FORTSTRING_ARG);
void CCTK_FCALL CCTK_FNAME (CCTK_GroupgshGI)
(int *ierr,
@@ -1226,21 +1226,21 @@ void CCTK_FCALL CCTK_FNAME (CCTK_GrouplshVN)
/********************************************************************
- ******************** Group local stagger shape ***************
+ ******************** Group local allocated shape *************
********************************************************************/
/*@@
- @routine CCTK_GrouplsshGI
+ @routine CCTK_GroupashGI
@date 2011-03-16
@author Erik Schnetter
@desc
- Returns the lssh for a variable group
+ Returns the ash for a variable group
@enddesc
@@*/
-int CCTK_GrouplsshGI(const cGH *cctkGH,
- int size,
- int *lssh,
- int groupindex)
+int CCTK_GroupashGI(const cGH *cctkGH,
+ int size,
+ int *ash,
+ int groupindex)
{
int retval = 0;
int ierr;
@@ -1250,144 +1250,144 @@ int CCTK_GrouplsshGI(const cGH *cctkGH,
ierr = CCTK_GroupDynamicData(cctkGH,groupindex,&data);
- if (ierr == 0 && (data.dim == 0 || data.lssh))
+ if (ierr == 0 && (data.dim == 0 || data.ash))
{
- if (CCTK_NSTAGGER*data.dim != size)
+ if (data.dim != size)
{
retval = -1;
- usesize = (CCTK_NSTAGGER*data.dim < size) ? CCTK_NSTAGGER*data.dim : size;
+ usesize = (data.dim < size) ? data.dim : size;
groupname = CCTK_GroupName (groupindex);
CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_GrouplsshGI: Incorrect size %d supplied, "
+ "CCTK_GroupashGI: Incorrect size %d supplied, "
"group '%s' has dimension %d, copying %d integers",
size,groupname,data.dim,usesize);
free (groupname);
}
- memcpy(lssh,(const int *)data.lssh,usesize*sizeof(int));
+ memcpy(ash,(const int *)data.ash,usesize*sizeof(int));
}
else
{
retval = -2;
CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_GrouplsshGI: Data not available from driver thorn");
+ "CCTK_GroupashGI: Data not available from driver thorn");
}
return retval;
}
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshGI)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashGI)
(int *ierr,
const cGH **cctkGH,
const int *size,
- int *lssh,
+ int *ash,
const int *groupindex)
{
- *ierr = CCTK_GrouplsshGI (*cctkGH, *size, lssh, *groupindex);
+ *ierr = CCTK_GroupashGI (*cctkGH, *size, ash, *groupindex);
}
-int CCTK_GrouplsshGN(const cGH *cctkGH,
- int size,
- int *lssh,
- const char *groupname)
+int CCTK_GroupashGN(const cGH *cctkGH,
+ int size,
+ int *ash,
+ const char *groupname)
{
int retval;
int gindex = CCTK_GroupIndex(groupname);
if (gindex > -1)
{
- retval = CCTK_GrouplsshGI(cctkGH,size,lssh,gindex);
+ retval = CCTK_GroupashGI(cctkGH,size,ash,gindex);
}
else
{
retval = -4;
CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_GrouplsshGN: Group index not found for %s",groupname);
+ "CCTK_GroupashGN: Group index not found for %s",groupname);
}
return retval;
}
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshGN)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashGN)
(int *ierr,
const cGH **cctkGH,
const int *size,
- int *lssh,
+ int *ash,
ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (groupname)
- *ierr = CCTK_GrouplsshGN (*cctkGH, *size, lssh, groupname);
+ *ierr = CCTK_GroupashGN (*cctkGH, *size, ash, groupname);
free (groupname);
}
-int CCTK_GrouplsshVI(const cGH *cctkGH,
- int size,
- int *lssh,
- int varindex)
+int CCTK_GroupashVI(const cGH *cctkGH,
+ int size,
+ int *ash,
+ int varindex)
{
int retval;
int gindex = CCTK_GroupIndexFromVarI(varindex);
if (gindex > -1)
{
- retval = CCTK_GrouplsshGI(cctkGH,size,lssh,gindex);
+ retval = CCTK_GroupashGI(cctkGH,size,ash,gindex);
}
else
{
retval = -4;
CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_GrouplsshVI: Group index not found for variable index %d",
+ "CCTK_GroupashVI: Group index not found for variable index %d",
varindex);
}
return retval;
}
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshVI)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashVI)
(int *ierr,
const cGH **cctkGH,
const int *size,
- int *lssh,
+ int *ash,
const int *varindex)
{
- *ierr = CCTK_GrouplsshVI (*cctkGH, *size, lssh, *varindex);
+ *ierr = CCTK_GroupashVI (*cctkGH, *size, ash, *varindex);
}
-int CCTK_GrouplsshVN(const cGH *cctkGH,
- int size,
- int *lssh,
- const char *varname)
+int CCTK_GroupashVN(const cGH *cctkGH,
+ int size,
+ int *ash,
+ const char *varname)
{
int retval;
int gindex = CCTK_GroupIndexFromVar(varname);
if (gindex > -1)
{
- retval = CCTK_GrouplsshGI(cctkGH,size,lssh,gindex);
+ retval = CCTK_GroupashGI(cctkGH,size,ash,gindex);
}
else
{
retval = -4;
CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_GrouplsshVN: Group index not found for %s",varname);
+ "CCTK_GroupashVN: Group index not found for %s",varname);
}
return retval;
}
-void CCTK_FCALL CCTK_FNAME (CCTK_GrouplsshVN)
+void CCTK_FCALL CCTK_FNAME (CCTK_GroupashVN)
(int *ierr,
const cGH **cctkGH,
const int *size,
- int *lssh,
+ int *ash,
ONE_FORTSTRING_ARG)
{
ONE_FORTSTRING_CREATE (varname)
- *ierr = CCTK_GrouplsshVN (*cctkGH, *size, lssh, varname);
+ *ierr = CCTK_GroupashVN (*cctkGH, *size, ash, varname);
free (varname);
}
diff --git a/src/main/Stagger.c b/src/main/Stagger.c
deleted file mode 100644
index 67aa8c0f..00000000
--- a/src/main/Stagger.c
+++ /dev/null
@@ -1,440 +0,0 @@
- /*@@
- @file Stagger.c
- @date Thu Jan 27 15:32:28 2000
- @author Gerd Lanfermann
- @desc
- Stuff to deal with staggering.
- @enddesc
- @version $Header$
- @@*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "cctk_Flesh.h"
-#include "cctk_FortranString.h"
-#include "cctk_Groups.h"
-#include "cctk_Types.h"
-#include "cctk_WarnLevel.h"
-
-#include "cctk_Stagger.h"
-#include "cctki_Stagger.h"
-
-static const char *rcsid = "$Header$";
-
-CCTK_FILEVERSION(main_Stagger_c);
-
-/********************************************************************
- ********************* Fortran Wrappers ***********************
- ********************************************************************/
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerIndexGI)
- (int *stagcode, int *gindex);
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerIndexGN)
- (int *scode, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_StaggerIndex)
- (int *scode, ONE_FORTSTRING_ARG);
-void CCTK_FCALL CCTK_FNAME (CCTK_StaggerDirIndex)
- (int *dsi, int *dir, int *gsi);
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerDirArray)
- (int *ierr, int *dindex, int *dim, int *gsc);
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerDirArrayGI)
- (int *ierr, int *dindex, int *dim, int *gi);
-void CCTK_FCALL CCTK_FNAME (CCTK_StaggerDirName)
- (int *dsc, int *dir, ONE_FORTSTRING_ARG);
-
-/********************************************************************
- ********************* External Routines **********************
- ********************************************************************/
-
-
- /*@@
- @routine CCTK_GroupStaggerIndexGI
- @date
- @author
- @desc retuns the stagger code for a given group index
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_GroupStaggerIndexGI(int gindex)
-{
- cGroup group;
- int sc;
- CCTK_GroupData(gindex, &group);
- sc = group.stagtype;
- return(sc);
-}
-
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerIndexGI)
- (int *stagcode, int *gindex)
-{
- *stagcode = CCTK_GroupStaggerIndexGI(*gindex);
-}
-
-
- /*@@
- @routine CCTK_GroupStaggerIndexGN
- @date
- @author Gerd Lanfermann
- @desc returns the stagger index for a given group name
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_GroupStaggerIndexGN(const char *gname)
-{
- int gindex;
- gindex = CCTK_GroupIndex(gname);
- return(CCTK_GroupStaggerIndexGI(gindex));
-}
-
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerIndexGN)
- (int *scode, ONE_FORTSTRING_ARG)
-{
- ONE_FORTSTRING_CREATE(gname)
- int gindex;
- gindex = CCTK_GroupIndex(gname);
- *scode = CCTK_GroupStaggerIndexGI(gindex);
- free(gname);
-}
-
-
- /*@@
- @routine CCTK_StaggerIndex
- @date
- @author Gerd Lanfermann
- @desc returns the stagger index for a given stagger name
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_StaggerIndex(const char *stype)
-{
- int i,scode,base,dim,m;
-
- base = 1;
- scode= 0;
- dim = strlen(stype);
-
- for (i=0;i<dim;i++)
- {
-
- switch (toupper(stype[i]))
- {
- case 'M':m=0; break;
- case 'C':m=1; break;
- case 'P':m=2; break;
- default:
- CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_StaggerIndex: Unknown stagger type %s",stype);
- return(-1);
- }
- scode+= m*base;
- base = CCTK_NUM_STAGGER * base;
- }
- return(scode);
-}
-
-void CCTK_FCALL CCTK_FNAME (CCTK_StaggerIndex)
- (int *scode, ONE_FORTSTRING_ARG)
-{
- ONE_FORTSTRING_CREATE(sname);
- *scode = CCTK_StaggerIndex(sname);
- free(sname);
-}
-
-
-/*@@
- @routine CCTK_StaggerDirIndex
- @date
- @author Gerd Lanfermann
- @desc returns the stagger index in a direction <dir>
- when given the staggerindex <sc>.
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_StaggerDirIndex(int dir, int si)
-{
- int val,b,dsi=0;
- static int hash[4],hashed=0;
-
- if (hashed==0)
- {
- hash[0]= 1;
- hash[1]= 3;
- hash[2]= 9;
- hash[3]=27;
- hashed = 1;
- }
-
- for (b=CCTK_NSTAG;b>=0;b--)
- {
- val = (int)(si / hash[b]);
- si = si % hash[b];
- if (dir==b)
- {
- dsi = val;
- break;
- }
- }
- return(dsi);
-}
-
-
-
-void CCTK_FCALL CCTK_FNAME (CCTK_StaggerDirIndex)
- (int *dsi, int *dir, int *gsi)
-{
- /* accept fortran indexing [1..]: decrease the directional index
- for the call to the C routine. */
- *dsi = CCTK_StaggerDirIndex((*dir)-1, *gsi);
-}
-
-
-
-/*@@
- @routine CCTK_StaggerDirIndexArray
- @date
- @author Gerd Lanfermann
- @desc returns the stagger index for all direction in
- an array <dindex> of size <dim> when given the staggerindex <sc>.
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_StaggerDirArray(int *dindex , int dim, int sindex)
-{
- int val,b;
- static int hash[4],hashed=0;
-
- if (hashed==0)
- {
- hash[0]= 1;
- hash[1]= 3;
- hash[2]= 9;
- hash[3]=27;
- hashed = 1;
- }
-
- if (dim>4)
- {
- CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_StaggerDirArray: Dimension %d exceeds maximum of 4",dim);
- return(-1);
- }
-
- for (b=CCTK_NSTAG;b>=0;b--)
- {
- val = (int)(sindex / hash[b]);
- sindex = sindex % hash[b];
- if (b<dim) dindex[b] = val;
- }
- return(0);
-}
-
-
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerDirArray)
- (int *ierr, int *dindex, int *dim, int *gsc)
-{
- /* accept fortran indexing [1..]: decrease the directional index
- for the call to the C routine. */
- *ierr = CCTK_StaggerDirArray(dindex, *dim, *gsc);
-}
-
- /*@@
- @routine CCTK_GroupStaggerDirArrayGI
- @date
- @author Gerd Lanfermann
- @desc returns the stagger index for all direction in
- an array <dindex> of size <dim> when given the group
- index <gi>
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_GroupStaggerDirArrayGI(int *dindex, int dim, int gi)
-{
- int si,ierr;
- si = CCTK_GroupStaggerIndexGI(gi);
- ierr= CCTK_StaggerDirArray(dindex, dim, si);
- return ierr;
-}
-
-void CCTK_FCALL CCTK_FNAME (CCTK_GroupStaggerDirArrayGI)
- (int *ierr, int *dindex, int *dim, int *gi)
-{
- *ierr = CCTK_GroupStaggerDirArrayGI(dindex, *dim, *gi);
-}
-
-
- /*@@
- @routine CCTK_StaggerDirName
- @date
- @author Gerd Lanfermann
- @desc returns the directional staggering in direction <dir>
- for a given stagger name <stype>.
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTK_StaggerDirName(int dir, const char *stype)
-{
- int scode;
- char hs[7]="MMMMMM";
-
- sprintf(hs,"%s",stype);
-
- if (dir> (int) strlen(hs))
- {
- CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_StaggerDirName: Stagger name too short for direction %d",
- dir);
- }
-
- switch (toupper(hs[dir]))
- {
- case 'M': scode = 0; break;
- case 'C': scode = 1; break;
- case 'P': scode = 2; break;
- default:
- CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTK_StaggerDirName: Unknown stagger type %s",hs);
- return(-1);
- }
- return(scode);
-}
-
-void CCTK_FCALL CCTK_FNAME (CCTK_StaggerDirName)
- (int *dsc, int *dir, ONE_FORTSTRING_ARG)
-{
- ONE_FORTSTRING_CREATE(sname);
-
- *dsc = CCTK_StaggerDirName((*dir)-1,sname);
-
- free(sname);
-}
-
-
-
-
-
-
- /*@@
- @routine CCTKi_ParseStaggerString
- @date
- @author Gerd Lanfermann
- @desc returns the stagger index for a string. Similar routines
- as CCTK_StaggerIndexName, but does more error checking since
- it is called during Group setup and if things go wrong, the used
- has a better idea where he specified wrong settings.
-
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
-int CCTKi_ParseStaggerString(int dim,
- const char *imp,
- const char *gname,
- const char *stype)
-{
- int i,m;
- int base = 1;
- int scode = 0;
- char hs[11];
-
- if (dim>10)
- {
- CCTK_VWarn(0,__LINE__,__FILE__,"Cactus",
- "CCTKi_ParseStaggerString: Dimension %d exceeds maximum of 10",
- dim);
- }
-
- /* change possible SHORTCUTS into the official notation*/
- if (CCTK_Equals(stype,"NONE"))
- {
- sprintf(hs,"MMMMMMMMMM");
- }
- else if (CCTK_Equals(stype,"CELL"))
- {
- sprintf(hs,"CCCCCCCCCC");
- }
- else
- {
- if ((int) strlen(stype)!=dim)
- {
- CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTKi_ParseStaggerString: Staggering %s for %s unequal to group dimension %d",
- stype,gname,dim);
- }
-
- sprintf(hs,"%s",stype);
- }
-
- for (i=0;i<dim;i++)
- {
- switch (toupper(hs[i]))
- {
- case 'M':m=0; break;
- case 'C':m=1; break;
- case 'P':m=2; break;
- default:
- CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
- "CCTKi_ParseStaggerString: Unknown stagger type %s for %s::%s",
- stype,imp,gname);
- return(-1);
- }
- scode+= m*base;
- base = 3 * base;
- }
-
- return scode;
-}
diff --git a/src/main/make.code.defn b/src/main/make.code.defn
index d6bfe986..756fc564 100644
--- a/src/main/make.code.defn
+++ b/src/main/make.code.defn
@@ -35,7 +35,6 @@ ScheduleInterface.c\
SetParams.c\
SetupCache.c\
ShutdownCactus.c\
-Stagger.c\
Subsystems.c\
Termination.c\
Traverse.c\