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
239 stars 42 forks source link

Enable iterator interface to be used with TrustRegion #174

Closed dawbarton closed 1 year ago

dawbarton commented 1 year ago

Similar to #173, this adds the reinit! interface for the TrustRegion algorithm, along with associated tests.

I've been through the trust region code quite carefully and pulled out all the variables that need reinitialising.

I also fixed a typo in the default arguments of reinit! for NewtonRaphsonCache.

dawbarton commented 1 year ago

I didn't spot some whitespace changes have crept in when I committed. I'll revert those.

codecov[bot] commented 1 year ago

Codecov Report

Merging #174 (160dd84) into master (f58c1e1) will increase coverage by 0.49%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
+ Coverage   84.58%   85.08%   +0.49%     
==========================================
  Files           7        7              
  Lines         571      590      +19     
==========================================
+ Hits          483      502      +19     
  Misses         88       88              
Impacted Files Coverage Δ
src/raphson.jl 97.26% <100.00%> (ø)
src/trustRegion.jl 78.78% <100.00%> (+2.25%) :arrow_up:

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