Skip to content

Commit 7358a9b

Browse files
Merge pull request #580 from SciML/add_tstops_api
add tstops API
2 parents c147c7a + eae6f16 commit 7358a9b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
3434
Adapt = "3, 4"
3535
ArrayInterface = "6, 7"
3636
DataStructures = "0.18"
37-
DiffEqBase = "6.130.1"
37+
DiffEqBase = "6.154"
3838
DiffEqNoiseProcess = "5.13"
3939
DocStringExtensions = "0.8, 0.9"
4040
FiniteDiff = "2"

src/StochasticDiffEq.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ using DocStringExtensions
4747
resize_non_user_cache!,deleteat_non_user_cache!,addat_non_user_cache!,
4848
terminate!,get_du, get_dt,get_proposed_dt,set_proposed_dt!,
4949
u_modified!,savevalues!,add_tstop!,add_saveat!,set_reltol!,
50-
set_abstol!, postamble!, last_step_failed, has_Wfact, has_jac
50+
set_abstol!, postamble!, last_step_failed, has_Wfact, has_jac,
51+
get_tstops, get_tstops_array, get_tstops_max
5152

5253
using DiffEqBase: check_error!, is_diagonal_noise, @..
5354

src/integrators/integrator_interface.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,7 @@ function DiffEqBase.set_u!(integrator::SDEIntegrator, u)
390390
integrator.u = u
391391
u_modified!(integrator, true)
392392
end
393+
394+
DiffEqBase.get_tstops(integ::SDEIntegrator) = integ.opts.tstops
395+
DiffEqBase.get_tstops_array(integ::SDEIntegrator) = get_tstops(integ).valtree
396+
DiffEqBase.get_tstops_max(integ::SDEIntegrator) = maximum(get_tstops_array(integ))

0 commit comments

Comments
 (0)