Add heat kernel#276
Merged
Merged
Conversation
Closed
056b985 to
ab21a1a
Compare
Collaborator
|
This is now ready for review. |
dc53273 to
c1dd90e
Compare
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>
Owner
Author
|
Thanks! Squashed and tweaked a bit. LGTM, I'll just wait for the copilot review and then likely merge. |
There was a problem hiding this comment.
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
HeatKernelas anExpressionKernel, 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
expansionandstrength_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Squashed from #185
To do: