should be (u,t,integrator)
BTW, you might want look into using https://diffeq.sciml.ai/latest/features/callback_library/#PeriodicCallback-1
should be (u,t,integrator)
BTW, you might want look into using https://diffeq.sciml.ai/latest/features/callback_library/#PeriodicCallback-1