aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Interpolation.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/Interpolation.c b/src/Interpolation.c
index 7835d7f..2ae8a2e 100644
--- a/src/Interpolation.c
+++ b/src/Interpolation.c
@@ -150,18 +150,20 @@ SymBase_SymmetryInterpolate (CCTK_POINTER_TO_CONST const cctkGH_,
has_only_grid_arrays = 1;
for (n=0; n<N_input_arrays; ++n)
{
- switch (CCTK_GroupTypeFromVarI (input_array_indices[n]))
- {
- case CCTK_GF:
- has_only_grid_arrays = 0;
- break;
- case CCTK_SCALAR:
- case CCTK_ARRAY:
- has_grid_arrays = 1;
- break;
- default:
- CCTK_WARN (1, "Could not determine group type of input arrays");
- return -93;
+ if (input_array_indices[n] != -1) {
+ switch (CCTK_GroupTypeFromVarI (input_array_indices[n]))
+ {
+ case CCTK_GF:
+ has_only_grid_arrays = 0;
+ break;
+ case CCTK_SCALAR:
+ case CCTK_ARRAY:
+ has_grid_arrays = 1;
+ break;
+ default:
+ CCTK_WARN (1, "Could not determine group type of input arrays");
+ return -93;
+ }
}
}
if (has_grid_arrays && ! has_only_grid_arrays)