-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Allowing affect!
to set values on a time interval instead of at a time point
#245
Comments
I am not sure this is going to be possible. I can see why you'd want that for a DDE solver, but by the design the history needs to be "correct". You would need to set the |
Hi Chris, nice to see your response. This may be a relatively niche feature need. I can relax the requirement on the accuracy of such "history" by only adding new particles at the edge of a moving (box or sphere) frame with a particle centred at the origin. High accuracy is required only for those particles near the center of this frame so that the code can simulate the long-term behaviour of one particle without frequently enter-/exiting the computation domain. The inaccuracy due to edge particles shall be comparatively tolerable.
Thanks again and I can understand this may not be a wide-spread need from users, but it can definitely help understand N-body particle dynamics. |
The history though is the solution object. You cannot modify the history without changing the actual solution.
I think what you're saying then is what you want to do is |
I try to preallocate more variables than the initial particles need with these abundant variable values set to be NaN. Can I get rid of too frequent reinit the ODE system in this way? Of course the solution itself is allowed to change for this purpose. |
That would likely cause an issue in the adaptivity. But if you pass a non-standard |
Is your feature request related to a problem? Please describe.
Hi, everyone, DifferentialEquations.jl is awesome and efficient. I am trying to implement an
affect!
function to set valuesu[i]
on a time interval instead of a single time point so that the delay differential equation module can work when I introduce, during integration, new particles whose history can be set by the callback function. Thanks a lot if you can consider making it possible to allow anaffect!
function to influence the state values of an integrator on a time interval, or if you have any other elegant workarounds to solving this.Describe the solution you’d like
Instead of setting values only at one time point by a usual
affect!
function,set its values for a whole time interval:
Describe alternatives you’ve considered
Repeatedly invoke a one-time
affect!
in the time interval, but this probably has too much overhead.The text was updated successfully, but these errors were encountered: