aboutsummaryrefslogtreecommitdiff
path: root/src/StaticBoundary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/StaticBoundary.c')
-rw-r--r--src/StaticBoundary.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c
index 74372e5..e942531 100644
--- a/src/StaticBoundary.c
+++ b/src/StaticBoundary.c
@@ -804,7 +804,7 @@ void CCTK_FCALL CCTK_FNAME (BndStaticVN)
#define MAXDIM 3
/* macro to compute the linear index of a 3D point */
-#define INDEX_3D(lsh, i, j, k) ((i) + (lsh)[0]*((j) + (lsh)[1]*(k)))
+#define INDEX_3D(ash, i, j, k) ((i) + (ash)[0]*((j) + (ash)[1]*(k)))
/*@@
@routine STATIC_BOUNDARY
@@ -845,10 +845,9 @@ void CCTK_FCALL CCTK_FNAME (BndStaticVN)
{ \
int _index; \
\
- \
- _index = INDEX_3D (lsh, ii, jj, kk) * vtypesize; \
- memcpy ((char *) GH->data[var][timelvl_to] + _index, \
- (char *) GH->data[var][timelvl_from] + _index, \
+ _index = INDEX_3D (ash, ii, jj, kk) * vtypesize; \
+ memcpy ((char *) GH->data[var][timelvl_to] + _index, \
+ (char *) GH->data[var][timelvl_from] + _index, \
vtypesize); \
} \
} \
@@ -935,7 +934,7 @@ static int ApplyBndStatic (const cGH *GH,
int timelvl_to, timelvl_from;
int gindex, gdim;
int var, vtypesize;
- int doBC[2*MAXDIM], lsh[MAXDIM];
+ int doBC[2*MAXDIM], ash[MAXDIM], lsh[MAXDIM];
CCTK_INT widths[2*MAXDIM];
CCTK_INT symtable;
CCTK_INT symbnd[2*MAXDIM];
@@ -992,6 +991,7 @@ static int ApplyBndStatic (const cGH *GH,
so that we can use the INDEX_3D macro later on */
for (i = gdim; i < MAXDIM; i++)
{
+ ash[i] = 0;
lsh[i] = 0;
}
@@ -1031,6 +1031,7 @@ static int ApplyBndStatic (const cGH *GH,
}
for (i = 0; i < gdim; i++)
{
+ ash[i] = GH->cctk_ash[i];
lsh[i] = GH->cctk_lsh[i];
doBC[i*2] &= GH->cctk_lsh[i] > widths[i*2] && GH->cctk_bbox[i*2];
doBC[i*2+1] &= GH->cctk_lsh[i] > widths[i*2+1] && GH->cctk_bbox[i*2+1];