Skip to content

Commit 24a191a

Browse files
saveat logic change
1 parent 145fd49 commit 24a191a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/simple_regular_solve.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,15 @@ function DiffEqBase.solve(jump_prob::JumpProblem, alg::SimpleAdaptiveTauLeaping;
145145
end
146146
hor = compute_hor(nu)
147147

148-
saveat_times = isnothing(saveat) ? Vector{typeof(t)}() : saveat isa Number ? collect(range(tspan[1], tspan[2], step=saveat)) : collect(saveat)
148+
saveat_times = nothing
149+
if isnothing(saveat)
150+
saveat_times = Vector{typeof(tspan[1])}()
151+
elseif saveat isa Number
152+
saveat_times = collect(range(tspan[1], tspan[2], step=saveat))
153+
else
154+
saveat_times = collect(saveat)
155+
end
156+
149157
save_idx = 1
150158

151159
while t[end] < t_end

0 commit comments

Comments
 (0)