aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Interpolate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Interpolate.c b/src/Interpolate.c
index 9bf6267..024ee58 100644
--- a/src/Interpolate.c
+++ b/src/Interpolate.c
@@ -547,6 +547,15 @@ if (n == LocalInterp_verbose_debug_n)
/* now loop over all arrays to interpolate at the current point */
for (a = 0; a < num_arrays; a++)
{
+ /* check for valid input and output array type */
+ if (in_types[a] < 0 || out_types[a] < 0)
+ {
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Datatype for input and/or output array with index %d "
+ "is invalid", a);
+ continue;
+ }
+
/* sorry, for now input and output arrays must be of same type */
if (in_types[a] != out_types[a])
{