[SciPy-Dev] lgmres tolerance

Pauli Virtanen pav at iki.fi
Fri Feb 9 08:31:56 EST 2018


marc kirjoitti 09.02.2018 klo 10:57:
[clip]> For technical issues, I would like the algorithm to ignore the 
relative
> residual and to terminates only when the absolute residual is below tol.
> Do there is a way to do this?

Normalizing the right-hand size vector to length 1 should do it:

b_scale = np.linalg.norm(b)
x = lgmres(A, b/b_scale, ...)
x *= b_scale

-- 
Pauli Virtanen


More information about the SciPy-Dev mailing list