Skip to content

Commit

Permalink
use vcat rather than append! to combine d_discontinuities and `…
Browse files Browse the repository at this point in the history
…tstops`

this version works when tstops is a scalar.
  • Loading branch information
oscardssmith authored Jan 25, 2024
1 parent 8b91268 commit 03db67f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common_interface/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractODEProblem{uType, tupType, i

progress && Logging.@logmsg(Logging.LogLevel(-1), progress_name, _id=progress_id, progress=0)

append!(tstops, d_discontinuities)
tstops = vcat(tstops, d_discontinuities)
callbacks_internal = DiffEqBase.CallbackSet(callback)

max_len_cb = DiffEqBase.max_vector_callback_length(callbacks_internal)
Expand Down Expand Up @@ -515,7 +515,7 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractODEProblem{uType, tupType, i

progress && Logging.@logmsg(Logging.LogLevel(-1), progress_name, _id=progress_id, progress=0)

append!(tstops, d_discontinuities)
tstops = vcat(tstops, d_discontinuities)
callbacks_internal = DiffEqBase.CallbackSet(callback)

max_len_cb = DiffEqBase.max_vector_callback_length(callbacks_internal)
Expand Down Expand Up @@ -1026,7 +1026,7 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractDAEProblem{uType, duType, tu

progress && Logging.@logmsg(Logging.LogLevel(-1), progress_name, _id=progress_id, progress=0)

append!(tstops, d_discontinuities)
tstops = vcat(tstops, d_discontinuities)
callbacks_internal = DiffEqBase.CallbackSet(callback)

max_len_cb = DiffEqBase.max_vector_callback_length(callbacks_internal)
Expand Down

0 comments on commit 03db67f

Please sign in to comment.