Problem about using DiscreteCallback function in solving ODE problem

should be (u,t,integrator)

BTW, you might want look into using https://diffeq.sciml.ai/latest/features/callback_library/#PeriodicCallback-1

1 Like