We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a08e77 commit 218e1b7Copy full SHA for 218e1b7
src/callbacks.jl
@@ -175,14 +175,13 @@ end
175
#Base Case: Just one
176
function apply_discrete_callback!(integrator::SDEIntegrator,callback::DiscreteCallback)
177
saved_in_cb = false
178
- if callback.save_positions[1]
179
- savevalues!(integrator,true)
180
- saved_in_cb = true
181
- end
182
-
183
- integrator.u_modified = true
184
if callback.condition(integrator.t,integrator.u,integrator)
+ if callback.save_positions[1]
+ savevalues!(integrator,true)
+ saved_in_cb = true
+ end
185
callback.affect!(integrator)
+ integrator.u_modified = true
186
if callback.save_positions[2]
187
savevalues!(integrator,true)
188
saved_in_cb = true
0 commit comments