Skip to content

Commit e7bd6c6

Browse files
committed
Test event occurrence and bump up version
1 parent 30103b4 commit e7bd6c6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/OrdinaryDiffEqCore/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Accessors = "0.1.36"
5151
Adapt = "3.0, 4"
5252
ArrayInterface = "7"
5353
DataStructures = "0.18"
54-
DiffEqBase = "6.169.1"
54+
DiffEqBase = "6.182.0"
5555
DiffEqDevTools = "2.44.4"
5656
DocStringExtensions = "0.9"
5757
EnumX = "1"

test/integrators/ode_event_tests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ sol = solve(prob, Tsit5(), callback = callback)
2424

2525
# Force integrator to step on event
2626
sol = solve(prob, Tsit5(), callback = callback, tstops = [-2.95])
27+
@test sol(-2.95, continuity = :right) sol(-2.95, continuity = :left) + 2
2728

2829
condition = function (out, u, t, integrator) # Event when event_f(u,t,k) == 0
2930
out[1] = -t - 2.95
@@ -41,6 +42,7 @@ sol = solve(prob, Tsit5(), callback = callback)
4142

4243
# Force integrator to step on event
4344
sol = solve(prob, Tsit5(), callback = callback, tstops = [-2.95])
45+
@test sol(-2.95, continuity = :right) sol(-2.95, continuity = :left) + 2
4446

4547
f = function (du, u, p, t)
4648
du[1] = -u[1] + sin(t)
@@ -62,6 +64,7 @@ sol = solve(prob, Tsit5(), callback = callback, abstol = 1e-8, reltol = 1e-6)
6264

6365
# Force integrator to step on event
6466
sol = solve(prob, Tsit5(), callback = callback, abstol = 1e-8, reltol = 1e-6, tstops = [2.95])
67+
@test sol(2.95, continuity = :right)[1] sol(2.95, continuity = :left)[1] + 2
6568

6669
condition = function (out, u, t, integrator) # Event when event_f(u,t,k) == 0
6770
out[1] = t - 2.95
@@ -79,6 +82,7 @@ sol = solve(prob, Tsit5(), callback = callback, abstol = 1e-8, reltol = 1e-6)
7982

8083
# Force integrator to step on event
8184
sol = solve(prob, Tsit5(), callback = callback, abstol = 1e-8, reltol = 1e-6, tstops = [2.95])
85+
@test sol(2.95, continuity = :right)[1] sol(2.95, continuity = :left)[1] + 2
8286

8387
f = function (du, u, p, t)
8488
du[1] = u[2]

0 commit comments

Comments
 (0)