Skip to content

Add the stress kernel for linear elasticity#292

Open
alexfikl wants to merge 4 commits into
inducer:mainfrom
alexfikl:elasticity-stress
Open

Add the stress kernel for linear elasticity#292
alexfikl wants to merge 4 commits into
inducer:mainfrom
alexfikl:elasticity-stress

Conversation

@alexfikl

@alexfikl alexfikl commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator
  1. This adds a little base class for every PDE (Stokes, elasticity, Brinkman ATM) to avoid some repetition.
  2. Adds the elasticity stress tensor. This is essentially just
$$\Sigma_{ijk} = \lambda \left( \frac{\partial G_{lk}}{\partial x_l} \right) \delta_{ij} + \mu \left( \frac{\partial G_{ik}}{\partial x_j} + \frac{\partial G_{jk}}{\partial x_i} \right)$$

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

$$\Sigma_{ijk}(\mathbf{r}) = -\frac{1}{8\pi(1-\nu)r^2} \left[ (1-2\nu)\left( \delta_{jk}\frac{r_i}{r} + \delta_{ik}\frac{r_j}{r} - \delta_{ij}\frac{r_k}{r} \right) + 3\frac{r_i r_j r_k}{r^3} \right]$$

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.

@alexfikl

Copy link
Copy Markdown
Collaborator Author

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.

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 ElasticityStressComponentKernel and ElasticityStressSystemKernel, 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.py to 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.

Comment thread sumpy/kernel.py
Comment thread sumpy/kernel.py Outdated
@alexfikl alexfikl force-pushed the elasticity-stress branch from 6b3c394 to fcd19bc Compare June 27, 2026 17:06
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.

2 participants