3 ms·
Any thoughts on Leapfrog integration? I've got a super basic n-body simulator that I'm using for gravity and for coulomb's law. I also need to advance to adapt
by lilgreenland 8y ago
Any thoughts on Leapfrog integration? I've got a super basic n-body simulator that I'm using for gravity and for coulomb's law. I also need to advance to adaptive time steps.
https://landgreen.github.io/physics/notes/electromagnetism/potential/index.html#three-potential-sims https://landgreen.github.io/physics/notes/electromagnetism/p...
- foxes 8y agoLeapfrog is also conservative - it's a symplectic integrator. It's also stable for oscillations for a sufficiently small time step. However I think it requires a constant step size, its not adaptive.
- the_happy_koala 8y agoCan't stop myself from staring at those modulating peaks; hypnotizing stuff! Leapfrog integration, as foxes pointed out, is not symplectic if you apply an adaptive time step. I'm not that concerned about the integrator being symplectic as it's not my intention to run simulations that last for millions of years. If it's possible to add comments to a thread here on hacker news (new to this site!) indefinitely, I'll give you a heads up when I've implemented an integrator with an adaptive time step, and in case you get to it before I do, do share :D!