aboutsummaryrefslogtreecommitdiff
path: root/src/driver/Newton.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-06-02 18:11:00 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-06-02 18:11:00 +0000
commitf2d4c13de1d3d35ab6c2073648949d98fecbec72 (patch)
treebfacc13d76a8aaf1859a288b906eec66bed412b3 /src/driver/Newton.cc
parent91892c701f095ea2425df6c35b4fb8bf54a79cc0 (diff)
Jacobian::solve_linear_system() now returns *reciprocal* condition number
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1084 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/driver/Newton.cc')
-rw-r--r--src/driver/Newton.cc5
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");