Previous
ToC
Up
Next
Contents
Preface
Acknowledgments
An N-Body Code
First Attempt
Driver
Input
N-Body Integrators
Inspecting the Leapfrog
Acceleration
Newtonian Gravity
A Matter of Taste
Potential Energy
Local Arrays
Energy Diagnostics
Testing the N-body Code
A 2-Body System
A Bug
The Simplest Case
A Variation
Another Variation
Two Variations
A single Time Step
Debugging the N-body Code
Forward Euler
Nothing Wrong
Two Possibilities
Back to Square One
A Warning Light
Hindsight
Bug Fixed
One More Check
A Single-Links Version
A Figure-8 Triple
Switching Places
Single Links in +Body+
Single Links in +Nbody+
The DRY Principle
Simplifying Further
Finishing the Revision
Two Tests
Returning to Simplicity
Extra +Body+ Variables
Alternatives
Forward
Clean Code
Sending a String
Wishful Thinking
Implementation
Indirect String Sending
The Same, Yet Different
Testing
A Final Version
Clarity
Brevity
Correctness
More Information
An Initial Snapshot Output
A New Driver
A Final Test
An Eight-Body System
Setting Up a Cube
Letting Go
Passing Through
Convergence
Softening
Close Encounters
Fuzzy-Point Particles
A New Driver
A Code with Softening
Details
Cold Collapse with Softening
Check
Large Softening
Even larger softening
Small Softening
Central Collapse
Literature References
Previous
ToC
Up
Next