diffrax
diffrax copied to clipboard
Add the Störmer-Verlet method + symplectic test changes
Changes:
- Add the Störmer-Verlet method
- Add
all_symplectic_solverstotest/helpers. - Change
test_semi_implicit_eulerto a parameterised testtest_symplectic_solverswhich includes Störmer-Verlet - Add an order test
test_symplectic_ode_ordersimilar totest_ode_orderusing a simple harmonic oscillator as the base problem instead of the linear equation intest_ode_order.
Störmer-Verlet is implemented in the general partitioned form updating p and q with generic vector fields f(p) and g(q) rather than the more common version which assumes g(q) = q. This is consistent with the Diffrax implementation of SemiImplicitEuler.