Rational far fields: equivalent charges with free poles against the multipole series.
The multipole (Taylor) far field of a cell converges like rho**p with rho the cell’s half-diagonal over the target distance, which is why a fast multipole method needs rho well below one and many accepted cell pairs. A rational approximant (AAA, Nakatsukasa-Sete-Trefethen) of the same far field, read off in partial fractions, is a set of m equivalent complex charges at optimised positions; its convergence rate is set by the distance of the poles rather than by the convergence radius of a series, so it can be accurate where the series is not. This example measures what that buys, at equal cost per target (p series terms against m = p/2 charges, two parameters each).
Source: examples/rational_far_field.py. Run it yourself with python examples/rational_far_field.py [--output examples/output] [--quick] (needs pip install "tree-d-3d[examples]").
Figures
Section titled “Figures”Loading interactive figure…
field error of a 32-charge cell against the number of parameters, for the Taylor series and the AAA equivalent charges, at separation ratios 0.5, 0.7 and 0.9; the rational far field wins by orders of magnitude where the series barely converges.
Loading interactive figure…
the gain (Taylor error over rational error) against the number of sources in the cell; it decays, because the far field of n charges has n branch points and m free poles cannot resolve them all.
Loading interactive figure…
error against the evaluation radius for a rational fit made on one circle; the series keeps improving with distance, the rational fit plateaus at its fit accuracy, so a fit must be made at the closest accepted separation.
Loading interactive figure…
error of a cell’s representation against its level in a quadtree, for the Taylor series (exact upward translation), a flat AAA fit from all the cell’s particles, and a hierarchical AAA fit that compresses the children’s equivalent charges; the hierarchy is what keeps the small-cluster gains at the top of the tree.
Loading interactive figure…
the number of accepted (far-field) and near-field cell pairs of the dual-tree traversal against theta, for a fixed cloud; what a larger theta would buy.
--quick uses smaller clouds and fewer orders (about 20 s instead of a few minutes). Needs Plotly (pip install 'tree-d-3d[examples]'). The scripts behind the tables in the research notes are benchmarks/rational_far_field*.py.