diff options
Diffstat (limited to 'src/driver/Newton.cc')
-rw-r--r-- | src/driver/Newton.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/driver/Newton.cc b/src/driver/Newton.cc index 27b340b..94eb9cf 100644 --- a/src/driver/Newton.cc +++ b/src/driver/Newton.cc @@ -13,6 +13,7 @@ #include <stdio.h> #include <assert.h> #include <limits.h> +#include <float.h> #include <math.h> #include "util_Table.h" @@ -425,7 +426,7 @@ if (hs.has_genuine_horizons()) = Jac_ptr->solve_linear_system(gfns::gfn__Theta, gfns::gfn__Delta_h, solver_info.linear_solver_pars, verbose_info.print_algorithm_details); - if (rcond == 0.0) + if ((rcond >= 0.0) && (rcond < 100.0*FP_EPSILON)) then { CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, "Newton_solve: Jacobian matrix is numerically singular!"); @@ -436,7 +437,7 @@ if (hs.has_genuine_horizons()) then { if (rcond > 0.0) then CCTK_VInfo(CCTK_THORNSTRING, - "done solving linear system (condition number %.1e)", + "done solving linear system (rcond=%.1e)", double(rcond)); else CCTK_VInfo(CCTK_THORNSTRING, "done solving linear system"); |