Skip to content

Commit

Permalink
update aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsas committed Aug 18, 2024
1 parent bc580f8 commit 8851fea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/SSA_stepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,8 @@ function DiffEqBase.add_tstop!(integrator::SSAIntegrator, tstop)
future_tstops = @view integrator.tstops[(integrator.tstops_idx):end]
insert_index = integrator.tstops_idx + searchsortedfirst(future_tstops, tstop) - 1

# if aliasing or have already copied the user tstops array
if integrator.alias_tstops || integrator.copied_tstops
tstops = integrator.tstops
else
# if not aliasing and have not already copied the user tstops array
if !integrator.alias_tstops && !integrator.copied_tstops
integrator.copied_tstops = true
integrator.tstops = copy(integrator.tstops)
end
Expand Down

0 comments on commit 8851fea

Please sign in to comment.