Repository navigation
fix(rcwa): stabilize independent uniform materials, fields and derivatives - #98
Merged
Merged
Conversation
…h responses Keep a double material and its cotangent out of a complex64 intermediate when a Python wavelength selects the Torch default precision. Co-authored-by: Codex <noreply@openai.com>
… tangents Use rationalized scalar interfaces and a two-face recursion for transformed homogeneous nonmagnetic region stacks. Preserve both scattering ports and fields without removing independent equal-valued inputs. Compensated root residuals limit accumulated phase error. Ports: 72c5266ff4f21a6104d413550593f230b6755328 Co-authored-by: Codex <noreply@openai.com>
Leave an exactly zero normal root untouched by residual refinement, keep ETM scattering unavailable, and verify efficiency-only versus amplitude solves. Co-authored-by: Codex <noreply@openai.com>
yonghakim
marked this pull request as ready for review
October 22, 2026 03:01
Keep existing failures and exit statuses while making the license detail and failed distribution command visible without downloading the job log archive. Co-authored-by: Codex <noreply@openai.com>
The installed CI timezone database is absent from the base inventory. Review the official wheel metadata and Apache-2.0 license files, record its SHA256, and keep the existing strict checker and dependency requirements unchanged. Co-authored-by: Codex <noreply@openai.com>
The existing Torch wavelength-derivative regression exposed Python scalar exterior permittivities reaching array-only real/imag operations. Promote them through the root array without detaching material or wavelength derivatives. Co-authored-by: Codex <noreply@openai.com>
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.
Independent layer permittivity inputs at the complex-angle knife edge in #21 can still give order-one errors after the shared-material fixes. For a homogeneous nonmagnetic region stack, this change keeps each independent material and uses rationalized Fresnel interfaces, a two-face recursion, and compensated normal-root residuals. Reflection, transmission, field reconstruction and both SMM ports come from the same calculation. ETM and SMM use this direct homogeneous path under material transformations; concrete eager solves retain their existing path.
The same work fixes a Torch material-response narrowing: a Python wavelength must not cast a float64 material through complex64 and overflow its otherwise finite cotangent.
Validation:
Scope: second-order, single-plane-wave, scalar nonmagnetic region stacks with no shapes. Patterned/raster, magnetic/tensor, first-order and coherent-source cases retain their existing limits. Physical poles, cutoffs and values beyond floating-point range are not resolved generally. This partially addresses #21 and does not close it. No release changes.
CI follow-up: the first Ready run failed the license inventory step and installed-distribution checks. Failure annotations identified an unreviewed installed
tzdata 2026.5package, also confirmed in the macOS installed check. The base inventory reproduces the same missing-entry error. The official wheel METADATA and Apache-2.0 license files were reviewed and recorded with the wheel hash; no dependency requirement or license policy was weakened. License/doc tests: 194 passed, one existing skip. Replacement required CI passed.Ports: 72c5266ff4f21a6104d413550593f230b6755328
Full CI then exposed a Torch wavelength-derivative regression in the new homogeneous path: constant Python-scalar exterior materials reached tensor-only real/imag operations. The existing test reproduces the failure on bd237a6 and passes on the unmodified base. Commit7fff0185 promotes those constants through the root array without detaching the graph; the unchanged existing test now passes. Related material/uniform tests passed76, including all21 uniform cases. The exact7fff0185 eager corpus remains byte-identical for all1,952 entries with four existing refusals. Replacement full CI39717299468 passed all eight required gates (52 successful jobs, one existing diagnostic-only skip).
Integrated by Rebase and merge as
ca5d27750a88810efe9329aee62794795241ffb3, tree-identical to the reviewed candidate. Exact-main tests39718968235 and CodeQL39718967784 succeeded. No release was made.