diff options
author | tradke <tradke@df1f8a13-aa1d-4dd4-9681-27ded5b42416> | 2003-09-29 19:14:02 +0000 |
---|---|---|
committer | tradke <tradke@df1f8a13-aa1d-4dd4-9681-27ded5b42416> | 2003-09-29 19:14:02 +0000 |
commit | aeb1019dcdc314b42ba3cdddd87705dc861c6ddd (patch) | |
tree | 7c5b6f81f6d9f18e0948d8c70bb46b6aa8505f2e | |
parent | acc6179acd82dfd9f7842a383ba1b30ec6fd6128 (diff) |
Check for valid input and output array datatype.
This closes CactusBase/1606: Wrong error message in LocalInterp.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@177 df1f8a13-aa1d-4dd4-9681-27ded5b42416
-rw-r--r-- | src/Interpolate.c | 9 |
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]) { |