# Energy conserving (or symplectic) solvers for differential equations?

**URL:** <https://discourse.julialang.org/t/energy-conserving-or-symplectic-solvers-for-differential-equations/130840>\
**Category:** Modelling & Simulations\
**Tags:** diffeq\
**Created:** [July 18, 2025, 8:47am UTC](https://discourse.julialang.org/t/energy-conserving-or-symplectic-solvers-for-differential-equations/130840 "2025-07-18T08:47:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://discourse.julialang.org/u/Flow)\
**Post date:** [July 18, 2025, 8:47am UTC](https://discourse.julialang.org/t/energy-conserving-or-symplectic-solvers-for-differential-equations/130840/1 "2025-07-18T08:47:02Z")

</div>

Hello there,  
I am relatively new to Julia and am currently trying to calculate trajectories of a physical system on GPUs, which in generally works like a charm, as long as I do not include an minimum coupling term in my problem. In this case the energy conservation of the system breaks and the results are all wrong. So my question is, is there any symplectic / energy conserving integrator available on GPUs that I have missed, or are there other known ways to avoid this kind of problems ?

Already thanks in advance for any kind of input!

---

<div class="post-metadata">

**Author:** ![jgreener64](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jgreener64/32/2483_2.png) [@jgreener64](https://discourse.julialang.org/u/jgreener64)\
**Post date:** [July 18, 2025, 10:17am UTC](https://discourse.julialang.org/t/energy-conserving-or-symplectic-solvers-for-differential-equations/130840/2 "2025-07-18T10:17:31Z")

</div>

I don’t know if you are simulating atomic systems, but there might be something useful in [Molly.jl](https://github.com/JuliaMolSim/Molly.jl).

---

<div class="post-metadata">

**Author:** ![Flow](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Flow](https://discourse.julialang.org/u/Flow)\
**Post date:** [July 18, 2025, 10:52am UTC](https://discourse.julialang.org/t/energy-conserving-or-symplectic-solvers-for-differential-equations/130840/3 "2025-07-18T10:52:41Z")

</div>

Thanks for taking the time to answer. I found a solution in enforcing the energy conservation inside my definition of the ODE. That should work for now, but thanks for your answer!
