Skip to content

Commit 7452f5a

Browse files
committed
Add tests
1 parent c47e25f commit 7452f5a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/nonlinearsystem.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,14 @@ connected = NonlinearSystem([s ~ a + lorenz1.x
9595
lorenz1.F ~ lorenz2.u
9696
lorenz2.F ~ lorenz1.u], [s, a], [], systems=[lorenz1,lorenz2])
9797
@test_nowarn alias_elimination(connected)
98+
99+
# system promotion
100+
using OrdinaryDiffEq
101+
@variables t
102+
D = Differential(t)
103+
@named subsys = toodesystem(lorenz1, t)
104+
@named sys = ODESystem([D(subsys.x) ~ subsys.x + subsys.x], t, systems=[subsys])
105+
sys = structural_simplify(sys)
106+
prob = ODEProblem(sys, [subsys.x => 1, subsys.z => 2.0], (0, 1.0), [subsys.σ=>1,subsys.ρ=>2,subsys.β=>3])
107+
sol = solve(prob, Rodas5())
108+
@test sol[subsys.x] + sol[subsys.y] - sol[subsys.z] sol[subsys.u]

0 commit comments

Comments
 (0)