From ed4f4be98028fb0a1110e967156d4f00d880646f Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 29 Jun 2021 06:16:04 -0400 Subject: [PATCH] Respect force_save in savevalues! Potential fix for https://github.com/SciML/Sundials.jl/issues/309 --- src/common_interface/integrator_utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common_interface/integrator_utils.jl b/src/common_interface/integrator_utils.jl index 7efdaa6..985fde2 100644 --- a/src/common_interface/integrator_utils.jl +++ b/src/common_interface/integrator_utils.jl @@ -63,7 +63,7 @@ function DiffEqBase.savevalues!( end end - if integrator.opts.save_everystep || (integrator.opts.save_everystep && (isempty(integrator.sol.t) || + if force_save || integrator.opts.save_everystep || (integrator.opts.save_everystep && (isempty(integrator.sol.t) || (integrator.t !== integrator.sol.t[end]))) saved = true save_value!(integrator.sol.u, integrator.u, uType, integrator.sizeu)