mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +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
|
// insert coefficients into upper matrix triangle
|
||||||
H.col(k-1).head(k) = v.head(k);
|
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)
|
if (stop || k == restart)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user