Skip to content

Reduce FMMs for PDE systems - #338

Merged
inducer merged 3 commits into
inducer:mainfrom
alexfikl:reduce-fmm
Nov 20, 2026
Merged

inducer merged 3 commits into
inducer:mainfrom
alexfikl:reduce-fmm

Conversation

@alexfikl

@alexfikl alexfikl commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

This is another chunk of #195. It adds the syzygy-based factorization of IntG systems that should reduce the number of FMMs.

TODO:

  • Actually understand the algorithm.
    • It seems like sometimes it can fail. Would be nice to figure that out.
    • Briefly: the generating set that gets computed for the syzygy is not particularly optimal, so sometimes the modules can be bigger than expected. Doing it "properly" is NP-hard, so we'll see what things fail and maybe special case them somehow in the future.
  • Add a bunch of tests.
  • See if anything can be moved out to sumpy or pymbolic.

ROADMAP:

cc: @isuruf
xref: #195

@alexfikl
alexfikl force-pushed the reduce-fmm branch 2 times, most recently from 141e14c to 170d6b1 Compare November 13, 2026 08:32
@alexfikl
alexfikl requested a balanced review from Copilot November 13, 2026 15:46
@alexfikl
alexfikl marked this pull request as ready for review November 13, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Kernel reduction ignores supplied argument bindings, potentially introducing unbound parameters into reconstructed expressions, while sparse factors can trigger an AttributeError during reconstruction.

5 open issues
What changed in this PR

This PR adds syzygy-based factorization of IntG systems to reduce fast multipole method (FMM) evaluations. It provides the reduction step for the broader effort to share source computations across PDE systems; integration with kernel rewriting remains separate.

Changes:

  • Convert source derivatives and densities into polynomial matrices.
  • Factor matrices using kernel PDE identities and reconstruct source/target expressions.
  • Add tests for the paper’s factorization example and a Laplace-system reduction.
File Description
test/​test_symbolic_reduce_fmm.py Tests polynomial factorization and Laplace-based reduction.
pytential/​symbolic/​reduce_fmm.py Implements compatibility checks, polynomial conversion, factorization, and expression reconstruction.

Review effort: Balanced

Comment thread pytential/symbolic/reduce_fmm.py Resolved
Comment thread pytential/symbolic/reduce_fmm.py Resolved
Comment thread pytential/symbolic/reduce_fmm.py Resolved
Comment thread pytential/symbolic/reduce_fmm.py Resolved
Comment thread pytential/symbolic/reduce_fmm.py Resolved
@alexfikl
alexfikl force-pushed the reduce-fmm branch 2 times, most recently from b059f8c to 1b232a5 Compare November 13, 2026 19:57
Comment thread pytential/symbolic/reduce_fmm.py Resolved
Comment thread pytential/symbolic/reduce_fmm.py Resolved
@alexfikl
alexfikl force-pushed the reduce-fmm branch 2 times, most recently from fee0c05 to 8f1bdc2 Compare November 20, 2026 09:12
Co-authored-by: Alexandru Fikl <alexfikl@gmail.com>
Co-authored-by: Andreas Kloeckner <inform@tiker.net>
@alexfikl

Copy link
Copy Markdown
Collaborator Author

@inducer This should be good to go now. Removed the source_dependent_variables thing for now and the CI is passing!

@inducer
inducer merged commit 9785d1d into inducer:main Nov 20, 2026
8 checks passed
@inducer

inducer commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks! As discussed, this looks great. In it goes. 🎉

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.

4 participants