Repository navigation
Reject averaging for database conductors - #932
Merged
agianno merged 1 commit intoOct 23, 2026
Merged
Conversation
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.
Summary
Keep perfect-conductor averaging consistent at the material-database boundary:
averagable: truefor builtin PEC/PMC and constant materials with infinite electric or magnetic conductivity;averagable: false, keeping generated entries loadable;For example, this material entry currently overrides the loader's correct non-averagable conductor default:
{"model": "builtin", "builtin": "pmc", "averagable": true}Focused loader → builder → averaging probes show that this allows a conductor into smoothing and, with a smoothed dispersive neighbour, can produce a pole-bearing conductor compound which the direct dispersion builder rejects. This is an input/export contract fix, not a claim of demonstrated NaNs, incorrect simulation fields or solver instability.
Compatibility
This intentionally rejects previously accepted JSON that explicitly requests averaging for a perfect conductor. Omitted flags and explicit
falseremain accepted. Finite-material/free-space flags remain unchanged. The focused legacy-parser compatibility cases omit the flag and remain loadable; the full geometry/HDF5 converter was not run.Verification
pre-commit run --all-files --show-diff-on-failureexecuted on actual BASE and PATCH checkouts. Both are not green: they produce the same 411 formatting changes outside this four-file proposal. The existing import reorder in the touched test module is also identical on both sides and is not included here. The one new assertion was folded exactly as pinned Black requests; no unrelated formatting is included.git diff --checkpasses. No full upstream CI result is claimed by these local checks.AI assistance
Claude Code prepared the patch and regression-test draft. Codex independently reviewed the public contracts, performed the scoped tests and paired normal-hook comparison, and handled integration and publication. The only final change to that tested proposal is the assertion's formatting described above.