Skip to content

Commit

Permalink
Fix file overwriting issue with saving callback (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber authored Jul 3, 2023
1 parent e0ab974 commit b9b5b96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/callbacks/solution_saving.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ end
get_iter(::Integer, integrator) = integrator.stats.naccept
function get_iter(dt::AbstractFloat, integrator)
# Basically `(t - tspan[1]) / dt` as `Int`.
Int(div(integrator.t - first(integrator.sol.prob.tspan), dt, RoundNearest))
Int(div(integrator.t - first(integrator.sol.prob.tspan), dt, RoundUp))
end

function Base.show(io::IO, cb::DiscreteCallback{<:Any, <:SolutionSavingCallback})
Expand Down

0 comments on commit b9b5b96

Please sign in to comment.