-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Removing Allocation for Inexact Jacobian #266
Conversation
Codecov Report
@@ Coverage Diff @@
## master #266 +/- ##
===========================================
- Coverage 93.04% 40.40% -52.64%
===========================================
Files 19 19
Lines 1796 1767 -29
===========================================
- Hits 1671 714 -957
- Misses 125 1053 +928
... and 16 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
src/pseudotransient.jl
Outdated
if J isa SciMLBase.AbstractSciMLOperator | ||
J = J - (1 / alpha) * I | ||
else | ||
J .= J - (1 / alpha) * I |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still allocates. Use the same flow as https://github.com/SciML/OrdinaryDiffEq.jl/blob/master/src/derivative_utils.jl#L494-L503
This PR make sure that we don't allocate memory when computing the inexact Jacobian for PT methods. Instead, we just overwrite the jacobian that is already allocated. @avik-pal @ChrisRackauckas