diff options
Diffstat (limited to 'src/CopyBoundary.c')
-rw-r--r-- | src/CopyBoundary.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c index 1f285fb..171577c 100644 --- a/src/CopyBoundary.c +++ b/src/CopyBoundary.c @@ -1094,7 +1094,7 @@ static int ApplyBndCopy (const cGH *GH, int timelvl_to, timelvl_from; int gindex, gdim; int var_to, var_from, vtypesize; - int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM]; + int doBC[2*MAXDIM], lsh[MAXDIM]; CCTK_INT widths[2*MAXDIM]; CCTK_INT symtable; CCTK_INT symbnd[2*MAXDIM]; @@ -1147,13 +1147,9 @@ static int ApplyBndCopy (const cGH *GH, so that we can use the INDEX_3D macro later on */ for (i = gdim; i < MAXDIM; i++) { - lssh[i] = 1; - lsh[i] = 0; + lsh[i] = 0; } - /* get the directional staggering of the group */ - CCTK_GroupStaggerDirArrayGI (dstag, gdim, gindex); - /* get the current timelevel */ timelvl_to = 0; timelvl_from = 0; @@ -1185,7 +1181,6 @@ static int ApplyBndCopy (const cGH *GH, for (i = 0; i < gdim; i++) { lsh[i] = GH->cctk_lsh[i]; - lssh[i] = GH->cctk_lssh[CCTK_LSSH_IDX (dstag[i], 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]; if (dir != 0) @@ -1199,23 +1194,23 @@ static int ApplyBndCopy (const cGH *GH, if (gdim > 0) { /* lower x */ - COPY_BOUNDARY (doBC[0], widths[0], lssh[1], lssh[2], i, j, k); + COPY_BOUNDARY (doBC[0], widths[0], lsh[1], lsh[2], i, j, k); /* upper x */ - COPY_BOUNDARY (doBC[1], widths[1], lssh[1], lssh[2], lssh[0]-i-1, j, k); + COPY_BOUNDARY (doBC[1], widths[1], lsh[1], lsh[2], lsh[0]-i-1, j, k); } if (gdim > 1) { /* lower y */ - COPY_BOUNDARY (doBC[2], lssh[0], widths[2], lssh[2], i, j, k); + COPY_BOUNDARY (doBC[2], lsh[0], widths[2], lsh[2], i, j, k); /* upper y */ - COPY_BOUNDARY (doBC[3], lssh[0], widths[3], lssh[2], i, lssh[1]-j-1, k); + COPY_BOUNDARY (doBC[3], lsh[0], widths[3], lsh[2], i, lsh[1]-j-1, k); } if (gdim > 2) { /* lower z */ - COPY_BOUNDARY (doBC[4], lssh[0], lssh[1], widths[4], i, j, k); + COPY_BOUNDARY (doBC[4], lsh[0], lsh[1], widths[4], i, j, k); /* upper z */ - COPY_BOUNDARY (doBC[5], lssh[0], lssh[1], widths[5], i, j, lssh[2]-k-1); + COPY_BOUNDARY (doBC[5], lsh[0], lsh[1], widths[5], i, j, lsh[2]-k-1); } } |