|
1 | 1 | ### Prepares Tests ###
|
2 | 2 |
|
3 | 3 | # Fetch packages.
|
4 |
| -using Catalyst, JumpProcesses, LinearAlgebra, NonlinearSolve, OrdinaryDiffEqTsit5, SteadyStateDiffEq, StochasticDiffEq, Test |
| 4 | +using Catalyst, JumpProcesses, LinearAlgebra, NonlinearSolve, OrdinaryDiffEqTsit5, OrdinaryDiffEqDefault, OrdinaryDiffEqVerner, SteadyStateDiffEq, StochasticDiffEq, Test |
5 | 5 |
|
6 | 6 | # Sets stable rng number.
|
7 | 7 | using StableRNGs
|
|
192 | 192 | oprob1 = ODEProblem(rn, u0_1, 10.0, ps; remove_conserved = true, remove_conserved_warn)
|
193 | 193 | oprob2 = ODEProblem(rn, u0_2, 10.0, ps; remove_conserved = true, remove_conserved_warn)
|
194 | 194 | oprob3 = ODEProblem(rn, u0_3, 10.0, ps; remove_conserved = true, remove_conserved_warn)
|
195 |
| - @test solve(oprob1, Tsit5())[sps] ≈ solve(oprob2, Tsit5())[sps] ≈ solve(oprob3, Tsit5())[sps] |
| 195 | + @test solve(oprob1)[sps] ≈ solve(oprob2)[sps] ≈ solve(oprob3)[sps] |
196 | 196 | end
|
197 | 197 |
|
198 | 198 | # Tests conservation laws in SDE simulation.
|
|
224 | 224 | oprob2 = ODEProblem(osys, u0, 10.0, ps_2)
|
225 | 225 |
|
226 | 226 | # Checks that the solutions generates the correct conserved quantities.
|
227 |
| - sol1 = solve(oprob1, Tsit5(); saveat = 1.0) |
228 |
| - sol2 = solve(oprob2, Tsit5(); saveat = 1.0) |
| 227 | + sol1 = solve(oprob1; saveat = 1.0) |
| 228 | + sol2 = solve(oprob2; saveat = 1.0) |
229 | 229 | @test all(sol1[osys.X1 + osys.X2] .== 2.0)
|
230 | 230 | @test all(sol2[osys.X1 + osys.X2] .== 4.0)
|
231 | 231 | end
|
|
0 commit comments