Skip to content

Commit

Permalink
Merge pull request #295 from SciML/myb/callbacks
Browse files Browse the repository at this point in the history
Account for `tdir` in `add_tstop!`
  • Loading branch information
YingboMa authored Dec 31, 2020
2 parents 5181d22 + bda0b65 commit 13121bc
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

2 comments on commit 13121bc

@YingboMa
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/27126

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.4.1 -m "<description of version>" 13121bcd56faa589e00333aaa37e027dc91e4218
git push origin v4.4.1

Please sign in to comment.