- #1
Dalor
- 9
- 0
- TL;DR Summary
- I am trying to solve the trajectory of particle in a time independent field and I'm looking for the most efficient way, ie smallest error on the energy for a given calculation's time. I thought 4th order leapfrog integrator was better than RK4 but quick try does not seems to agree.
Summary: I am trying to solve the trajectory of particle in a time independent field and I'm looking for the most efficient way, ie smallest error on the energy for a given calculation's time. I thought 4th order leapfrog integrator was better than RK4 but quick try does not seems to agree.
(first thing : I don't know much about integrator)
I want to solve the trajectory of particle in a analytic field I know ( it is not possible to use symplectic method due to complicated evaluation such as elliptic integral etc. ). Right know I use a RK4 integrator with adaptative step ( the one in GEANT4). But from reading here and there I thought 4th order integrator could be better for energy conservation. So for testing, I try to solve simple system (particle in a 2D quadratic potential) in scilab with RK4 and 4th order leap frog integrator and the efficency (error versus solving time) was very close (with a small advantage for RK4 method). So it seems that there is not much difference between RK and leapfrog.
I have to add that trajectory i want to solve are not stable trajectory (they can but by accident) and maybe in this situation all integrator are more or less equivalent ?
So my question is : in which situation 4th order leapfrog integrators are better than RK4. Is this possible to use those with adaptative step ?
( I eventually wish to replace the RK4 adaptative step integrator of GEANT4 by a new one)
(first thing : I don't know much about integrator)
I want to solve the trajectory of particle in a analytic field I know ( it is not possible to use symplectic method due to complicated evaluation such as elliptic integral etc. ). Right know I use a RK4 integrator with adaptative step ( the one in GEANT4). But from reading here and there I thought 4th order integrator could be better for energy conservation. So for testing, I try to solve simple system (particle in a 2D quadratic potential) in scilab with RK4 and 4th order leap frog integrator and the efficency (error versus solving time) was very close (with a small advantage for RK4 method). So it seems that there is not much difference between RK and leapfrog.
I have to add that trajectory i want to solve are not stable trajectory (they can but by accident) and maybe in this situation all integrator are more or less equivalent ?
So my question is : in which situation 4th order leapfrog integrators are better than RK4. Is this possible to use those with adaptative step ?
( I eventually wish to replace the RK4 adaptative step integrator of GEANT4 by a new one)
Last edited: