diff options
author | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2002-03-07 11:43:27 +0000 |
---|---|---|
committer | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2002-03-07 11:43:27 +0000 |
commit | 87218c16a190bf7a2d0358ae6834ae4e65b3ddeb (patch) | |
tree | 16e090cd62e647ff0441c9b3936c7cca4d8b32d6 | |
parent | b2c0086564951243a58574cd17829d7b955e3420 (diff) |
Added some more comments to document how the domain to reduce is set up.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@23 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r-- | src/Reduction.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Reduction.c b/src/Reduction.c index bce75e9..8ac7dfd 100644 --- a/src/Reduction.c +++ b/src/Reduction.c @@ -382,17 +382,20 @@ static int PUGH_ReductionGA (cGH *GH, int index, int proc, CCTK_REAL *outval, iterator = from + 2*GA->connectivity->dim; points_per_dim = from + 3*GA->connectivity->dim; - /* get the start and endpoint to iterate over, the total number of points, + /* get the start- and endpoint to iterate over, the total number of points, and the points_per_dim[] vector */ num_points = 1; 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]; + /* get the number of points in this dimension (excluding ghostzones) */ dir_points = GA->extras->nsize[i]; if (GA->connectivity->perme[i]) { @@ -402,6 +405,8 @@ static int PUGH_ReductionGA (cGH *GH, int index, int proc, CCTK_REAL *outval, { dir_points--; } + + /* accumulate the total number of points the reduce */ num_points *= dir_points; if (i > 0) |