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

Added reinit! for NewtonRaphson #173

Closed dawbarton closed 1 year ago

dawbarton commented 1 year ago

The reinit! interface for the nonlinear solvers is missing, meaning that the iterator interface cannot be used. I have added the reinit! function for the NewtonRaphsonCache which re-evaluates the nonlinear function and resets iteration counters. Simple tests are included.

codecov[bot] commented 1 year ago

Codecov Report

Merging #173 (cf1486f) into master (85b94ac) will increase coverage by 0.35%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   84.22%   84.58%   +0.35%     
==========================================
  Files           7        7              
  Lines         558      571      +13     
==========================================
+ Hits          470      483      +13     
  Misses         88       88              
Impacted Files Coverage Δ
src/raphson.jl 97.26% <100.00%> (+0.59%) :arrow_up:

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