Skip to content

Commit

Permalink
handle all
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Aug 18, 2024
1 parent 5ca4d13 commit 99abecd
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,22 @@ function initialize!(integrator, cache::CompositeCache)
cache.current = cache.choice_function(integrator)
if cache.current == 1
initialize!(integrator, @inbounds(cache.caches[1]))
fsalfirst, fsallast = get_fsalfirstlast(cache.caches[1])
integrator.fsalfirst = fsalfirst
integrator.fsallast = fsallast
elseif cache.current == 2
initialize!(integrator, @inbounds(cache.caches[2]))
fsalfirst, fsallast = get_fsalfirstlast(cache.caches[2])
integrator.fsalfirst = fsalfirst
integrator.fsallast = fsallast
# the controller was initialized by default for integrator.alg.algs[1]
reset_alg_dependent_opts!(integrator.opts.controller, integrator.alg.algs[1],
integrator.alg.algs[2])
else
initialize!(integrator, @inbounds(cache.caches[cache.current]))
fsalfirst, fsallast = get_fsalfirstlast(cache.caches[cache.current])
integrator.fsalfirst = fsalfirst
integrator.fsallast = fsallast
reset_alg_dependent_opts!(integrator.opts.controller, integrator.alg.algs[1],
integrator.alg.algs[cache.current])
end
Expand Down

0 comments on commit 99abecd

Please sign in to comment.