SciML / NonlinearSolve.jl

High-performance and differentiation-enabled nonlinear solvers (Newton methods), bracketed rootfinding (bisection, Falsi), with sparsity and Newton-Krylov support.
https://docs.sciml.ai/NonlinearSolve/stable/
MIT License
226 stars 40 forks source link

Gauss Newton & LM Robustness Fixes #258

Closed avik-pal closed 10 months ago

avik-pal commented 10 months ago

Merge after #257

For GaussNewton defaults to QRFactorization(ColumnNorm()), to ensure we can directly solve for $$J \delta x = -f(x)$$

For LM we solve

$$ \begin{bmatrix} J\ \lambda D^TD \end{bmatrix} v = \begin{bmatrix} -f(x)\ 0 \end{bmatrix} $$

codecov[bot] commented 10 months ago

Codecov Report

Merging #258 (28ea63a) into master (b300050) will decrease coverage by 2.02%. The diff coverage is 98.43%.

@@            Coverage Diff             @@
##           master     #258      +/-   ##
==========================================
- Coverage   94.48%   92.47%   -2.02%     
==========================================
  Files          18       18              
  Lines        1614     1687      +73     
==========================================
+ Hits         1525     1560      +35     
- Misses         89      127      +38     
Files Coverage Δ
src/broyden.jl 87.17% <100.00%> (-12.83%) :arrow_down:
src/default.jl 78.48% <ø> (+1.26%) :arrow_up:
src/gaussnewton.jl 79.45% <100.00%> (+3.26%) :arrow_up:
src/klement.jl 85.29% <100.00%> (-7.78%) :arrow_down:
src/lbroyden.jl 90.40% <100.00%> (-7.98%) :arrow_down:
src/levenberg.jl 98.81% <100.00%> (+0.35%) :arrow_up:
src/raphson.jl 100.00% <100.00%> (ø)
src/jacobian.jl 85.71% <90.00%> (-1.25%) :arrow_down:
src/utils.jl 84.50% <88.88%> (+0.17%) :arrow_up:

... and 2 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

ChrisRackauckas commented 10 months ago

This needs a rebase?

avik-pal commented 10 months ago

I am really unsure what to do with the Broyden/Klement failures. They fail on 1.9 but magically pass on 1.10

avik-pal commented 10 months ago

@ChrisRackauckas I am disabling the Broyden and Klement 23 test problem tests. I will open and issue and we can deal with it later. No reason to hold off this PR which solves a completely tangential issue