aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ReduceGA.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ReduceGA.c b/src/ReduceGA.c
index 52cfad3..e7f7181 100644
--- a/src/ReduceGA.c
+++ b/src/ReduceGA.c
@@ -149,15 +149,15 @@ static int ReduceGridArrays (const cGH *GH,
/* 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 = CCTK_GroupDimFromVarI(input_array_variable_indices[0]);
/* allocate memory for the array of the dimensions of the input arrays */
lower_array_bounds = (CCTK_INT *)malloc (dim *sizeof(CCTK_INT));
upper_array_bounds = (CCTK_INT *)malloc (dim *sizeof(CCTK_INT));
input_array_dims = (CCTK_INT *)malloc (dim *sizeof(CCTK_INT));
- /* set the number of dimensions */
- dim = CCTK_GroupDimFromVarI(input_array_variable_indices[0]);
-
/* find out the types of the input arrays and put that */
/* in an array */
for ( i = 0; i < N_input_arrays; i++)