Skip to content

Commit deb05c5

Browse files
fix!: require explicit independent variable for ODESystem
1 parent 32f6980 commit deb05c5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/ModelingToolkit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const D = Differential(t)
192192
PrecompileTools.@compile_workload begin
193193
using ModelingToolkit
194194
@variables x(ModelingToolkit.t_nounits)
195-
@named sys = ODESystem([ModelingToolkit.D_nounits(x) ~ -x])
195+
@named sys = ODESystem([ModelingToolkit.D_nounits(x) ~ -x], ModelingToolkit.t_nounits)
196196
prob = ODEProblem(structural_simplify(sys), [x => 30.0], (0, 100), [], jac = true)
197197
end
198198

src/systems/diffeqs/odesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function ODESystem(deqs::AbstractVector{<:Equation}, iv, dvs, ps;
230230
metadata, gui_metadata, checks = checks)
231231
end
232232

233-
function ODESystem(eqs, iv = nothing; kwargs...)
233+
function ODESystem(eqs, iv; kwargs...)
234234
eqs = scalarize(eqs)
235235
# NOTE: this assumes that the order of algebraic equations doesn't matter
236236
diffvars = OrderedSet()

src/systems/systems.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function System(eqs::AbstractVector{<:Equation}, iv = nothing, args...; name = nothing,
1+
function System(eqs::AbstractVector{<:Equation}, iv, args...; name = nothing,
22
kw...)
33
ODESystem(eqs, iv, args...; name, kw..., checks = false)
44
end

0 commit comments

Comments
 (0)