Conserving tree studies
The parameter studies behind the conserving tree code, as figures.
Companion of conserving_tree_code.py; each figure answers one question:
Source: examples/conserving_tree_code_studies.py. Run it yourself with python examples/conserving_tree_code_studies.py [--output examples/output] [--quick] (needs pip install "tree-d-3d[examples]").
Figures
Section titled “Figures”
Loading figure…the pair potential and field of the bare, Plummer and compact (smooth cloud) softening; why the far field of the compact one is exact.

Loading figure…the smoothstep weights of two neighbouring leaves across their edge and the derivative that enters the force.

Loading figure…field error (order 12, theta 0.5), memberships per particle and the energy error of a co-moving Verlet run (order 2, theta 0.8; dashed: the direct sum, i.e. the integrator alone) against the band width delta over the smallest leaf half-width h_min.

Loading figure…the cheapest (order, theta) reaching a given field error for the rectangle and the triangle truncation, with the M2L and near-field work counted.

Loading figure…energy error over a long Verlet run (order 3, theta 0.8): no secular drift with smooth membership on fixed co-moving boxes.

Loading figure…where the field error (order 8, theta 0.6) sits, for hard (top) and smooth (bottom) membership (it is not concentrated at leaf edges, and blending does not change its distribution).

Loading figure…the size of the Phi grad w force term relative to the ordinary w G term, which is what restores the exact gradient.