diff options
author | jthorn <jthorn@0f49ee68-0e4f-0410-9b9c-b2c123ded7ef> | 2006-08-13 20:10:20 +0000 |
---|---|---|
committer | jthorn <jthorn@0f49ee68-0e4f-0410-9b9c-b2c123ded7ef> | 2006-08-13 20:10:20 +0000 |
commit | eb53f06ee68436a7f537e8f12cea070f0c0daba5 (patch) | |
tree | 5caca852f46da38ccbda2563f33b1af604eaba91 | |
parent | ca97106026fc299b5f761077b2efd082cba5724f (diff) |
+= a few more sanity checks
git-svn-id: http://svn.aei.mpg.de/numrel/AEIThorns/AEILocalInterp/trunk@37 0f49ee68-0e4f-0410-9b9c-b2c123ded7ef
-rw-r--r-- | src/molecule_posn.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/molecule_posn.c b/src/molecule_posn.c index f078286..cfd0642 100644 --- a/src/molecule_posn.c +++ b/src/molecule_posn.c @@ -172,6 +172,8 @@ static const char *rcsid = "$Header$"; (i.e. x > the maximum allowable x) MOLECULE_POSN_ERROR_GRID_TINY if the grid is smaller than the molecule + MOLECULE_POSN_ERROR_NAN + if we encounter a NaN or other non-finite floating-point value @endreturndesc @@*/ int AEILocalInterp_molecule_posn(fp grid_origin, fp grid_delta, @@ -225,6 +227,11 @@ if (molecule_size > HOW_MANY_IN_RANGE(grid_i_min,grid_i_max)) /* has someone passed us NaNs for coordinates etc? */ if (!finite(grid_origin) || !finite(grid_delta) || !finite(x)) then return MOLECULE_POSN_ERROR_NAN; +if ( !finite(boundary_off_centering_tolerance_min) + || !finite(boundary_off_centering_tolerance_max) + || !finite(boundary_extrapolation_tolerance_min) + || !finite(boundary_extrapolation_tolerance_max) ) + then return MOLECULE_POSN_ERROR_NAN; /* ditto if the grid spacing is zero (we'll need to divide by it)! */ if (grid_delta == 0.0) |