-
Notifications
You must be signed in to change notification settings - Fork 8
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
What would it take to support adaptive time step integration? #518
Comments
The minimal error one is probably perfectly fine to use. We would have to output a vector of timesteps as well since the timestep is now variable.
…On April 20, 2020 9:44:03 AM EDT, Srinivas Gorur-Shandilya ***@***.***> wrote:
# Why?
It can massively increase performance, possibly ~100X of what it is now
# How?
There are various complex means of solving ODEs using adaptive time
steps, but a simple one could work as follows:
- define some maximum delta V that is acceptable over a time step
- integrate with some test step size h
- if delta V is smaller than acceptable limit, accept integration,
increase h, and carry on
- if it is bigger than the limit, rewind to previous state, decrease h,
and repeat.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#518
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Yes. and every single component has to be modified because it has to keep track of two states... or, since the ODEs are time-reversible, i wonder what happens if you set dt to a negative value? Don't you go backwards in time? |
ODEs are time-reversible. Setting dt to negative will cause you to
progress backwards in time, however since you are approximating the
derivative at a new time point with new state variables, I am doubtful
you will get back to exactly the same state as before. That is to say, I
*think* there will still be error.
…On 2020-04-20 7:28 pm, Srinivas Gorur-Shandilya wrote:
Yes. and every single component has to be modified because it has to
keep track of two states...
or, since the ODEs are time-reversible, i wonder what happens if you
set dt to a negative value? Don't you go backwards in time?
--
You are receiving this because you commented.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
Links:
------
[1] #518 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/AHGXS3RQDFQHFEGPCWPM3RLRNSA2VANCNFSM4MMOPC3Q
|
But I think you're correct; the best way to do this is to have new variables for each state variable that keep track of the state variable at the last integrated time point. So for instance, a conductance would have |
Why?
It can massively increase performance, possibly ~100X of what it is now
How?
There are various complex means of solving ODEs using adaptive time steps, but a simple one could work as follows:
The text was updated successfully, but these errors were encountered: