Gravity tree
The equations of tree_d_3d.gravity, declared on the code that implements them and checked by the tests.
BarnesHutSimulation
classsourceN-body simulation using Barnes-Hut algorithm.
- kick
- drift
- Order
- 2
- Assumes
- kick-drift-kick leapfrog; the tree is rebuilt and all forces summed twice per step
- bodies outside the fixed
boundsare left out of the tree: they feel forces but exert none
- Built from
BarnesHutTree
classsourceQuadtree-based Barnes-Hut N-body tree.
- force
- monopole
- Assumes
- an object quadtree, one body per leaf, inserted one at a time; the cell side, the softened distance to the centre of mass
- monopole only; no rule opens the cell containing the body; coincident bodies are not handled
- a reference and teaching code, not used by the electrostatic solvers
- References