From b31928a3ffd836ad0a9df47b72bc39946081ecd2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 27 Feb 2024 01:47:39 -0600 Subject: [PATCH] format --- test/downstream/ensemble_multi_prob.jl | 6 +++--- test/downstream/integrator_indexing.jl | 11 ++++++----- test/downstream/problem_interface.jl | 2 +- test/downstream/solution_interface.jl | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/downstream/ensemble_multi_prob.jl b/test/downstream/ensemble_multi_prob.jl index de27acd84..0ad6d49c3 100644 --- a/test/downstream/ensemble_multi_prob.jl +++ b/test/downstream/ensemble_multi_prob.jl @@ -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)) diff --git a/test/downstream/integrator_indexing.jl b/test/downstream/integrator_indexing.jl index 448bd19a0..9dce8332e 100644 --- a/test/downstream/integrator_indexing.jl +++ b/test/downstream/integrator_indexing.jl @@ -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] @@ -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, @@ -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) diff --git a/test/downstream/problem_interface.jl b/test/downstream/problem_interface.jl index 1f245b3c7..bdb43ad37 100644 --- a/test/downstream/problem_interface.jl +++ b/test/downstream/problem_interface.jl @@ -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, diff --git a/test/downstream/solution_interface.jl b/test/downstream/solution_interface.jl index ea4eff21d..8e335a139 100644 --- a/test/downstream/solution_interface.jl +++ b/test/downstream/solution_interface.jl @@ -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]