Add the stress kernel for linear elasticity - #292
Conversation
alexfikl
commented
Jun 27, 2026
There was a problem hiding this comment.
Pull request overview
This PR introduces a linear-elasticity stress kernel alongside a small refactor that adds shared “component-kernel base” classes for a few PDE families (Stokes, Elasticity, Brinkman) to reduce repetition. It also extends the test suite to exercise the new elasticity stress system/component kernels and strengthens symmetry/caching assertions for system kernels.
Changes:
- Add
ElasticityStressComponentKernelandElasticityStressSystemKernel, including mapper hooks for scalar-kernel mappers. - Refactor Stokes/Elasticity/Brinkman component kernels to inherit from new base classes that centralize common argument/PDE boilerplate.
- Extend
test_misc.pyto include the new elasticity stress kernels and to assert memoized identity (is) for symmetric system-kernel indexing.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
sumpy/kernel.py | Adds elasticity stress kernels and refactors component kernels via new PDE base classes; updates scalar-kernel mappers for the new stress kernel. |
sumpy/test/test_misc.py | Adds coverage for the new elasticity stress kernels and tightens system-kernel component symmetry checks via identity assertions. |
.basedpyright/baseline.json | Updates the pyright baseline to reflect the refactor/new symbols. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
inducer
commented
Jul 6, 2026
Thx! |
like for Stokes and Brinkman, but written out explicitly. inducer/pytential#162 has it written in terms of the Laplace kernel and the Stresslet kernel, since it's just
where the first 3 terms are Laplace derivatives and the last term is exactly the Stresslet. Since at the end of the day we want to rewrite all of this in terms of the biharmonic, I figure it shouldn't matter.