aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@d60812e6-3970-4df4-986e-c251b06effeb>2004-12-14 23:43:42 +0000
committeryye00 <yye00@d60812e6-3970-4df4-986e-c251b06effeb>2004-12-14 23:43:42 +0000
commitb1cdf78df5b46154762933c1ac9c631b8e770fb1 (patch)
treef7327a3f218b7bed55503725284aaa08fa769e86
parentaf63616a98d2528eb2498e4116e0392fcef5a68d (diff)
update to match local reduction update
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@60 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r--src/ReduceGA.c17
1 files 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<dim; i++)
- {
- input_array_dims[i] = array_lsh[i] - min_array_subscript[i];
- }
-
/* Set flag to tell local reduction not to divide by num_points */
ierr = Util_TableSetInt(param_table_handle, 1, "global_calling");