Skip to content

Commit

Permalink
Merge pull request #1071 from isaacsas/tstop_api_funs
Browse files Browse the repository at this point in the history
add integrator accessors for dispatch purposes
  • Loading branch information
ChrisRackauckas authored Aug 18, 2024
2 parents 84cbb9d + f926626 commit e27e745
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/DiffEqBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ include("forwarddiff.jl")
include("termination_conditions_deprecated.jl") # TODO: remove in the next major release
include("termination_conditions.jl")
include("norecompile.jl")
include("integrator_accessors.jl")

# This is only used for oop stiff solvers
default_factorize(A) = lu(A; check = false)
Expand Down
9 changes: 9 additions & 0 deletions src/integrator_accessors.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# the following are setup per how integrators are implemented in OrdinaryDiffEq and
# StochasticDiffEq and provide dispatch points that JumpProcesses and others can use.

get_tstops(integ::DEIntegrator) =
error("get_tstops not implemented for integrators of type $(nameof(typeof(integ)))")
get_tstops_array(integ::DEIntegrator) =
error("get_tstops_array not implemented for integrators of type $(nameof(typeof(integ)))")
get_tstops_max(integ::DEIntegrator) =
error("get_tstops_max not implemented for integrators of type $(nameof(typeof(integ)))")

0 comments on commit e27e745

Please sign in to comment.