next up previous contents
Next: 4.1 Two Ways to Up: II. Exploring -Body Algorithms Previous: 3.7 Checking Energy Conservation

4. Exploring $N = 2$ with a Leapfrog Algorithm

During their next session, Alice, Bob, and Carol wrote a second-order integrator, with Bob behind the key board this time. They chose the leapfrog algorithm, one of the most popular integrators for cases where only modest accuracy is needed. In some cases the problem itself does not require high accuracy. In other cases the leapfrog is used to quickly build a prototype, a toy model that can give insight in the overall structure of the problem. At a later stage, once the overall strategy has become more clear, a higher-order integrator can replace the leapfrog. Dense stellar systems are an example of the latter category, where fourth-order algorithms are almost always the engines of choice in $N$-body codes.

We will not follow their dialogue in detail here, but rather describe a summary of their results.



Subsections

The Art of Computational Science
2004/01/25