From 3a3e5161d849d5f75be15ba05393b4de4a2c20e5 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Mon, 25 Jan 2021 22:07:31 +0100 Subject: [PATCH] Update integrator_utils.jl --- src/integrators/integrator_utils.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/integrators/integrator_utils.jl b/src/integrators/integrator_utils.jl index a28939a90..70a9e5a31 100644 --- a/src/integrators/integrator_utils.jl +++ b/src/integrators/integrator_utils.jl @@ -260,16 +260,19 @@ end end end -@inline function handle_callback_modifiers!(integrator::SDEIntegrator) +function handle_callback_modifiers!(integrator::SDEIntegrator) #integrator.reeval_fsal = true if integrator.P !== nothing && integrator.opts.adaptive - if typeof(integrator.cache) <: StochasticDiffEqMutableCache + if integrator.cache isa StochasticDiffEqMutableCache oldrate = integrator.P.cache.currate - P.cache.rate(oldrate,u,p,t) + integrator.P.cache.rate(oldrate, integrator.u, integrator.p, integrator.t) else - integrator.P.cache.currate = P.cache.rate(u,p,t) + integrator.P.cache.currate = integrator.P.cache.rate( + integrator.u, integrator.p, integrator.t + ) end end + nothing end @inline function apply_step!(integrator)