Skip to content

v2.0: Merge pull request #22 from rpep/readme

Latest

Choose a tag to compare

@rpep rpep released this 30 Aug 22:29
· 11 commits to master since this release
5828c5c

fmmgen v2.0

The first release since 2020!

Highlights

  • Harmonic (trace-free) compression for monopole and dipole sources, cutting the
    cost of M2L (the dominant operator at high expansion order) by storing expansions in
    a basis with (p+1)^2 components instead of C(p+3,3).
  • A new S2M operator, replacing the old seed-then-M2M path for turning a source's
    raw moments into multipole coefficients: 2.25x fewer multiplies at order 3, rising to
    16.86x at order 11.
  • A planar (2D-plane) operator variant, for problems where sources and evaluation
    points lie in a plane: S2Mxy/M2Mxy/M2Lxy/L2Lxy/L2Pxy/M2Pxy and a dedicated P2P kernel
    taking two position arguments instead of three, combinable with compression. The
    example driver now templates its tree/traversal on spatial dimension, giving a real
    quadtree for 2D problems alongside the existing octree.
  • OpenMP performance work: thread pinning (up to 2.3x on a 96-core node), a batched
    and SIMD-vectorized P2P kernel, parallelised solve bookkeeping, and generated Rinv
    using hardware fsqrt instead of pow (2.5-2.9x on the P2P operator alone).
  • Exact-arithmetic operator derivation, letting SymPy factor expressions more
    effectively and dropping stray pow() calls in generated code; the vendored,
    modified copy of SymPy's cse is gone in favor of stock sympy.cse.

Fixed

  • minpow (the option controlling when x*x*x*x*x-style expressions are rewritten as
    pow(x, 5)) was silently a no-op: the exponent-integrality check it relied on always
    failed because of how R was constructed internally.

Compatibility notes

  • Requires Python 3.12+ (was 3.10+).
  • Relicensed to plain MIT; the vendored-SymPy attribution clause is gone now that the
    vendored code has been removed.
  • Dependency management and CI moved from Poetry to uv.

Other changes

  • Linting switched from flake8 to ruff.
  • README rewritten to lead with what fmmgen does and why, plus a quadtree illustration.