Add the stress kernel for linear elasticity#292
Open
alexfikl wants to merge 4 commits into
Open
Conversation
Collaborator
Author
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.
6b3c394 to
fcd19bc
Compare
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.
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.