mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
made a fix to the GMRES solver so that it now correctly reports the error achieved in the solution process
This commit is contained in:
parent
575bc44c3f
commit
ccc7563ac5
@ -157,7 +157,8 @@ bool gmres(const MatrixType & mat, const Rhs & rhs, Dest & x, const Precondition
|
||||
// insert coefficients into upper matrix triangle
|
||||
H.col(k-1).head(k) = v.head(k);
|
||||
|
||||
bool stop = (k==m || abs(w(k)) < tol * r0Norm || iters == maxIters);
|
||||
tol_error = std::abs(w(k)) / r0Norm;
|
||||
bool stop = (k==m || tol_error < tol || iters == maxIters);
|
||||
|
||||
if (stop || k == restart)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user