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 RATTLE solver #328

Closed
wants to merge 3 commits into from
Closed

Conversation

krzysztofrusek
Copy link

This PR adds RATTLE solver for constrained Hamiltonian dynamics. It's very similar to #303 with the addition of implicit constrain.
I use this solver for HMC on implicitly defined manifolds in jax_chmc and it may be useful to have it in diffrax.

This is the first solver with constraints so I am not sure if the abstraction is correct.
Since the constrain function is used in the solver step, maybe it's better to introduce another type of Term?

@patrick-kidger
Copy link
Owner

Thank you for the contribution!

The introduction of a constraint here is pretty interesting. As it happens, I'm actually aiming to have Diffrax support semi-explicit DAEs at the diffeqsolve level -- for all kinds of solvers. (I'm hoping to get that in in a couple of releases, maybe around the new year.) Given that, I'm thinking it might make most sense to hold off on merging this until I've got a draft of that going -- I can tag you on that to get your thoughts once it's done.

WDYT?

@krzysztofrusek
Copy link
Author

Ok, lets wait for you to finish and I would love to give it a try - epscially for symplectic integrators.

@krzysztofrusek krzysztofrusek mentioned this pull request Jul 4, 2024
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.

2 participants