Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add integrator accessors for dispatch purposes #1071

Merged
merged 9 commits into from
Aug 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

# returns if the given integrator has an integ.iter field
hasiter(integ) = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasfield and hasproperty work at compile time though, so I'm not sure if this one is the most essential?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I wasn’t sure about if hasfield is compile time, but since it is I can drop this.


get_tstops(integ) = integ.opts.tstops
get_tstops_array(integ) = get_tstops(integ).valtree
get_max_tstops(integ) = maximum(get_tstops_array(integ))
isaacsas marked this conversation as resolved.
Show resolved Hide resolved
Loading