From b1cdf78df5b46154762933c1ac9c631b8e770fb1 Mon Sep 17 00:00:00 2001 From: yye00 Date: Tue, 14 Dec 2004 23:43:42 +0000 Subject: update to match local reduction update git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@60 d60812e6-3970-4df4-986e-c251b06effeb --- src/ReduceGA.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/ReduceGA.c b/src/ReduceGA.c index 045db2f..41f1134 100644 --- a/src/ReduceGA.c +++ b/src/ReduceGA.c @@ -186,7 +186,7 @@ static int ReduceGridArrays (const cGH *GH, input_array_gz = (CCTK_INT *)malloc (dim *sizeof(CCTK_INT)); /* find out the types of the input arrays and put that */ - /* in an array */ + /* in an array ipughGH->GFExtras[dim]->lnsize[i]*/ for ( i = 0; i < N_input_arrays; i++) { input_array_type_codes[i] = CCTK_VarTypeI( input_array_variable_indices[i] ); @@ -199,18 +199,18 @@ static int ReduceGridArrays (const cGH *GH, i = CCTK_GroupIndexFromVarI(input_array_variable_indices[0]); ierr = CCTK_GroupnghostzonesGI(GH, dim, input_array_gz,i ); + /* get the GA structure for the current timelevel */ + 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 */ - /* get the GA structure for the current timelevel */ - GA = ((pGA ***) PUGH_pGH (GH)->variables)[input_array_variable_indices[0]][0]; - data = GA->data; - for ( i=0; i < dim; i++) { /* get the start- and endpoint to iterate over in this dimension */ @@ -247,11 +247,6 @@ static int ReduceGridArrays (const cGH *GH, } } - for (i = 0; i