From b7cfb158d8e68818c8071a26fe01fed96226d6cd Mon Sep 17 00:00:00 2001 From: eschnett Date: Wed, 4 Jul 2012 01:28:25 +0000 Subject: 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/arrangements/CactusNumerical/Noise/trunk@32 936e0995-0e4f-0410-aade-aa24bf7baf3d --- src/bc_noise.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/bc_noise.c b/src/bc_noise.c index 1b34721..80b617a 100644 --- a/src/bc_noise.c +++ b/src/bc_noise.c @@ -140,7 +140,7 @@ static int ApplyBndNoise (const cGH *GH, DECLARE_CCTK_PARAMETERS; 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]; SymmetryGHex *sGHex; int type; @@ -176,13 +176,9 @@ static int ApplyBndNoise (const cGH *GH, so that we can use the INDEX_3D macro later on */ for (i = gdim; i < MAXDIM; i++) { - lsh[i] = 1; - lssh[i] = 1; + lsh[i] = 1; } - /* get the directional staggering of the group */ - CCTK_GroupStaggerDirArrayGI (dstag, gdim, gindex); - /* get the current timelevel */ timelvl = 0; @@ -210,7 +206,6 @@ static int ApplyBndNoise (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] > 1 && GH->cctk_bbox[i*2]; doBC[i*2+1] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2+1]; if (dir != 0) @@ -234,11 +229,11 @@ static int ApplyBndNoise (const cGH *GH, } #endif /* DEBUG_BOUNDARY */ /* lower x */ - BOUNDARY_NOISE (doBC[0], stencil[0], lssh[1], lssh[2], + BOUNDARY_NOISE (doBC[0], stencil[0], lsh[1], lsh[2], i, j, k); /* upper x */ - BOUNDARY_NOISE (doBC[1], stencil[0], lssh[1], lssh[2], - lssh[0]-i-1, j, k); + BOUNDARY_NOISE (doBC[1], stencil[0], lsh[1], lsh[2], + lsh[0]-i-1, j, k); } if (gdim > 1) @@ -255,11 +250,11 @@ static int ApplyBndNoise (const cGH *GH, } #endif /* DEBUG_BOUNDARY */ /* lower y */ - BOUNDARY_NOISE (doBC[2], lssh[0], stencil[1], lssh[2], + BOUNDARY_NOISE (doBC[2], lsh[0], stencil[1], lsh[2], i, j, k); /* upper y */ - BOUNDARY_NOISE (doBC[3], lssh[0], stencil[1], lssh[2], - i, lssh[1]-j-1, k); + BOUNDARY_NOISE (doBC[3], lsh[0], stencil[1], lsh[2], + i, lsh[1]-j-1, k); } if (gdim > 2) { @@ -274,11 +269,11 @@ static int ApplyBndNoise (const cGH *GH, } #endif /* DEBUG_BOUNDARY */ /* lower z */ - BOUNDARY_NOISE (doBC[4], lssh[0], lssh[1], stencil[2], + BOUNDARY_NOISE (doBC[4], lsh[0], lsh[1], stencil[2], i, j, k); /* upper z */ - BOUNDARY_NOISE (doBC[5], lssh[0], lssh[1], stencil[2], - i, j, lssh[2]-k-1); + BOUNDARY_NOISE (doBC[5], lsh[0], lsh[1], stencil[2], + i, j, lsh[2]-k-1); } } -- cgit v1.2.3