Skip to content

Commit 35ac8d7

Browse files
Merge pull request #2465 from jClugstor/cache_strip_change
Strip `uf` and `tf` with `strip_cache`
2 parents 94a6fbc + 34a6d03 commit 35ac8d7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/OrdinaryDiffEqCore/src/interp_func.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ end
7676

7777
function strip_cache(cache)
7878
if hasfield(typeof(cache), :jac_config) || hasfield(typeof(cache), :grad_config) ||
79-
hasfield(typeof(cache), :nlsolver)
79+
hasfield(typeof(cache), :nlsolver) || hasfield(typeof(cache), :tf) || hasfield(typeof(cache), :uf)
8080
fieldnums = length(fieldnames(typeof(cache)))
8181
noth_list = fill(nothing, fieldnums)
8282
cache_type_name = Base.typename(typeof(cache)).wrapper

test/interface/ode_strip_test.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ end
2626
@test isnothing(SciMLBase.strip_solution(rosenbrock_sol).interp.f)
2727
@test isnothing(SciMLBase.strip_solution(rosenbrock_sol).interp.cache.jac_config)
2828
@test isnothing(SciMLBase.strip_solution(rosenbrock_sol).interp.cache.grad_config)
29+
@test isnothing(SciMLBase.strip_solution(rosenbrock_sol).interp.cache.uf)
30+
@test isnothing(SciMLBase.strip_solution(rosenbrock_sol).interp.cache.tf)
2931
end
3032

3133
@testset "TRBDF Solution Stripping" begin

0 commit comments

Comments
 (0)