RJDennis / NLboxsolve.jl

A Julia package to solve box-constrained systems of non-linear equations and mixed complementarity problems.
MIT License
9 stars 2 forks source link

Restarted GMRES did not converge #17

Closed khorrami1 closed 2 years ago

khorrami1 commented 2 years ago

Hi,

I am using NLboxsolve to solve my nonlinear system equations through JFNK: sol = nlboxsolve(f, x, xtol=1e-6, ftol=1e-6, maxiters=10, method=:jfnk, sparsejac=:yes,krylovdim=50)

, but I got the error message: "ERROR: Restarted GMRES did not converge". My question is how I can change the arguments of GMRES, e.g. tolerance and maximum iterations.

As a suggestion, it would be great to add show_trace in this package to see what happens during iterations.

Thank you in advance, Mohammad

RJDennis commented 2 years ago

Adding a show_trace is a good idea. Were you able to get your problem to solve using any of the other solvers? Also, does changing the value for krylovdim help? At the moment I don't have a nice way for the user to access the arguments of GMRES from the nlboxsolve function. Maybe I need to add a separate function just for the Newton Krylov methods that exposes those options.

RJDennis commented 2 years ago

I've added a solver trace to the solution results in version 0.3.4.

khorrami1 commented 2 years ago

Many thanks for the update.

khorrami1 commented 2 years ago

Adding a show_trace is a good idea. Were you able to get your problem to solve using any of the other solvers? Also, does changing the value for krylovdim help? At the moment I don't have a nice way for the user to access the arguments of GMRES from the nlboxsolve function. Maybe I need to add a separate function just for the Newton Krylov methods that exposes those options.

I think my problem has issue.