From 6a8475cff8dbfa946e1401711a0a4ccf32c4fa10 Mon Sep 17 00:00:00 2001 From: tradke Date: Sat, 26 Jun 2004 17:43:22 +0000 Subject: pGV structure has changed: it now stores the directional stagger indices. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@48 d60812e6-3970-4df4-986e-c251b06effeb --- src/Reduction.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Reduction.c b/src/Reduction.c index 7ca59a0..77476eb 100644 --- a/src/Reduction.c +++ b/src/Reduction.c @@ -366,7 +366,7 @@ int PUGH_ReductionGVs (const cGH *GH, static int ReductionGA (const cGH *GH, int vindex, int proc, CCTK_REAL *outval, reduction_fn_t reduction_fn) { - int i, stagger_index, num_points, dir_points, retval; + int i, num_points, dir_points, retval; pGA *GA; const void *data; int *from, *to, *iterator, *points_per_dim; @@ -388,12 +388,9 @@ static int ReductionGA (const cGH *GH, int vindex, int proc, CCTK_REAL *outval, points_per_dim[0] = 1; for (i = 0; i < GA->connectivity->dim; i++) { - /* find out whether the variable is staggered */ - stagger_index = CCTK_StaggerDirIndex (i, GA->stagger); - /* get the start- and endpoint to iterate over in this dimension */ - from[i] = GA->extras->ownership[stagger_index][0][i]; - to[i] = GA->extras->ownership[stagger_index][1][i]; + from[i] = GA->extras->ownership[GA->stagger[i]][0][i]; + to[i] = GA->extras->ownership[GA->stagger[i]][1][i]; /* get the number of points in this dimension (excluding ghostzones) */ dir_points = GA->extras->nsize[i]; @@ -401,7 +398,7 @@ static int ReductionGA (const cGH *GH, int vindex, int proc, CCTK_REAL *outval, { dir_points -= 2*GA->extras->nghostzones[i]; } - if (stagger_index) + if (GA->stagger[i]) { dir_points--; } -- cgit v1.2.3