Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Feb 27, 2024
1 parent 14b8690 commit b31928a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions test/downstream/ensemble_multi_prob.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
@variables x(t), y(t)

@mtkbuild sys1 = ODESystem([D(x) ~ x,
D(y) ~ -y],t)
D(y) ~ -y], t)
@mtkbuild sys2 = ODESystem([D(x) ~ 2x,
D(y) ~ -2y],t)
D(y) ~ -2y], t)
@mtkbuild sys3 = ODESystem([D(x) ~ 3x,
D(y) ~ -3y],t)
D(y) ~ -3y], t)

prob1 = ODEProblem(sys1, [1.0, 1.0], (0.0, 1.0))
prob2 = ODEProblem(sys2, [2.0, 2.0], (0.0, 1.0))
Expand Down
11 changes: 6 additions & 5 deletions test/downstream/integrator_indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
eqs = [D(s1) ~ a * s1 / (1 + s1 + s2) - b * s1,
D(s2) ~ +c * s2 / (1 + s1 + s2) - d * s2]

@named population_model = ODESystem(eqs,t)
@named population_model = ODESystem(eqs, t)

# Tests on ODEProblem.
u0 = [s1 => 2.0, s2 => 1.0]
Expand Down Expand Up @@ -126,14 +126,15 @@ eqs = [D(x) ~ σ * (y - x),
D(y) ~ x *- z) - y,
D(z) ~ x * y - β * z]

@named lorenz1 = ODESystem(eqs,t)
@named lorenz2 = ODESystem(eqs,t)
@named lorenz1 = ODESystem(eqs, t)
@named lorenz2 = ODESystem(eqs, t)

@parameters γ
@variables a(t) α(t)
connections = [0 ~ lorenz1.x + lorenz2.y + a * γ,
α ~ 2lorenz1.x + a * γ]
@mtkbuild sys_simplified = ODESystem(connections, t, [a, α], [γ], systems = [lorenz1, lorenz2])
@mtkbuild sys_simplified = ODESystem(
connections, t, [a, α], [γ], systems = [lorenz1, lorenz2])
sys_simplified = complete(structural_simplify(sys))

u0 = [lorenz1.x => 1.0,
Expand Down Expand Up @@ -197,7 +198,7 @@ integrator2 = init(prob2, Tsit5())
@variables u(t)
eqs = [D(u) ~ u]

@mtkbuild sys2 = ODESystem(eqs,t)
@mtkbuild sys2 = ODESystem(eqs, t)

tspan = (0.0, 5.0)

Expand Down
2 changes: 1 addition & 1 deletion test/downstream/problem_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ eqs = [D(D(x)) ~ σ * (y - x),
D(y) ~ x *- z) - y,
D(z) ~ x * y - β * z]

@mtkbuild sys = ODESystem(eqs,t)
@mtkbuild sys = ODESystem(eqs, t)

u0 = [D(x) => 2.0,
x => 1.0,
Expand Down
2 changes: 1 addition & 1 deletion test/downstream/solution_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
eqs = [D(s1) ~ a * s1 / (1 + s1 + s2) - b * s1,
D(s2) ~ +c * s2 / (1 + s1 + s2) - d * s2]

@mtkbuild population_model = ODESystem(eqs,t)
@mtkbuild population_model = ODESystem(eqs, t)

# Tests on ODEProblem.
u0 = [s1 => 2.0, s2 => 1.0]
Expand Down

0 comments on commit b31928a

Please sign in to comment.