@@ -26,15 +26,16 @@ reltols = 1.0 ./ 10.0 .^ (0:5)
26
26
27
27
setups = [Dict (:alg => DP5 ())
28
28
Dict (:alg => Tsit5 ())]
29
- names = [" DP5" , " Tsit5" ]
30
- wp = WorkPrecisionSet (prob, abstols, reltols, setups, names = names, save_everystep = false ,
29
+ wp_names = [" DP5" , " Tsit5" ]
30
+ wp = WorkPrecisionSet (prob, abstols, reltols, setups, names = wp_names,
31
+ save_everystep = false ,
31
32
numruns = 100 )
32
33
33
34
plt = @test_nowarn plot (wp)
34
35
@test plt[1 ][1 ][:x ] ≈ wp[1 ]. errors
35
36
@test plt[1 ][2 ][:x ] ≈ wp[2 ]. errors
36
- @test plt[1 ][1 ][:label ] == names [1 ]
37
- @test plt[1 ][2 ][:label ] == names [2 ]
37
+ @test plt[1 ][1 ][:label ] == wp_names [1 ]
38
+ @test plt[1 ][2 ][:label ] == wp_names [2 ]
38
39
@test_nowarn plot (wp, color = [1 2 ])
39
40
@test_nowarn plot (wp, color = :blue )
40
41
@test_throws ArgumentError plot (wp, view = :dt_convergence )
@@ -44,18 +45,19 @@ setups = [Dict(:alg => Euler(), :dts => dts)
44
45
Dict (:alg => Heun (), :dts => dts)
45
46
Dict (:alg => Tsit5 (), :dts => dts, :adaptive => false )
46
47
Dict (:alg => Tsit5 ())]
47
- names = [" Euler" , " Heun" , " Tsit5 fixed step" , " Tsit5 adaptive" ]
48
- wp = WorkPrecisionSet (prob, abstols, reltols, setups, names = names, save_everystep = false ,
48
+ wp_names = [" Euler" , " Heun" , " Tsit5 fixed step" , " Tsit5 adaptive" ]
49
+ wp = WorkPrecisionSet (prob, abstols, reltols, setups, names = wp_names,
50
+ save_everystep = false ,
49
51
numruns = 100 )
50
52
51
53
plt = @test_nowarn plot (wp)
52
54
@test all (plt[1 ][i][:x ] ≈ wp[i]. errors for i in 1 : 4 )
53
- @test all (plt[1 ][i][:label ] == names [i] for i in 1 : 4 )
55
+ @test all (plt[1 ][i][:label ] == wp_names [i] for i in 1 : 4 )
54
56
55
57
plt = @test_nowarn plot (wp, view = :dt_convergence , legend = :bottomright )
56
58
@test all (plt[1 ][i][:x ] == plt[1 ][i + 3 ][:x ] == dts == wp. setups[i][:dts ] for i in 1 : 3 )
57
59
@test all (plt[1 ][i + 3 ][:y ] ≈ wp[i]. errors for i in 1 : 3 )
58
- @test all (startswith (plt[1 ][i + 3 ][:label ], names [i]) for i in 1 : 3 )
60
+ @test all (startswith (plt[1 ][i + 3 ][:label ], wp_names [i]) for i in 1 : 3 )
59
61
@test_throws BoundsError plt[1 ][7 ]
60
62
@test_nowarn plot (wp, view = :dt_convergence , color = [:red :orange :green ])
61
63
@test_nowarn plot (wp, view = :dt_convergence , color = :lightblue , title = " Δt Convergence" )
0 commit comments