How to only return values from the last time step in a saving callback?

I’ve tried these combinations and haven’t found the correct one yet.

cb_save = SavingCallback(saving_func, saved_values, saveat=sol.t[end])

cb_save = SavingCallback(saving_func, saved_values, save_start=false,save_everystep=false)

tmin = 0.0
tmax = 50000.0
tspan = (tmin,tmax)

cb_save = SavingCallback(saving_func, saved_values, saveat=tmax)

That was a bug in the library.

Patch will be out tomorrow morning.

1 Like