From 99abecd92619bf81f7ad37bf665d31821bbad87c Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 18 Aug 2024 03:15:28 -0400 Subject: [PATCH] handle all --- .../src/perform_step/composite_perform_step.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/perform_step/composite_perform_step.jl b/lib/OrdinaryDiffEqCore/src/perform_step/composite_perform_step.jl index b840ebeb41..906607a8b0 100644 --- a/lib/OrdinaryDiffEqCore/src/perform_step/composite_perform_step.jl +++ b/lib/OrdinaryDiffEqCore/src/perform_step/composite_perform_step.jl @@ -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