Closed visr closed 1 year ago
Yeah it's just not implemented in full right now. FunctionCallingCallback should similarly fix it. What should be done is that it should just make a "fake" empty one and then in the initialize https://github.com/SciML/DiffEqCallbacks.jl/blob/master/src/saving.jl#L87-L89 which is always called at the start of the solve, it should do Heap(integ.sol.prob.tspan[1]:saveat_cache:integ.sol.prob.tspan[2])
since at the initialize point it will know what the tspan is from the integrator. I just never got around to it so if anyone has a second this would be nice to finally fix.
The docs for SavingCallback mention
Therefore I assumed passing a number would work like this:
It makes sense that this doesn't work, since the SavingCallback doesn't know the
tspan
. Right now it errors on numbers, sincecollect(saveat)
creates a 0D array which isn't supported by BinaryMinHeap. Though the code hassaveat isa Number
so it looks like it was supposed to work.Should we not support saveat numbers, or support it by adding a tspan kwarg? Or is there another way?