Skip to content

Commit 669b3f2

Browse files
committed
add tstops API
1 parent 65946a8 commit 669b3f2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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)