aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@d60812e6-3970-4df4-986e-c251b06effeb>2012-07-04 01:29:22 +0000
committereschnett <eschnett@d60812e6-3970-4df4-986e-c251b06effeb>2012-07-04 01:29:22 +0000
commit2e15500a6f4763d3bb531f47c4ce8102fd401678 (patch)
tree0e80119bccf6f41379a34d6f4f450f2334c26dd7
parent58e21088bc6d95160321847d7cc1d8339be1289e (diff)
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
-rw-r--r--src/ReduceArraysGlobally.c2
-rw-r--r--src/ReduceGA.c4
-rw-r--r--src/Reduction.c8
3 files changed, 5 insertions, 9 deletions
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;