aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@d60812e6-3970-4df4-986e-c251b06effeb>2005-12-05 20:57:51 +0000
committeryye00 <yye00@d60812e6-3970-4df4-986e-c251b06effeb>2005-12-05 20:57:51 +0000
commit371ed4738b91ee03304d08f09b4d9d9911ee1c06 (patch)
tree5aeb69b0c24b7f9427ecb6fad8451fbd1182408b
parent325bd9c079d695811f72b4e8507a07c1c6cfdb9b (diff)
changes to ELLSOR to use new reduction api, removed references to pointwise from ReduceArraysGlobally, removed unused variables and added the LocalReduce thorn to a .par file
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@79 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r--src/ReduceArraysGlobally.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/ReduceArraysGlobally.c b/src/ReduceArraysGlobally.c
index 4f7c682..23f4a91 100644
--- a/src/ReduceArraysGlobally.c
+++ b/src/ReduceArraysGlobally.c
@@ -3,7 +3,7 @@
@date
@author Yaakoub Y El Khamra
@desc
- New pointwise reduction implementation
+ New global local array reduction implementation
@enddesc
@version $Header$
@@*/
@@ -44,7 +44,7 @@ static int ReduceArraysGlobally (const cGH *GH,
@date
@author Yaakoub El Khamra
@desc
- Generic routine for doing a pointwise reduction
+ Generic routine for doing a global local array reduction
@enddesc
@var GH
@vdesc pointer to the grid hierarchy
@@ -138,7 +138,7 @@ int PUGH_ReduceArraysGlobally (const cGH *GH,
@routine ReduceGridArrays
@date
@author Yaakoub Y El Khamra
- @desc Returns the pointwise reduction of an array
+ @desc Performs global array reduction
@enddesc
@@*/
static int ReduceArraysGlobally (const cGH *GH,
@@ -149,7 +149,7 @@ static int ReduceArraysGlobally (const cGH *GH,
const void * const input_arrays[],
int input_dims,
const CCTK_INT input_array_max_dims[],
- const CCTK_INT pointwise_input_array_type_codes[],
+ const CCTK_INT input_array_type_codes[],
int M_output_values,
const CCTK_INT output_value_type_codes[],
void* const output_values[])
@@ -180,7 +180,7 @@ static int ReduceArraysGlobally (const cGH *GH,
CCTK_INT * min_array_subscript;
CCTK_INT * array_lsh;
CCTK_INT * input_array_dims;
- CCTK_INT * input_array_type_codes;
+
CCTK_INT * input_array_gz;
/* temporary complex variables*/
@@ -215,15 +215,10 @@ static int ReduceArraysGlobally (const cGH *GH,
is out of bounds");
}
#endif
-
-
+
/* prevent compiler warnings about unused parameters */
(void) (GH + 0);
- /* allocate memory for type codes and input array pointer */
- input_array_type_codes = (CCTK_INT *)malloc (N_input_arrays *sizeof(CCTK_INT));
- input_arrays = (CCTK_POINTER) malloc (N_input_arrays *sizeof(CCTK_POINTER));
-
/* set the number of dimensions */
dim = input_dims;
@@ -234,13 +229,6 @@ static int ReduceArraysGlobally (const cGH *GH,
input_array_dims = (CCTK_INT *)malloc (dim *sizeof(CCTK_INT));
input_array_gz = (CCTK_INT *)malloc (dim *sizeof(CCTK_INT));
- /* find out the types of the input arrays and put that */
- /* in an array ipughGH->GFExtras[dim]->lnsize[i]*/
- for ( i = 0; i < N_input_arrays; i++)
- {
- input_array_type_codes[i] = pointwise_input_array_type_codes[i];
- }
-
/* calculate index ranges */
for ( i=0; i < dim; i++)
{
@@ -285,7 +273,7 @@ static int ReduceArraysGlobally (const cGH *GH,
weight = NULL;
ierr = Util_TableSetInt(param_table_handle, 0, "weight_on");
}
-
+
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);