aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/src/IterativeSolvers
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2013-03-20 16:15:18 +0100
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2013-03-20 16:15:18 +0100
commitda6219b19dd92231cd0afe380ae4880b62bfe88d (patch)
tree36babeb2074be95e585fa450b571c351d76fe2bd /unsupported/Eigen/src/IterativeSolvers
parent22460edb49885a60672f1ab29e71c6dd7f89d197 (diff)
Bug567 : Fix iterative solvers to immediately return when the initial guess is the true solution and for trivial solution
Diffstat (limited to 'unsupported/Eigen/src/IterativeSolvers')
-rw-r--r--unsupported/Eigen/src/IterativeSolvers/GMRES.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/src/IterativeSolvers/GMRES.h b/unsupported/Eigen/src/IterativeSolvers/GMRES.h
index 2efb6ff92..f82472159 100644
--- a/unsupported/Eigen/src/IterativeSolvers/GMRES.h
+++ b/unsupported/Eigen/src/IterativeSolvers/GMRES.h
@@ -349,7 +349,7 @@ public:
void _solve(const Rhs& b, Dest& x) const
{
x = b;
- if(!x.squaredNorm()) return; // Check Zero right hand side
+ if(x.squaredNorm() == 0) return; // Check Zero right hand side
_solveWithGuess(b,x);
}