I’m using DifferentialEquations.jl for the first time in a while (it’s changed a bit ) and I’m trying to work out how to get the times at which events happen with a
ContinuousCallback function when integrating an ODE. Ultimately I’m trying to get a single period of a periodic orbit by defining a Poincare surface that it passes through once (twice) per period and extracting the time points at which that happens.
Is there any way to easily extract the time points that correspond to events found with a
ContinuousCallback function? I’m could do it with a closure:
tt = Float64 cb = ContinuousCallback(poincare, (integrator) -> push!(tt, integrator.t)) sol = solve(prob, Vern6(), callback=cb, dtmax=0.02)
but I was wondering if there is an built in way (I can’t see one in the docs).