Skip to content

Commit e27e745

Browse files
Merge pull request #1071 from isaacsas/tstop_api_funs
add integrator accessors for dispatch purposes
2 parents 84cbb9d + f926626 commit e27e745

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/DiffEqBase.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ include("forwarddiff.jl")
141141
include("termination_conditions_deprecated.jl") # TODO: remove in the next major release
142142
include("termination_conditions.jl")
143143
include("norecompile.jl")
144+
include("integrator_accessors.jl")
144145

145146
# This is only used for oop stiff solvers
146147
default_factorize(A) = lu(A; check = false)

src/integrator_accessors.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# the following are setup per how integrators are implemented in OrdinaryDiffEq and
2+
# StochasticDiffEq and provide dispatch points that JumpProcesses and others can use.
3+
4+
get_tstops(integ::DEIntegrator) =
5+
error("get_tstops not implemented for integrators of type $(nameof(typeof(integ)))")
6+
get_tstops_array(integ::DEIntegrator) =
7+
error("get_tstops_array not implemented for integrators of type $(nameof(typeof(integ)))")
8+
get_tstops_max(integ::DEIntegrator) =
9+
error("get_tstops_max not implemented for integrators of type $(nameof(typeof(integ)))")

0 commit comments

Comments
 (0)