I’m seeking recommendations for a package for solving a large system of nonlinear equations, allowing for inexact Newton system solves using iterative linear solvers. My Jacobian is symmetric indefinite, and so I hope to use Minres as the linear solver.
Here are a couple of options I’ve explored:
trunkls in JSOSolvers.jl is really good. However, it lacks support for symmetric linear solvers, which leads to doubling the number of Jacobian-vector products.
NonlinearSolve.jl allows for a variety of linear solvers, but it doesn’t appear to have built-in support for inexact solves. Modifying the package may not be straightforward.
I’d appreciate any suggestions on other packages that might be suitable.
I’m hoping for a way to set the per-iteration accuracy. I tried using the iterator interface
for i in 1:10
step!(nlcache)
end
with the idea that I could query nlcache for the current residual in order to define the next value of rtol=\eta_k. I can see that rtol is buried somewhere inside nlcache. Is there a way to change it?
The nsoli.jl solver in my package SIAMFANLEquations.jl has matrix free inexact Newton methods. These are pretty well documented in a book and a suite of Jupyter Notebooks with examples and explanations of the methods. I support GMRES(m) and BICGSTAB, but not Minres. You have access to the forcing term \eta and other algorithmic parameters.
The API is not like NonlinearSolve.jl because the package was designed to support a book project and I wanted all the algorithmic parameters to be easy to play with. I think NonlinearSolve.jl will let you get to SIAMFANLEquations.jl as you can see by scrolling to the bottom of this page. I have not played with this and do not know how easy it is to use.