[Fix]: NewtonRaphsonSolver convergence check and error handling#1285
Conversation
Signed-off-by: Ady0333 <adityashinde1525@gmail.com>
|
Hello @JordiManyer , @Antoinemarteau and @oriolcg !!! Please review this pr and let me know if any changes are needed... ~Thanks |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1285 +/- ##
=======================================
Coverage 88.82% 88.82%
=======================================
Files 227 227
Lines 29753 29753
=======================================
Hits 26429 26429
Misses 3324 3324
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks @Ady0333 for the contribution. Changes look good, please update NEWS.md so that I can merge. This PR could have been bundled with the other one, it's addressing the same kind of things. Also, kindly stop tagging everyone when you open a PR. People have their own lives and our inboxes are already quite full. When you leave a PR, someone will eventually look into it. Unless your PR has been sitting without response for over a week, it is really not necessary. |
Signed-off-by: Ady0333 <adityashinde1525@gmail.com>
Thanks for the review. I have updated the NEWS.md and will make sure not to tag anyone...apologies for that!!! |
Summary
Fixes #1284
Two related fixes for NewtonRaphsonSolver:
@unreachablewith informative error messageChanges
In
src/Algebra/NLSolvers.jl:Line 81 - Initial check:
Line 67 - Non-convergence handling:
Behavior
Before:
m < tol*m0unsatisfiable whenm0 ≈ 0After:
Testing
Tested with Newton starting at exact solution (zero residual):
All existing Gridap tests pass.
Related
Related to #1282 - part of broader Newton solver convergence testing