Skip to content

Commit

Permalink
Merge pull request #2377 from SciML/tstop_interface
Browse files Browse the repository at this point in the history
add tstops API
  • Loading branch information
ChrisRackauckas authored Aug 18, 2024
2 parents d88f255 + 6c6c838 commit f43bcaf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ADTypes = "0.2, 1"
Adapt = "3.0, 4"
ArrayInterface = "7"
DataStructures = "0.18"
DiffEqBase = "6.147"
DiffEqBase = "6.154"
DocStringExtensions = "0.9"
EnumX = "1"
ExponentialUtilities = "1"
Expand Down
4 changes: 3 additions & 1 deletion lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ import DiffEqBase: resize!, deleteat!, addat!, full_cache, user_cache, u_cache,
add_tstop!, has_tstop, first_tstop, pop_tstop!,
add_saveat!, set_reltol!,
set_abstol!, postamble!, last_step_failed,
isautodifferentiable
isautodifferentiable,
get_tstops, get_tstops_array, get_tstops_max


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,7 @@ function DiffEqBase.set_u!(integrator::ODEIntegrator, u)
end

DiffEqBase.has_stats(i::ODEIntegrator) = true

DiffEqBase.get_tstops(integ::ODEIntegrator) = integ.opts.tstops
DiffEqBase.get_tstops_array(integ::ODEIntegrator) = get_tstops(integ).valtree
DiffEqBase.get_tstops_max(integ::ODEIntegrator) = maximum(get_tstops_array(integ))

0 comments on commit f43bcaf

Please sign in to comment.