You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
VectorOfArray was extended to multi-dimensional parent arrays in #357. However, these arrays don't work with all solvers in OrdinaryDiffEq.jl (for example, SSPRK43).
using OrdinaryDiffEq, RecursiveArrayTools
functionrhs!(duu::VectorOfArray, uu::VectorOfArray, p, t)
du =parent(duu)
u =parent(uu)
du .= u
end
u =fill(SVector{2}(ones(2)), 2, 3)
ode =ODEProblem(rhs!, VectorOfArray(u), (0.0, 1.0))
integrator =init(ode, SSPRK43())
The error above is due to the fact that for u::VectorOfArray, zero.(u) returns a VectorOfArray whose parent array is a Vector. For VectorOfArray with multi-dimensional parents, the broadcast should ideally respect the dimension of the parent array.
Additional context
I'm looking at this now, but I'm not the most experienced with broadcast. If anyone has any suggestions on where to start and/or how to implement, I'd welcome them.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
VectorOfArray
was extended to multi-dimensional parent arrays in #357. However, these arrays don't work with all solvers in OrdinaryDiffEq.jl (for example,SSPRK43
).The error happens during the call to
integrator = init(ode, SSPRK43())
, specifically this line: https://github.com/SciML/OrdinaryDiffEq.jl/blob/1f2e058c14d2a5c997bf7d5f055cebfb406cbc1b/src/initdt.jl#L51. An MWE isThe manually truncated stacktrace is
Describe the solution you’d like
The error above is due to the fact that for
u::VectorOfArray
,zero.(u)
returns aVectorOfArray
whose parent array is aVector
. ForVectorOfArray
with multi-dimensional parents, the broadcast should ideally respect the dimension of the parent array.Additional context
I'm looking at this now, but I'm not the most experienced with broadcast. If anyone has any suggestions on where to start and/or how to implement, I'd welcome them.
The text was updated successfully, but these errors were encountered: