|
3 | 3 | ### Prepares Tests ###
|
4 | 4 |
|
5 | 5 | # Fetch packages.
|
6 |
| -using Catalyst, LinearAlgebra, OrdinaryDiffEqTsit5, SciMLNLSolve, Test |
| 6 | +using Catalyst, LinearAlgebra, OrdinaryDiffEqTsit5, NonlinearSolve, Test |
7 | 7 | using ModelingToolkit: nameof, getname
|
8 | 8 |
|
9 | 9 | # Sets the default `t` to use.
|
|
103 | 103 | sys2 = structural_simplify(nlrepressilator)
|
104 | 104 | @test length(equations(sys2)) <= 6
|
105 | 105 | nlprob = NonlinearProblem(sys2, u₀_nl, pvals)
|
106 |
| - sol = solve(nlprob, NLSolveJL(), abstol = 1e-9) |
| 106 | + sol = solve(nlprob; abstol = 1e-9) |
107 | 107 | @test sol[sys₁.P] ≈ sol[sys₂.P] ≈ sol[sys₃.P]
|
108 | 108 | @test sol[sys₁.m] ≈ sol[sys₂.m] atol=1e-7
|
109 | 109 | @test sol[sys₁.m] ≈ sol[sys₃.m] atol=1e-7
|
|
116 | 116 | sys2 = structural_simplify(nlrepressilator)
|
117 | 117 | @test length(equations(sys2)) <= 6
|
118 | 118 | nlprob = NonlinearProblem(sys2, u₀_nl, pvals)
|
119 |
| - sol = solve(nlprob, NLSolveJL(), abstol = 1e-9) |
| 119 | + sol = solve(nlprob; abstol = 1e-9) |
120 | 120 | @test sol[sys₁.P] ≈ sol[sys₂.P] ≈ sol[sys₃.P]
|
121 | 121 | @test sol[sys₁.m] ≈ sol[sys₂.m] atol=1e-7
|
122 | 122 | @test sol[sys₁.m] ≈ sol[sys₃.m] atol=1e-7
|
|
134 | 134 | sys2 = structural_simplify(nlrepressilator)
|
135 | 135 | @test length(equations(sys2)) <= 6
|
136 | 136 | nlprob = NonlinearProblem(sys2, u₀_nl, pvals)
|
137 |
| - sol = solve(nlprob, NLSolveJL(), abstol = 1e-9) |
| 137 | + sol = solve(nlprob; abstol = 1e-9) |
138 | 138 | @test sol[sys₁.P] ≈ sol[sys₂.P] ≈ sol[sys₃.P]
|
139 | 139 | @test sol[sys₁.m] ≈ sol[sys₂.m] atol=1e-7
|
140 | 140 | @test sol[sys₁.m] ≈ sol[sys₃.m] atol=1e-7
|
|
253 | 253 | sys2 = structural_simplify(nlrepressilator)
|
254 | 254 | @test length(equations(sys2)) <= 6
|
255 | 255 | nlprob = NonlinearProblem(sys2, u₀_nl, pvals)
|
256 |
| - sol = solve(nlprob, NLSolveJL(), abstol = 1e-9) |
| 256 | + sol = solve(nlprob; abstol = 1e-9) |
257 | 257 | @test sol[sys₁.P] ≈ sol[sys₂.P] ≈ sol[sys₃.P]
|
258 | 258 | @test sol[sys₁.m] ≈ sol[sys₂.m] atol=1e-7
|
259 | 259 | @test sol[sys₁.m] ≈ sol[sys₃.m] atol=1e-7
|
|
503 | 503 | let
|
504 | 504 | t = default_t()
|
505 | 505 | D = default_time_deriv()
|
506 |
| - @species x1(t) x2(t) |
| 506 | + @species x1(t) x2(t) |
507 | 507 | @variables x3(t) x4(t) x5(t)
|
508 | 508 | x2 = ParentScope(x2)
|
509 | 509 | x3 = ParentScope(ParentScope(x3))
|
|
514 | 514 | p3 = ParentScope(ParentScope(p3))
|
515 | 515 | p4 = DelayParentScope(p4)
|
516 | 516 | p5 = GlobalScope(p5)
|
517 |
| - rxs = [Reaction(p1, nothing, [x1]), Reaction(p2, [x2], nothing), |
| 517 | + rxs = [Reaction(p1, nothing, [x1]), Reaction(p2, [x2], nothing), |
518 | 518 | D(x3) ~ p3, D(x4) ~ p4, D(x5) ~ p5]
|
519 | 519 | @named sys1 = ReactionSystem(rxs, t)
|
520 | 520 | @test isequal(x1, only(unknowns(sys1)))
|
|
0 commit comments