aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@936e0995-0e4f-0410-aade-aa24bf7baf3d>2012-07-04 01:28:25 +0000
committereschnett <eschnett@936e0995-0e4f-0410-aade-aa24bf7baf3d>2012-07-04 01:28:25 +0000
commitb7cfb158d8e68818c8071a26fe01fed96226d6cd (patch)
tree18d94f757515adef39eb99fe69b81b5fa8507ae9
parent7bd433bec81b5633f71434890f6cad74eede9cd9 (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/arrangements/CactusNumerical/Noise/trunk@32 936e0995-0e4f-0410-aade-aa24bf7baf3d
-rw-r--r--src/bc_noise.c27
1 files 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);
}
}