@@ -14,28 +14,36 @@ prob = ODEProblem(lorenz!, u0, tspan)
14
14
rosenbrock_sol = solve (prob, Rosenbrock23 ())
15
15
TRBDF_sol = solve (prob, TRBDF2 ())
16
16
vern_sol = solve (prob, Vern7 ())
17
-
17
+ default_sol = solve (prob)
18
18
@testset " Interpolation Stripping" begin
19
19
@test isnothing (SciMLBase. strip_interpolation (rosenbrock_sol. interp). f)
20
20
@test isnothing (SciMLBase. strip_interpolation (rosenbrock_sol. interp). cache. jac_config)
21
21
@test isnothing (SciMLBase. strip_interpolation (rosenbrock_sol. interp). cache. grad_config)
22
22
end
23
23
24
24
@testset " Rosenbrock Solution Stripping" begin
25
- @test SciMLBase. strip_solution (rosenbrock_sol). prob isa NamedTuple
25
+ stripped_sol = SciMLBase. strip_solution (rosenbrock_sol)
26
+ @test stripped_sol. prob isa NamedTuple
26
27
@test isnothing (SciMLBase. strip_solution (rosenbrock_sol, strip_alg = true ). alg)
27
- @test isnothing (SciMLBase . strip_solution (rosenbrock_sol) . interp. f)
28
- @test isnothing (SciMLBase . strip_solution (rosenbrock_sol) . interp. cache. jac_config)
29
- @test isnothing (SciMLBase . strip_solution (rosenbrock_sol) . interp. cache. grad_config)
30
- @test isnothing (SciMLBase . strip_solution (rosenbrock_sol) . interp. cache. uf)
31
- @test isnothing (SciMLBase . strip_solution (rosenbrock_sol) . interp. cache. tf)
28
+ @test isnothing (stripped_sol . interp. f)
29
+ @test isnothing (stripped_sol . interp. cache. jac_config)
30
+ @test isnothing (stripped_sol . interp. cache. grad_config)
31
+ @test isnothing (stripped_sol . interp. cache. uf)
32
+ @test isnothing (stripped_sol . interp. cache. tf)
32
33
end
33
34
34
35
@testset " TRBDF Solution Stripping" begin
35
- @test SciMLBase. strip_solution (TRBDF_sol). prob isa NamedTuple
36
+ stripped_sol = SciMLBase. strip_solution (TRBDF_sol)
37
+ @test stripped_sol. prob isa NamedTuple
36
38
@test isnothing (SciMLBase. strip_solution (TRBDF_sol, strip_alg = true ). alg)
37
- @test isnothing (SciMLBase. strip_solution (TRBDF_sol). interp. f)
38
- @test isnothing (SciMLBase. strip_solution (TRBDF_sol). interp. cache. nlsolver)
39
+ @test isnothing (stripped_sol. interp. f)
40
+ @test isnothing (stripped_sol. interp. cache. nlsolver)
41
+ end
42
+
43
+ @testset " Default Solution Stripping" begin
44
+ stripped_sol = SciMLBase. strip_solution (default_sol)
45
+ @test isnothing (stripped_sol. interp. cache. args)
46
+
39
47
end
40
48
41
49
@test_throws SciMLBase. LazyInterpolationException SciMLBase. strip_solution (vern_sol)
0 commit comments