aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-08-01 16:18:29 +0000
committertradke <tradke@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-08-01 16:18:29 +0000
commit1bbb51e1eb07986f2eb6fad44ada52a4151c1201 (patch)
treeec05ccf2647de960fb2514e822590274078d4573
parent0ced401ec59b00c52055eaf08c507a9ea529582f (diff)
Return the (negative) total number of out-of-bounds interpolation points
as the status code of CCTK_InterpLocal(). git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@171 df1f8a13-aa1d-4dd4-9681-27ded5b42416
-rw-r--r--src/Interpolate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Interpolate.c b/src/Interpolate.c
index e5c3685..9bf6267 100644
--- a/src/Interpolate.c
+++ b/src/Interpolate.c
@@ -266,7 +266,8 @@ CCTK_FILEVERSION(CactusBase_LocalInterp_Interpolate_c)
@returntype int
@returndesc
0 - successful interpolation
- -1 - in case of any errors
+ negative in case of any errors (eg. the negative total number
+ of out-of-bounds interpolation points)
@endreturndesc
@@*/
int LocalInterp_Interpolate (int order,
@@ -358,7 +359,7 @@ int LocalInterp_Interpolate (int order,
memset (point, 0, sizeof (point));
/* loop over all points to interpolate at */
- for (n = 0; n < num_points; n++)
+ for (n = retval = 0; n < num_points; n++)
{
/* reset the out-of-bounds flag */
out_of_bounds = 0;
@@ -462,6 +463,10 @@ if (n == LocalInterp_verbose_debug_n)
CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
"Internal error: %d dimensions aren't supported", num_dims);
}
+
+ /* the negative total number of out-of-bounds points will be returned */
+ retval--;
+
continue;
}