-
-
Couldn't load subscription status.
- Fork 79
use OrdinaryDiffEq's DAE initialization. #401
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
Conversation
|
Add a test? I don't see how this works, and it doesn't disable the IDA initialization. |
|
yeah, I wasn't sure what to do about the IDA initialization. The options I see are to add it as it's own initialization that can be used by anyone, stop using it entirely, or something else. Thoughts? |
|
This is now much closer to working. Tests still seem to be failing though. Something is slightly off. |
|
Rebase and add tests |
|
This is almost ready. The remaining problem is that the OrdinaryDIffEq |
|
The test failure looks real |
Codecov Report
@@ Coverage Diff @@
## master #401 +/- ##
==========================================
+ Coverage 80.21% 81.31% +1.09%
==========================================
Files 11 11
Lines 1466 1472 +6
==========================================
+ Hits 1176 1197 +21
+ Misses 290 275 -15
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
test added. |
| function handle_callback_modifiers!(integrator::IDAIntegrator) | ||
| IDAReInit(integrator.mem, integrator.t, integrator.u, integrator.du) | ||
| DiffEqBase.initialize_dae!(integrator) | ||
| DiffEqBase.initialize_dae!(integrator, IDADefaultInit()) |
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.
why the default here?
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.
I thought that after a callback the default initialization was the one we wanted. Is it not?
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.
I don't recall if it was using the user-chosen one or the default.
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.
OrdinaryDIffEq just calls integrator.reeval_fsal = true here. Previously, Sundials would just call DiffEqBase.initialize_dae!(integrator) which is now spelled DiffEqBase.initialize_dae!(integrator, IDADefaultInit()) (since now the initialization is customizable.
|
Can we merge this? |
|
It's missing the lower bound bump. |
|
version bumped. |
|
It looks like your test case fails? |
Sundials.jl got an implementation of the OrdinaryDiffEq DAE initialization interface in SciML#401. Unfortunately, it turns out that this doesn't quite work, because the u/du in Sundials' integrator struct are not the actual memory that IDA uses (it has an internal copy). In [1], I propose re-using `u_modified` to inform us that the shadow copy was modified during initialization. This is the Sundials side of that interface. [1] SciML/OrdinaryDiffEq.jl#1969
Sundials.jl got an implementation of the OrdinaryDiffEq DAE initialization interface in SciML#401. Unfortunately, it turns out that this doesn't quite work, because the u/du in Sundials' integrator struct are not the actual memory that IDA uses (it has an internal copy). In [1], I propose re-using `u_modified` to inform us that the shadow copy was modified during initialization. This is the Sundials side of that interface. [1] SciML/OrdinaryDiffEq.jl#1969
Sundials.jl got an implementation of the OrdinaryDiffEq DAE initialization interface in SciML#401. Unfortunately, it turns out that this doesn't quite work, because the u/du in Sundials' integrator struct are not the actual memory that IDA uses (it has an internal copy). In [1], I propose re-using `u_modified` to inform us that the shadow copy was modified during initialization. This is the Sundials side of that interface. [1] SciML/OrdinaryDiffEq.jl#1969
Sundials.jl got an implementation of the OrdinaryDiffEq DAE initialization interface in #401. Unfortunately, it turns out that this doesn't quite work, because the u/du in Sundials' integrator struct are not the actual memory that IDA uses (it has an internal copy). In [1], I propose re-using `u_modified` to inform us that the shadow copy was modified during initialization. This is the Sundials side of that interface. [1] SciML/OrdinaryDiffEq.jl#1969
This allows for custom initialization functions when using
IDA.