diff --git a/src/systems/diffeqs/abstractodesystem.jl b/src/systems/diffeqs/abstractodesystem.jl index f79859da57..d9ca7b6552 100644 --- a/src/systems/diffeqs/abstractodesystem.jl +++ b/src/systems/diffeqs/abstractodesystem.jl @@ -912,6 +912,10 @@ function DiffEqBase.ODEProblem(sys::AbstractODESystem, args...; kwargs...) ODEProblem{true}(sys, args...; kwargs...) end +function DiffEqBase.ODEProblem(sys::AbstractODESystem, u0map::StaticArray, args...; kwargs...) + ODEProblem{false, SciMLBase.FullSpecialize}(sys, u0map, args...; kwargs...) +end + function DiffEqBase.ODEProblem{true}(sys::AbstractODESystem, args...; kwargs...) ODEProblem{true, SciMLBase.AutoSpecialize}(sys, args...; kwargs...) end diff --git a/test/static_arrays.jl b/test/static_arrays.jl index 2bc403fb5d..0c76303ce4 100644 --- a/test/static_arrays.jl +++ b/test/static_arrays.jl @@ -1,4 +1,4 @@ -using Catalyst, StaticArrays, Test +using ModelingToolkit, StaticArrays, Test @parameters σ ρ β @variables t x(t) y(t) z(t) @@ -21,7 +21,8 @@ p = @SVector [σ => 28.0, β => 8 / 3] tspan = (0.0, 100.0) -prob_mtk = ODEProblem{false, SciMLBase.FullSpecialize}(sys, u0, tspan, p) +prob_mtk = ODEProblem(sys, u0, tspan, p) +@test !SciMLBase.isinplace(prob_mtk) @test prob_mtk.u0 isa SArray @test prob_mtk.p isa SArray