-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Symbolic save_idxs
first pass
#2052
Conversation
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.
Should save_idxs
be handled in the solver or DiffEqBase?
Do you mean that this should be a kwarg to |
This is working, with the other Base PR - this is the simplest change that works, but I am open to other suggestions. The trouble is getting the observed functions to work when they are constructed to expect all states at @ChrisRackauckas see this for answer to your question, how to avoid dummy arrays? |
e => 1.0])) | ||
sys = structural_simplify(sys) | ||
prob = ODEProblem(sys, [], (0, 1.0)) | ||
prob_sym = ODEProblem(sys, [], (0, 1.0), save_idxs = [a, b, d]) |
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.
It would be a breaking change to move this to the problem instead of solve. Also, I don't get why it "should" be here. It makes it hard to re-solve and just save something else. Why should it be in the problem than in the solve?
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.
see above for my concerns
If you do it in the solver though, how are you doing the interpolations? |
I thought that the interpolations were over time rather than idx, so we'd be able to use the same setup. When are the interpolations constructed? |
They are constructed during the solve, but only for the states. So if you're planning to extend the |
Only solvers like BDF can handle that, because the underlaying interpolant doesn't depend on |
My apologies, I'm not familiar with the shorthand |
They are required to form the dense output. See section 4 of https://www.sciencedirect.com/science/article/pii/S0898122111004706 |
The states are not in general linked in any kind of spatial configuration during an ODE solve, and appear only to be linked by the calculation of the truncation error in that paper. I am unsure whether it is possible to ignore the contribution of the unsaved states to the truncation error, but regardless this is the only thing that might be changed by changing the saved states, unless I'm missing something. Meaning I don't think that the calculation of the |
But if you make |
save_idxs having an observable is at the moment just automatically saving its state dependencies as a first pass |
superseded by #2071 |
No description provided.