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

Save all results in SavingCallback #1825

Closed
visr opened this issue Sep 19, 2024 · 0 comments · Fixed by #1829
Closed

Save all results in SavingCallback #1825

visr opened this issue Sep 19, 2024 · 0 comments · Fixed by #1829
Labels
core Issues related to the computational core in Julia improvement Improvements of the usability of existing functionality

Comments

@visr
Copy link
Member

visr commented Sep 19, 2024

Right now we use a combination of the SavingCallback and the saveat that goes into solve/init and hence into the integrator.sol. For the latter we need to take extra care that sol.t matches exactly the times that the SavingCallback is called. For instance to avoid duplicate t, we need to set save_positions in callbacks.

It is probably simpler to just do all saving with SavingCallbacks instead, so it is more consistent. Also we wouldn't store e.g. the PidControl error state that we don't currently use.

https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/#CommonSolve.solve-Tuple%7BSciMLBase.AbstractDEProblem,%20Vararg%7BAny%7D%7D

@visr visr added core Issues related to the computational core in Julia improvement Improvements of the usability of existing functionality labels Sep 19, 2024
@visr visr closed this as completed in 1114838 Sep 23, 2024
visr pushed a commit that referenced this issue Oct 10, 2024
This is a follow up of #1825
(and a few unrelated experiments).

Fixes #1837.

Other changes in this PR:
- Storages from the cumulative flows are computed as a sparse
matrix-vector product
- Storage rates are computed without involving the initial storage
- Manning resistance is more stable around $\Delta h = 0$.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues related to the computational core in Julia improvement Improvements of the usability of existing functionality
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant