Skip to content

Commit

Permalink
Account for tdir in add_tstop!
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Dec 31, 2020
1 parent 5181d22 commit bda0b65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Sundials"
uuid = "c3572dad-4567-51f8-b174-8c6c989267f4"
authors = ["Chris Rackauckas <[email protected]>"]
version = "4.4.0"
version = "4.4.1"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
Expand Down
2 changes: 1 addition & 1 deletion src/common_interface/integrator_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function handle_callback_modifiers!(integrator::IDAIntegrator)
end

function DiffEqBase.add_tstop!(integrator::AbstractSundialsIntegrator, t)
t < integrator.t &&
integrator.tdir * (t - integrator.t) < 0 &&
error("Tried to add a tstop that is behind the current time. This is strictly forbidden")
push!(integrator.opts.tstops, t)
end
Expand Down

0 comments on commit bda0b65

Please sign in to comment.