Skip to content

Commit 1af190d

Browse files
saveat logic change
1 parent 0125e21 commit 1af190d

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
@@ -144,7 +144,15 @@ function DiffEqBase.solve(jump_prob::JumpProblem, alg::SimpleAdaptiveTauLeaping;
144144
end
145145
hor = compute_hor(nu)
146146

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

150158
while t[end] < t_end

0 commit comments

Comments
 (0)