From 5abd972345f847a8a22e0773a4ffed349db6ed3c Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Wed, 16 Oct 2024 22:23:39 +0200 Subject: [PATCH] fix dt condition --- src/preset_time.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preset_time.jl b/src/preset_time.jl index 2c527a82..e0e2a125 100644 --- a/src/preset_time.jl +++ b/src/preset_time.jl @@ -33,7 +33,7 @@ function PresetTimeCallback(tstops, user_affect!; condition = let function (u, t, integrator) if hasproperty(integrator, :dt) - insorted(t, tstops) && !iszero(integrator.dt) + insorted(t, tstops) && (integrator.t - integrator.dt) != integrator.t else insorted(t, tstops) end