From 2e15500a6f4763d3bb531f47c4ce8102fd401678 Mon Sep 17 00:00:00 2001 From: eschnett Date: Wed, 4 Jul 2012 01:29:22 +0000 Subject: Introduce cctk_ash, retire cctk_lssh Introduce cctk_ash, describing the process-local array shape that has been allocated. This may be larger than cctk_lsh, the process-local shape that should be used. Retire cctk_lssh and related infrastructure to handle staggered grid functions. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@100 d60812e6-3970-4df4-986e-c251b06effeb --- src/ReduceArraysGlobally.c | 2 +- src/ReduceGA.c | 4 ++-- src/Reduction.c | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ReduceArraysGlobally.c b/src/ReduceArraysGlobally.c index cc33b54..47f1659 100644 --- a/src/ReduceArraysGlobally.c +++ b/src/ReduceArraysGlobally.c @@ -274,7 +274,7 @@ static int ReduceArraysGlobally (const cGH *GH, ierr = CCTK_ReduceLocalArrays(dim, local_reduce_handle, param_table_handle, N_input_arrays, input_array_dims, input_array_type_codes, - (void *)input_arrays, M_output_values, output_value_type_codes, output_values); + input_arrays, M_output_values, output_value_type_codes, output_values); /* Get flag to perform division by number of points or not, number_of_points and weight_sum */ ierr = Util_TableGetInt(param_table_handle, &perform_division, "perform_division"); diff --git a/src/ReduceGA.c b/src/ReduceGA.c index 7ce6a18..98b2890 100644 --- a/src/ReduceGA.c +++ b/src/ReduceGA.c @@ -235,8 +235,8 @@ static int ReduceGridArrays (const cGH *GH, 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]; + min_array_subscript[i] = GA->extras->ownership[0][i]; + array_lsh[i] = GA->extras->ownership[1][i]; input_array_dims[i] = GA->extras->lnsize[i]; } diff --git a/src/Reduction.c b/src/Reduction.c index 0ea8998..02564d1 100644 --- a/src/Reduction.c +++ b/src/Reduction.c @@ -395,8 +395,8 @@ static int ReductionGA (const cGH *GH, int vindex, int proc, CCTK_REAL *outval, for (i = 0; i < GA->connectivity->dim; i++) { /* get the start- and endpoint to iterate over in this dimension */ - from[i] = GA->extras->ownership[GA->stagger[i]][0][i]; - to[i] = GA->extras->ownership[GA->stagger[i]][1][i]; + from[i] = GA->extras->ownership[0][i]; + to[i] = GA->extras->ownership[1][i]; /* get the number of points in this dimension (excluding ghostzones) */ dir_points = GA->extras->nsize[i]; @@ -404,10 +404,6 @@ static int ReductionGA (const cGH *GH, int vindex, int proc, CCTK_REAL *outval, { dir_points -= 2*GA->extras->nghostzones[i]; } - if (GA->stagger[i]) - { - dir_points--; - } /* accumulate the total number of points the reduce */ num_points *= dir_points; -- cgit v1.2.3