Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Nov 15, 2023
1 parent 817180c commit da5bf61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/events_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ condition_dc = (u,t,integrator) -> t in tstop
affect!_dc = (integrator) -> integrator.u .= 1.0
save_positions = (true,true)
times_finalize_called = 0
callback_dc = DiscreteCallback(condition_dc, affect!_dc, save_positions=save_positions, finalize=(args...)->times_finalize_called+=1)
callback_dc = DiscreteCallback(condition_dc, affect!_dc, save_positions=save_positions,
finalize=(args...)->global times_finalize_called+=1)
sol = solve(prob, SRIW1(), callback=callback_dc, tstops=tstop, saveat=tstop)
@test count(x->x==tstop[1], sol.t) == 2
@test count(x->x==tstop[2], sol.t) == 2
Expand Down

0 comments on commit da5bf61

Please sign in to comment.