4

I am using boost::odeint and so far I was using the runge_kutta4 stepper. Now I would like to switch to a leapfrog method, e.g. my iteration step should look like:

f(t+dt) = f(t-dt) - p * f(t)

So I need a multistep method, but I am a bit lost with the documentation and would like to get some help.

Jeffrey Kevin Pry
  • 3,266
  • 3
  • 35
  • 67
user1304680
  • 700
  • 2
  • 5
  • 18

1 Answers1

3

The leap-frog is currently not implemented. But it should be easy to implement with the help of the Adam-Bashforth method. I have opened a ticket in our issue tracker: https://github.com/headmyshoulder/odeint-v2/issues/119

headmyshoulder
  • 6,240
  • 2
  • 20
  • 27
  • what are the chances this will be implemented soon ? – user1304680 Jan 07 '14 at 17:13
  • They are pretty high. Nearly everything already exist. We only need a small refactoring of the Adam-Bashforth method for arbitrary coefficients. – headmyshoulder Jan 07 '14 at 19:58
  • ok, I had a look at Leapfrog. It is not that easy to implement. If you need a solver for Hamiltonian or Newtonian systems you can also use one of the symplectic methods like symplectic Euler, or ymplectic_rkn_sb3a_m4_mclachlan. – headmyshoulder Jan 13 '14 at 07:38