Skip to content

Commit

Permalink
Small fix for forward ODE solve wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
bgroenks96 committed May 17, 2024
1 parent 598cb50 commit 2b87df1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/forward_solve_ode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ end

function CommonSolve.step!(forward::SimulatorODEForwardSolver)
if forward.step_idx > length(forward.tstops)
return nothing
return step!(forward.integrator)
end
# extract fields from forward integrator and compute dt
prob = forward.prob
integrator = forward.integrator
t = forward.tstops[forward.step_idx]
dt = adstrip(t - integrator.t)
if dt > 0
retval = if dt > 0
# step to next t if dt > 0
step!(integrator, dt, true)
end
Expand All @@ -100,7 +100,7 @@ function CommonSolve.step!(forward::SimulatorODEForwardSolver)
end
# increment step index
forward.step_idx += 1
return nothing
return retval
end

"""
Expand Down

0 comments on commit 2b87df1

Please sign in to comment.