Skip to content

Commit

Permalink
test: fix odesystem callable parameter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Sep 19, 2024
1 parent 2bed81c commit 7579312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/odesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ eqs = [D(x) ~ σ(t - 1) * (y - x),
D(y) ~ x *- z) - y,
D(z) ~ x * y - β * z * κ]
@named de = ODESystem(eqs, t)
test_diffeq_inference("single internal iv-varying", de, t, (x, y, z), (σ(t - 1), ρ, β))
test_diffeq_inference("single internal iv-varying", de, t, (x, y, z), (σ, ρ, β))
f = eval(generate_function(de, [x, y, z], [σ, ρ, β])[2])
du = [0.0, 0.0, 0.0]
f(du, [1.0, 2.0, 3.0], [x -> x + 7, 2, 3], 5.0)
@test du [11, -3, -7]

eqs = [D(x) ~ x + 10σ(t - 1) + 100σ(t - 2) + 1000σ(t^2)]
@named de = ODESystem(eqs, t)
test_diffeq_inference("many internal iv-varying", de, t, (x,), (σ(t - 2), σ(t^2), σ(t - 1)))
test_diffeq_inference("many internal iv-varying", de, t, (x,), (σ,))
f = eval(generate_function(de, [x], [σ])[2])
du = [0.0]
f(du, [1.0], [t -> t + 2], 5.0)
Expand Down

0 comments on commit 7579312

Please sign in to comment.