Skip to content

Commit 41db9c2

Browse files
handle nothing first fsal case
1 parent 241b393 commit 41db9c2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ mutable struct CompositeCache{T, F} <: OrdinaryDiffEqCache
1313
current::Int
1414
end
1515

16-
get_fsalfirstlast(cache::CompositeCache, u) = get_fsalfirstlast(cache.caches[1], u)
16+
function get_fsalfirstlast(cache::CompositeCache, u)
17+
_x = get_fsalfirstlast(cache.caches[1], u)
18+
if first(_x) !== nothing
19+
return _x
20+
else
21+
return get_fsalfirstlast(cache.caches[2], u)
22+
end
23+
end
1724

1825
mutable struct DefaultCache{T1, T2, T3, T4, T5, T6, A, F, uType} <: OrdinaryDiffEqCache
1926
args::A

lib/OrdinaryDiffEqCore/src/solve.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,6 @@ function DiffEqBase.__init(
471471
saveiter_dense = 0
472472
fsalfirst, fsallast = get_fsalfirstlast(cache, rate_prototype)
473473

474-
@show typeof(fsalfirst)
475-
476474
integrator = ODEIntegrator{typeof(_alg), isinplace(prob), uType, typeof(du),
477475
tType, typeof(p),
478476
typeof(eigen_est), typeof(EEst),

0 commit comments

Comments
 (0)