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

Restart after event #492

Open
dkweiss31 opened this issue Aug 17, 2024 · 2 comments
Open

Restart after event #492

dkweiss31 opened this issue Aug 17, 2024 · 2 comments
Labels
question User queries

Comments

@dkweiss31
Copy link
Contributor

I'm wondering if you'd be interested in a PR that would allow for solves that are terminated via events to be restarted (after some user-supplied update function is called) until t1 is reached?

This is something very relevant for quantum applications: a typical trajectory can experience multiple events or "jumps" before the final time. If however this is not something you think might be of general interest, happy to implement this outside of diffrax.

@patrick-kidger
Copy link
Owner

I think this is probably best done outside of Diffrax -- users may wish to do arbitrary things across the jump, and I thnk it'd be hard to provide an API that supports them all.

I'll note that doing this restart is just a matter of wrapping diffrax.diffeqsolve in a lax.while_loop, so it should be straigtforward.

@patrick-kidger patrick-kidger added the question User queries label Aug 17, 2024
@dkweiss31
Copy link
Contributor Author

Understood, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User queries
Projects
None yet
Development

No branches or pull requests

2 participants