diff options
Diffstat (limited to 'src/FlatBoundary.c')
-rw-r--r-- | src/FlatBoundary.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c index dd597de..8d18023 100644 --- a/src/FlatBoundary.c +++ b/src/FlatBoundary.c @@ -922,7 +922,7 @@ static int ApplyBndFlat (const cGH *GH, { int i, j, k; int var, vtypesize, gindex, gdim, timelvl; - 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]; @@ -975,13 +975,9 @@ static int ApplyBndFlat (const cGH *GH, so that we can use the INDEX_3D macro later on */ for (i = gdim; i < MAXDIM; i++) { - lsh[i] = 0; - lssh[i] = 1; + lsh[i] = 0; } - /* get the directional staggering of the group */ - CCTK_GroupStaggerDirArrayGI (dstag, gdim, gindex); - /* get the current timelevel */ timelvl = 0; @@ -1010,7 +1006,6 @@ static int ApplyBndFlat (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) @@ -1034,9 +1029,9 @@ static int ApplyBndFlat (const cGH *GH, } #endif /* DEBUG_BOUNDARY */ /* lower x */ - FLAT_BOUNDARY (doBC[0], widths[0], lssh[1], lssh[2], i, j, k, widths[0], j, k); + FLAT_BOUNDARY (doBC[0], widths[0], lsh[1], lsh[2], i, j, k, widths[0], j, k); /* upper x */ - FLAT_BOUNDARY (doBC[1], widths[1], lssh[1], lssh[2], lssh[0]-i-1, j, k, lssh[0]-widths[1]-1, j, k); + FLAT_BOUNDARY (doBC[1], widths[1], lsh[1], lsh[2], lsh[0]-i-1, j, k, lsh[0]-widths[1]-1, j, k); } if (gdim > 1) { @@ -1051,9 +1046,9 @@ static int ApplyBndFlat (const cGH *GH, } #endif /* DEBUG_BOUNDARY */ /* lower y */ - FLAT_BOUNDARY (doBC[2], lssh[0], widths[2], lssh[2], i, j, k, i, widths[2], k); + FLAT_BOUNDARY (doBC[2], lsh[0], widths[2], lsh[2], i, j, k, i, widths[2], k); /* upper y */ - FLAT_BOUNDARY (doBC[3], lssh[0], widths[3], lssh[2], i, lssh[1]-j-1, k, i, lssh[1]-widths[3]-1, k); + FLAT_BOUNDARY (doBC[3], lsh[0], widths[3], lsh[2], i, lsh[1]-j-1, k, i, lsh[1]-widths[3]-1, k); } if (gdim > 2) { @@ -1068,9 +1063,9 @@ static int ApplyBndFlat (const cGH *GH, } #endif /* DEBUG_BOUNDARY */ /* lower z */ - FLAT_BOUNDARY (doBC[4], lssh[0], lssh[1], widths[4], i, j, k, i, j, widths[4]); + FLAT_BOUNDARY (doBC[4], lsh[0], lsh[1], widths[4], i, j, k, i, j, widths[4]); /* upper z */ - FLAT_BOUNDARY (doBC[5], lssh[0], lssh[1], widths[5], i, j, lssh[2]-k-1, i, j, lssh[2]-widths[5]-1); + FLAT_BOUNDARY (doBC[5], lsh[0], lsh[1], widths[5], i, j, lsh[2]-k-1, i, j, lsh[2]-widths[5]-1); } } |