Skip to content

Commit

Permalink
Merge pull request #274 from SciML/retcode
Browse files Browse the repository at this point in the history
Update return codes
  • Loading branch information
ChrisRackauckas authored Nov 25, 2022
2 parents 1194737 + cf998f6 commit e4ec932
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SSA_stepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function reset_aggregated_jumps!(integrator::SSAIntegrator, uprev = nothing)
nothing
end

function DiffEqBase.terminate!(integrator::SSAIntegrator, retcode = :Terminated)
function DiffEqBase.terminate!(integrator::SSAIntegrator, retcode = ReturnCode.Terminated)
integrator.keep_stepping = false
integrator.sol = DiffEqBase.solution_new_retcode(integrator.sol, retcode)
nothing
Expand Down
2 changes: 1 addition & 1 deletion test/extinction_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ dprob = DiscreteProblem(u0, (0.0, 1000.0), rates)
jprob = JumpProblem(dprob, Direct(), majump; save_positions = (false, false), rng = rng)
sol = solve(jprob, SSAStepper(), callback = cb, save_end = false)
@test sol[1, end] == 1
@test sol.retcode == :Terminated
@test sol.retcode == ReturnCode.Terminated

0 comments on commit e4ec932

Please sign in to comment.