Skip to content

Commit 3f90750

Browse files
memory optimization
1 parent 2c03d67 commit 3f90750

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
@@ -185,7 +185,9 @@ function DiffEqBase.solve(jump_prob::JumpProblem, alg::SimpleAdaptiveTauLeaping;
185185
tau /= 2
186186
continue
187187
end
188-
u_new = max.(u_new, 0)
188+
for i in eachindex(u_new)
189+
u_new[i] = max(u_new[i], 0)
190+
end
189191
t_new = t_current + tau
190192

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

0 commit comments

Comments
 (0)