Closed axla-io closed 1 year ago
Oops, shouldn't merge quite yet. Can you add a test?
Ah! Yes sure!
I've added a saving callback test now.
There might be a bug present because I have to set save_everystep = true
and save_start = true
in both the callback definition and the solve call for the test to work. Though this does not seem to be related to the functionality added by this PR.
i.e. this doesn't work:
using DiffEqCallbacks
u0 = zeros(2)
prob = SteadyStateProblem(f, u0)
saved_values = SavedValues(Float64, Vector{Float64})
cb = SavingCallback((u, t, integrator) -> copy(u), saved_values,
save_everystep = false, save_start = false)
sol = solve(prob, DynamicSS(Rodas5()), callback = cb)
@test sol.retcode == ReturnCode.Success
@test length(saved_values.saveval) == 1
This is a PR that enables passing callbacks to DynamicSS. In the current implementation no user inputted callback will be sent to the solver.
So I'm imagining something like this.