-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unifying the interface options #279
Comments
Hi @ranocha, I would say this is great to have. The depwarn is OK, especially if iterativesolvers.jl is used somewhere deep inside another algorithm. But I'm also happy to quickly create a breaking change that doesn't have the depwarn.
|
Thanks for the feedback! I will add If we go for Would you propose to use |
Let's just make maxiter(s) the number of "outer" iterations of the algorithm. bicgstab(k) is special cause it has k gmres-like inner iteration per out iteration, but it's implemented as the matrix acting on a block of vectors, which is typically faster than applying it per vector, so it doesn't really make sense to count matrix-vector products in that algorithm. So instead, just count the number of outer iterations, and make the user responsible for potentially scaling that with their |
And yeah, |
Okay, that sounds reasonable to me. |
We have some applications where it would be very useful to have both absolute and relative tolerances, e.g. because we will run a lot of linear solves with good initial guesses such as in Newton methods. Currently, the linear solvers seem to support only relative tolerance (via the keyword argument
tol
). Would it be okayabstol
,reltol
(mimicking the names of arguments in the SciML ecosystem) with the same meaning as in PETSc, i.e. to stop the iteration whencurrent_residual <= max(reltol * initial_residual, abstol)
?tol
in favor ofreltol
, e.g. using something along the lines of the following code snippet?If it's okay, I can invest some work into this, but would like to know first whether it would be acceptable (to not waste some effort).
A related issue could be to specify a divergence tolerance
divtol
, similar to PETSc.Another issue concerns the maximal number of iterations or matrix-vector products. Some methods allow specifying a
maxiter
(e.g. GMRES) while other allow specifying amax_mv_products
(e.g. BiCGStab(l)). It would be nice if all methods could use the same keyword argument for this to make it easier to switch solvers.The text was updated successfully, but these errors were encountered: