-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Creating BVProblem
from ODESystem
#3251
base: master
Are you sure you want to change the base?
Conversation
for some reason trying to solve the BVProblem constructed from the Lorenz IVP with MIRK4() is not respecting the boundary conditions (the u[1] is something like [0.911, -0.073, 0.001] instead of [1., 0., 0.]). Not sure if this bug is in the way I'm constructing the problem |
Lorenz will be a very difficult one to solve because the BVP solver is going to correct global error rather than local, and getting good global error on a chaotic system is almost impossible 😅. Switch to something like Lotka Volterra. |
This looks right. How does it do? |
Getting there, but I'm getting this error when I try to solve the pendulum out-of-place BVP (it doesn't happen for the Lotka-Volterra out-of-place BVP).
|
Seems like it's reinterpreting the array but I can't figure out why |
Reinterpreting which array? |
I'm not sure which array this corresponds to, but it looks like this line is returning |
@ChrisRackauckas Think this should be ready now. I was looking totally in the wrong place, the bug was just that |
@inline function SymbolicUtils.Code.create_array( | ||
::Type{<:Base.ReinterpretArray}, T, ::Val{1}, ::Val{dims}, elems...) where {dims} | ||
T[elems...] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is piracy. Why is there a ReinterpretArray in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't understood the internals well enough to really know what's going on but fetching from the DiffCache is returning a ReinterpretArray
of Dual numbers in the line I linked above. Should that not happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that would cause a reinterpret array. Okay, upstream this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant this bit of code should go to SymbolicUtils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah whoops
WIP PR for the BVProblem conversion.