Skip to content
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

Specialize Base.similar for VectorOfArray with multidimensional parent #359

Merged
merged 10 commits into from
Feb 22, 2024
11 changes: 11 additions & 0 deletions test/upstream.jl → test/downstream/odesolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ end
ArrayPartition(zeros(1), [0.75])),
(0.0, 1.0)),
Rodas5()).retcode == ReturnCode.Success

function rhs!(duu::VectorOfArray, uu::VectorOfArray, p, t)
du = parent(duu)
u = parent(uu)
du .= u
end

u = fill(SVector{2}(ones(2)), 2, 3)
jlchan marked this conversation as resolved.
Show resolved Hide resolved
ode = ODEProblem(rhs!, VectorOfArray(u), (0.0, 1.0))
sol = solve(ode, Tsit5())
@test SciMLBase.successful_retcode(sol)
Loading