Skip to content

Quadratic and cubic B-spline deposit and gather over all patches in one compiled call, and a vectorized accumulation schedule - #77

Merged
max-models merged 30 commits into
develfrom
claude/tree-d3d-poison-maxwell-atyjic
Nov 25, 2026
Merged

max-models merged 30 commits into
develfrom
claude/tree-d3d-poison-maxwell-atyjic

Conversation

@max-models

@max-models max-models commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner
  • New Pyccel kernels scatter_blocks and gather_blocks (with NumPy fallbacks): deposit and interpolate with mpifield's quadratic and cubic B-splines add the markers of all patches in one call into a buffer of the blocks, using mpifield's spline_cell. Cloud-in-cell keeps the bincount path, which is faster for degree 1; other shapes keep their kernels per patch. A rank without markers skips the kernels.
  • The accumulate_halos schedule is built from the nodes of all local patches at once instead of patch by patch (68 to 11 ms on the 386 blocks of 8 of the quadtree benchmark).
  • Tests: the one-pass deposit and gather equal mpifield's kernels patch by patch for degrees 1-3 (to 1e-12, with periodic boundaries), and a rank without markers deposits and gathers nothing.

Timings (one rank, 386 blocks of 8, 200 000 markers; per-patch kernels → one call): deposit 58 → 50 ms (degree 2), 60 → 61 ms (degree 3); gather 74 → 49 and 57 → 51 ms. The quadtree benchmark's deposit with blocks of 8 goes from 65 to 48 ms; the rest is within noise (benchmarks/quadtree/RESULTS.md).

…, owners by rank table, and regrid(fields=).
@max-models
max-models merged commit 857ffe3 into devel Nov 25, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant