diff options
author | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2004-06-26 17:43:22 +0000 |
---|---|---|
committer | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2004-06-26 17:43:22 +0000 |
commit | 6a8475cff8dbfa946e1401711a0a4ccf32c4fa10 (patch) | |
tree | 4054959d7a25b43d90c1a858391cb74f16d59752 | |
parent | 675344e33d556267598e133f7378efab0c721817 (diff) |
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
-rw-r--r-- | src/Reduction.c | 11 |
1 files 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--; } |