How to keep additional info from time evolution in OrdinaryDiffEq.jl?

I am evolving a statevector U and in my rhs function I return the dU vector. How can I keep the dU values to access after the time evolution?

for example you have positiona and velocity in your statevector

U = [x,v]

then in your rhs function you calculate the acceleration. How can I access the value of the computed acceleration in each timestep? Is there a built it functionality?

Thank you

See Interpolations and Calculating Derivatives

1 Like