Solving nonlinear equations using inexact Newton — seeking recommendations

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.

Thank you!
Michael

3 Likes

Should be fine to add this in there. What exactly is missing?

1 Like

I would imagine @ctkelley might have some ideas?

This might also be useful for me :stuck_out_tongue_winking_eye:

Inexact Newton relies on a forcing sequence \eta_k\in(0,1) that defines the accuracy of each linear subsolve, ie,

\|r(x_k)+J(x_k)\Delta x_k\|\le\eta_k\|r(x_k)\|,

where r(x_k) is th residual at the k-th Newton iteration and J is its Jacobian.

Currently, NonlinearSolve.jl only allows for a fixed \eta_k=\eta, specified through the linsolve keyword, eg,

solve(prob, NewtonRaphson(linsolve=KrylovJL_MINRES(rtol=η))

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?

2 Likes

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.

3 Likes