From 592f7760138d5cbf18f145fdd7ee7225c5790cc2 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Tue, 25 Oct 2016 16:55:45 +0200 Subject: [PATCH] [Math/EigenLS] output iterations and residual even it failed --- MathLib/LinAlg/Eigen/EigenLinearSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp index d6f45b29c49..dbff3748344 100644 --- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp +++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp @@ -87,14 +87,14 @@ public: } x = _solver.solveWithGuess(b, x); + INFO("\t iteration: %d/%ld", _solver.iterations(), opt.max_iterations); + INFO("\t residual: %e\n", _solver.error()); + if(_solver.info()!=Eigen::Success) { ERR("Failed during Eigen linear solve"); return false; } - INFO("\t iteration: %d/%ld", _solver.iterations(), opt.max_iterations); - INFO("\t residual: %e\n", _solver.error()); - return true; } -- GitLab