-
Notifications
You must be signed in to change notification settings - Fork 5
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
Introduce custom TrapezoidIntegrationCallback
to integrate flows and basin forcings
#1468
Conversation
A drawback of the current way flows and basin forcings are computed is that a vector for all these values is allocated at each timestep, while they are averaged over the The |
I just realized I made a wrong assumption about how The problem with this is that we don't know the value of the integrand at these in between points, at least not without calling |
IntegratingCallback
to integrate flows and basin forcingsTrapezoidIntegrationCallback
to integrate flows and basin forcings
Although this was a fun dive into creating a custom callback, it didn't reach its goal, namely reducing the complexity of the integration code. |
Fixes #1473.
To do:
TrapezoidIntegrandAffect.integrand_value
inupdate_basin!
for integrands that contain the basin forcings (both for flow integration and bmi integration)TrapezoidIntegrandAffect.integrand_value_prev
can be removed, if the integration is done in this order: