Skip to content

Commit 8a2da2a

Browse files
committed
fixes
1 parent 396bde8 commit 8a2da2a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/integrators/integrator_utils.jl

+3-9
Original file line numberDiff line numberDiff line change
@@ -366,17 +366,11 @@ function handle_callbacks!(integrator)
366366
savevalues!(integrator)
367367
end
368368

369-
integrator.u_modified = continuous_modified || discrete_modified
370-
if integrator.u_modified
371-
handle_callback_modifiers!(integrator)
372-
end
369+
integrator.u_modified = continuous_modified | discrete_modified
370+
integrator.reeval_fsal && handle_callback_modifiers!(integrator) # Hook for DDEs to add discontinuities
373371
nothing
374372
end
375373

376-
function handle_callback_modifiers!(integrator::ODEIntegrator)
377-
integrator.reeval_fsal = true
378-
end
379-
380374
function update_uprev!(integrator)
381375
if alg_extrapolates(integrator.alg)
382376
if isinplace(integrator.sol.prob)
@@ -515,7 +509,7 @@ function reset_fsal!(integrator)
515509
integrator.fsalfirst = integrator.f(integrator.u, integrator.p, integrator.t)
516510
end
517511
end
518-
512+
519513
# Do not set false here so it can be checked in the algorithm
520514
# integrator.reeval_fsal = false
521515
end

0 commit comments

Comments
 (0)