You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modernizes Elmer capacitance extraction around current meshwell and Elmer interfaces, including terminal-aware meshing, validated SIF/solver execution, Maxwell matrix results, and explicit layer-stack requirements, while adding packaging, CI, documentation, tests, and container support.
Sequence diagram for Elmer Maxwell capacitance extraction
Flow diagram for lumped-to-Maxwell capacitance conversion
flowchart LR
A[Elmer lumped capacitance matrix] --> B[_lumped_to_maxwell]
B --> C[Negate off-diagonal terms]
C --> D[Set diagonal to row sums]
D --> E[_pair_capacitance_matrix]
E --> F[Port-named Maxwell capacitance matrix]
Loading
File-Level Changes
Change
Details
Files
Reworked Elmer meshing, physical-group interpretation, material assignment, SIF generation, and solver execution for current meshwell/Elmer behavior.
Require an explicit layer stack and named background volume, with validation for materials, terminals, mesh groups, solver parameters, and unsupported mesh options.
Split and merge terminal geometry per component port, sanitize physical-group identifiers, resolve Elmer body/boundary indices, and generate updated SIF inputs.
Reuse supplied meshes, manage temporary and persistent result paths, and propagate missing executable, MPI, and nonzero solver failures.
Updated project metadata and dependency constraints for compatibility with the supported ecosystem.
Align xarray's version range with tidy3d and modernize authorship and license declarations.
pyproject.toml uv.lock
Tips and commands
Interacting with Sourcery
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
One or more custom setup steps configured for this repository failed during this Copilot code review run:
Run {
Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.
Note
You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
Unresolved findings include incorrect SIF body mapping, a broken default wrapper call, missing mpiexec validation, and an incomplete test skip condition.
Get a fresh assessment by requesting another Copilot review.
Reject non-finite values in Maxwell matrix results
gplugins/elmer/get_capacitance.py:480
The new result path validates only the matrix shape. If Elmer exits successfully but writes NaN/Inf (for example after an invalid or non-converged solve), _lumped_to_maxwell propagates those values and ElectrostaticResults returns them; the smoke test itself treats finiteness as part of the contract. Reject non-finite entries before returning the Maxwell matrix so callers cannot consume an invalid result.
Handle partial Elmer installations in ElmerGrid test
gplugins/elmer/tests/test_elmer.py:400
elmer_installed is true only when both ElmerGrid and ElmerSolver are present, but this test assumes ElmerGrid itself is absent. On a host with ElmerGrid installed and ElmerSolver missing, _elmergrid runs and the pytest.raises(..., match="ElmerGrid") assertion fails before testing layer-stack immutability. Force shutil.which to return None in this test, or skip based specifically on ElmerGrid, so partial installations do not make the suite fail.
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
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.
uv.lock.