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

Fix saveat plotting #430

Merged
merged 6 commits into from
Jul 26, 2024
Merged

Fix saveat plotting #430

merged 6 commits into from
Jul 26, 2024

Conversation

isaacsas
Copy link
Member

@isaacsas isaacsas commented Jul 25, 2024

This preserves using piecewise constant plotting when saving every jump, but switches to less misleading linear interpolation when not saving every jump.

Requires SciML/SciMLBase.jl#749

Closes #206

Comment on lines 51 to 57
oprob = ODEProblem((du,u,p,t) -> du[1] = .1, u0, tspan)
for sp in sps
jprob = JumpProblem(oprob, Direct(), crj; save_positions = sp, rng)
sol = solve(jprob, Tsit5())
@test sol.dense == true
@test SciMLBase.isdenseplot(sol) == true
end
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently with PDMPs or jump-diffusions sol.dense == true always, irregardless of save_positions. I'm not sure if this should be considered an issue or not.

@isaacsas isaacsas closed this Jul 26, 2024
@isaacsas isaacsas reopened this Jul 26, 2024
@isaacsas isaacsas closed this Jul 26, 2024
@isaacsas isaacsas reopened this Jul 26, 2024
@isaacsas isaacsas merged commit a5fb32a into SciML:master Jul 26, 2024
8 of 12 checks passed
@isaacsas isaacsas deleted the fix_saveat_plotting branch July 26, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting is misleading when not saving all jumps
2 participants