-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Cannot resize DDE problem using resize! #268
Comments
Additionally, while here, is there means to resize the history function when resizing the system? Otherwise the new system component will lack initial conditions. If there is not I will open this as a separate issue. |
I just quickly tried an ODE version of your example (replacing |
Yeah while debugging last night it seemed to be an issue with the cache macro in OrdinaryDiffEq. Changing the algorithm to BS3() or Euler() and we get the same issue, seems it's not defined for ConstantCache of any method. |
Interestingly if we define a work-around
we get a similar error further down the
|
This made we wonder if resizing DDE systems is a capability we have yet in DelayDiffEq.jl? Do we have examples that work I could copy from? |
Sure, in principle it works and is tested here: https://github.com/SciML/DelayDiffEq.jl/blob/bdc2887f755812102533c699afdfadd356c7a155/test/integrators/cache.jl I wonder if it's only supposed to work (by design in OrdinaryDiffEq) for in-place problems though. |
Thanks, that's helpful. I'm still not sure how we're supposed to handle the history function when resizing the problem? Aware this is now tangential so happy to move this to the Julia forum or open another issue. Adapting the above code to a problem with a delay, when I specify the size of the history function a priori to be the size of my final re-sized system the code executes:
however sol.u reveals what appears to be an incorrect solution. As the equation is autonomous I expect the dynamics of the newly added element to be the same as the first, just starting at t = 5
However we get lots of values of order e-315. I'm not sure where these come from, maybe something accessing a vector initialised with undef? |
Okay, for some reason I was getting errors to do with the size of the |
I cannot resize a DDE problem using callbacks. I would appreciate if someone could check if they can replicate the error, please.
MWE:
Stacktrace:
The text was updated successfully, but these errors were encountered: