Skip to content

Commit 577f9e1

Browse files
memory optimization
1 parent 0f7fb4d commit 577f9e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/simple_regular_solve.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ function DiffEqBase.solve(jump_prob::JumpProblem, alg::SimpleAdaptiveTauLeaping;
186186
tau /= 2
187187
continue
188188
end
189-
u_new = max.(u_new, 0)
189+
for i in eachindex(u_new)
190+
u_new[i] = max(u_new[i], 0)
191+
end
190192
t_new = t_current + tau
191193

192194
# Save state if at a saveat time or if saveat is empty

0 commit comments

Comments
 (0)