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

option to control interpolation behavior for solution objects when using saveat #759

Open
isaacsas opened this issue Aug 5, 2024 · 1 comment

Comments

@isaacsas
Copy link
Member

isaacsas commented Aug 5, 2024

It would be nice when one is using saveat to have the ability to tell solution objects an interpolation option to use. For example, currently when using saveat in JumpProcesses and not saving every jump, objects will still use piecewise constant interpolation whereas I would think piecewise linear is more sensible.

Adding a kwarg to call sol(t; interp_method = ...) or such would be a nice way to allow other interpolations while still allowing one to use the solution interface. I could imagine just passing a symbol that identifies the interpolation to use from ones that are currently supported, but perhaps there could be a function-based interface for more generality?

@ChrisRackauckas
Copy link
Member

I like this idea at a high level. At an implementation level it would be a bit tricker than expected but possible. The problem is that the interpolations are defined by the objects right now. But in theory switching to linear and piecewise constant should always be possible since those require no more data. So you could switch to those from any interpolation, while if you had a linear interpolation you could switch to piecewise constant and that's it. So the docs might be a little weird for what's allowable, but nothing in principle would be blocking this.

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

No branches or pull requests

2 participants