Skip to content

Add heat kernel#276

Merged
inducer merged 3 commits into
mainfrom
heat-kernel
Jun 3, 2026
Merged

Add heat kernel#276
inducer merged 3 commits into
mainfrom
heat-kernel

Conversation

@inducer
Copy link
Copy Markdown
Owner

@inducer inducer commented Apr 20, 2026

Squashed from #185

To do:

@inducer inducer mentioned this pull request Apr 20, 2026
@ShawnL00 ShawnL00 force-pushed the heat-kernel branch 4 times, most recently from 056b985 to ab21a1a Compare May 18, 2026 19:40
@ShawnL00 ShawnL00 marked this pull request as ready for review May 18, 2026 20:44
@ShawnL00
Copy link
Copy Markdown
Collaborator

This is now ready for review.

@inducer inducer force-pushed the heat-kernel branch 2 times, most recently from dc53273 to c1dd90e Compare June 3, 2026 20:35
isuruf and others added 3 commits June 3, 2026 15:37
Squashed from #185

heat kernel: update test_pde_check & remove test_toy_p2e2e2p

reset the m2l

reset toys.py

revert to sumpy

test_kernels update + toy p2m, p2l

update heat kernel

update heat kernel

 test_p2e2p

 revert + fix

remove redundant lines

update kernel class + e2e baseline

Co-authored-by: Shawn Lin <linchaoqi@outlook.com>
@inducer
Copy link
Copy Markdown
Owner Author

inducer commented Jun 3, 2026

Thanks! Squashed and tweaked a bit. LGTM, I'll just wait for the copilot review and then likely merge.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new HeatKernel (heat-equation Green’s function) to sumpy.kernel and extends the test suite to validate PDE consistency and translation behavior for heat-kernel expansions. It also adjusts toy-context expansion formation to consistently use the “no target-derivative” kernel variant and updates M2L translation code to account for translation preprocessing.

Changes:

  • Add HeatKernel as an ExpressionKernel, including PDE operator support and kernel-mapper integration.
  • Extend existing kernel PDE-check tests to include the heat kernel and add a dedicated translation convergence test module.
  • Refactor expansion-to-expansion (M2L-with-dependent-data) codegen to handle preprocessed source expansion sizes and tighten typing/structure in a few places.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sumpy/kernel.py Introduces HeatKernel, its PDE operator, and mapper hooks.
sumpy/e2e.py Adds typing/property refactors and updates M2L-dependent-data codegen to support preprocessing.
sumpy/toys.py Ensures P2E formation in toy context uses the target-transformation-removed kernel.
sumpy/test/test_misc.py Adds heat-kernel coverage to the PDE-check test and adjusts sampling for time-forward evaluation.
sumpy/test/test_kernels.py Refactors P2E/E2P convergence tests to use toy expansion helpers and updates convergence thresholds/logic.
sumpy/test/test_heat_translations.py New tests for heat-kernel M2M/L2L/M2L translation convergence.
Comments suppressed due to low confidence (1)

sumpy/e2e.py:77

  • The E2EBase.init docstring no longer matches the actual parameters (it references expansion and strength_usage, which are not accepted here). This makes the public API documentation misleading and can confuse users/readers.
            name: str | None = None):
        """
        :arg expansion: a subclass of :class:`sympy.expansion.ExpansionBase`
        :arg strength_usage: A list of integers indicating which expression
            uses which source strength indicator. This implicitly specifies the

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sumpy/e2e.py
@inducer inducer enabled auto-merge (rebase) June 3, 2026 20:53
@inducer inducer merged commit 83c5db0 into main Jun 3, 2026
10 checks passed
@inducer inducer deleted the heat-kernel branch June 3, 2026 21:13
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