Skip to content

Commit f43bcaf

Browse files
Merge pull request #2377 from SciML/tstop_interface
add tstops API
2 parents d88f255 + 6c6c838 commit f43bcaf

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ADTypes = "0.2, 1"
7979
Adapt = "3.0, 4"
8080
ArrayInterface = "7"
8181
DataStructures = "0.18"
82-
DiffEqBase = "6.147"
82+
DiffEqBase = "6.154"
8383
DocStringExtensions = "0.9"
8484
EnumX = "1"
8585
ExponentialUtilities = "1"

lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ import DiffEqBase: resize!, deleteat!, addat!, full_cache, user_cache, u_cache,
5151
add_tstop!, has_tstop, first_tstop, pop_tstop!,
5252
add_saveat!, set_reltol!,
5353
set_abstol!, postamble!, last_step_failed,
54-
isautodifferentiable
54+
isautodifferentiable,
55+
get_tstops, get_tstops_array, get_tstops_max
56+
5557

5658
using DiffEqBase: check_error!, @def, _vec, _reshape
5759

lib/OrdinaryDiffEqCore/src/integrators/integrator_interface.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,3 +452,7 @@ function DiffEqBase.set_u!(integrator::ODEIntegrator, u)
452452
end
453453

454454
DiffEqBase.has_stats(i::ODEIntegrator) = true
455+
456+
DiffEqBase.get_tstops(integ::ODEIntegrator) = integ.opts.tstops
457+
DiffEqBase.get_tstops_array(integ::ODEIntegrator) = get_tstops(integ).valtree
458+
DiffEqBase.get_tstops_max(integ::ODEIntegrator) = maximum(get_tstops_array(integ))

0 commit comments

Comments
 (0)