Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements for Broyden and Klement #303

Merged
merged 11 commits into from
Dec 7, 2023

Conversation

avik-pal
Copy link
Member

@avik-pal avik-pal commented Dec 5, 2023

See JuliaNLSolvers/NLsolve.jl#287

Needs #297 to go in first

Fixes #260

Summary

  1. Broyden and Klement can (re-)start with the true (inv-)jacobian if asked for
  2. For Broyden, it improves robustness but makes Klement even more unstable for ill-conditioned problems
  3. Klement with identity initialization makes the Jacobian always diagonal; the updated solver exploits this and is significantly faster
  4. Klement for non-diagonal jacobians resets the jacobian if the jacobian is "too" ill-conditioned; this improves the stability somewhat
  5. Bad Broyden Update Rule
  6. Klement with true jacobian diagonal initialization
  7. Initial Scaling factor to improve stability

TODOs

  • Diagonal Update Rule for Broyden
  • Exciting Mixing Update Rule for Broyden
  • Testing

@avik-pal avik-pal force-pushed the ap/better_init branch 2 times, most recently from b7a1ef8 to 50daa20 Compare December 6, 2023 16:08
@avik-pal avik-pal changed the title True Jacobian Initialization for Broyden and Klement Improvements for Broyden and Klement Dec 6, 2023
@avik-pal avik-pal mentioned this pull request Dec 6, 2023
2 tasks
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 44 lines in your changes are missing coverage. Please review.

Comparison is base (021901e) 88.01% compared to head (c4bde4d) 86.08%.
Report is 2 commits behind head on master.

Files Patch % Lines
src/utils.jl 69.87% 25 Missing ⚠️
src/broyden.jl 90.27% 7 Missing ⚠️
src/klement.jl 91.25% 7 Missing ⚠️
src/trace.jl 25.00% 3 Missing ⚠️
src/NonlinearSolve.jl 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #303      +/-   ##
==========================================
- Coverage   88.01%   86.08%   -1.94%     
==========================================
  Files          21       21              
  Lines        1669     1825     +156     
==========================================
+ Hits         1469     1571     +102     
- Misses        200      254      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avik-pal avik-pal force-pushed the ap/better_init branch 2 times, most recently from 9b164e2 to eb26276 Compare December 7, 2023 04:16
@avik-pal
Copy link
Member Author

avik-pal commented Dec 7, 2023

This should be good as well!

@ChrisRackauckas ChrisRackauckas merged commit b853842 into SciML:master Dec 7, 2023
8 of 12 checks passed
@avik-pal avik-pal deleted the ap/better_init branch December 7, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Exciting-Mixing, Scalar and Diagonal Broyden approximations
2 participants