aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ReduceGA.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/ReduceGA.c b/src/ReduceGA.c
index c1aeabb..29ddd07 100644
--- a/src/ReduceGA.c
+++ b/src/ReduceGA.c
@@ -231,29 +231,13 @@ static int ReduceGridArrays (const cGH *GH,
GA = ((pGA ***) PUGH_pGH (GH)->variables)[input_array_variable_indices[0]][0];
data = GA->data;
- /* set lower bounds to zero and increment max subscript to use < instead of <= */
- for ( i=0; i < dim; i++)
- {
- min_array_subscript[i] = 0;
- input_array_dims[i] = GA->extras->lnsize[i];
- }
-
- /* Fix subscripts for staggering */
+ /* calculate index ranges */
for ( i=0; i < dim; i++)
{
/* get the start- and endpoint to iterate over in this dimension */
min_array_subscript[i] = GA->extras->ownership[GA->stagger[i]][0][i];
array_lsh[i] = GA->extras->ownership[GA->stagger[i]][1][i];
-
- /* get the number of points in this dimension (excluding ghostzones) */
- if (GA->connectivity->perme[i])
- {
- array_lsh[i] -= 2*GA->extras->nghostzones[i];
- }
- if (GA->stagger[i])
- {
- array_lsh[i]--;
- }
+ input_array_dims[i] = GA->extras->lnsize[i];
}
/* Create the parameter table if it is not there and add the bounds to it */