Repository navigation
Conversation
…g x and y reconstruct_field(discontinuous='continuity') refused shapes, because it read its operators and eps off raster pixels. It now reads the line through each sample off the outlines: where the edges cross it, with the exact staircase coefficients _segment_series already gives, and a nonzero winding for inside. A wall sits where the shape says, between any two samples, and the same arithmetic runs under jit with no plan. The line is folded once to the outline's lowest vertex and each vertex counts once, so a sample on a wall reads one side at any distance from the cell up to about 60 periods. The rule read the live structure and combined it with the last solve's modes. An in-place shape edit or an assignment moved its field by 0.134, a raster assignment by 0.67, and matrices handed to solve_conv by 0.28: the field of neither scene. So the solve now keeps a copy of its structure and the rule reads only that (continuity.solved_structure); a derivative runs through the copy exactly when it ran through the solve. Matrices from solve_conv have no structure to read and are refused by name. The Fourier sum reads none of this. Against a raster drawing the same walls it agrees to 5e-12 on one and two layers, painted and nested scenes, either winding, both sides and samples on walls and outside the cell; on Li against RETICOLO champ=1 to 4e-11; and eps E has no orders past the truncation on any factorization. The Fourier sum is bit-identical to main. Refused by name: slanted and curved walls, where D_n rather than D_x is continuous and no reference ranks the rule yet; a differentiated angle, which can turn a wall; one order along an axis, where the solve averages what the lines read; and a negative lattice side on shapes. The derivative holds each sample fixed, so an objective over an area takes 'fourier', and a test pins that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The same two-layer stack as golden_reticolo_2d_field.npz with its walls on no pixel line, under champ=1 and champ=0. It is what pins the line-wise rule on a shape structure on its own, since a raster cannot state these walls: 3.6e-11 at worst, where the Fourier sum's E_x is 0.43 from champ=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Result.field(discontinuous='continuity') answers what the solver's door answers, to rounding, on shapes, rasters, one-row rasters and either incidence side. The default stays 'fourier' and is bit-identical to main; the rule is named in the field's metadata under 'discontinuous' only when it was asked for. A result answers from its own snapshot. FieldState keeps the solve's copy of the structure, whether its materials are tensors, and a copy of the lattice, so an edit to the solver or a later run does not reach it. All of that rides the pytree, and pickle and deepcopy still work after a pass through one. A raster on a negative lattice side now gives what the positive basis gives in every component; under a trace, where the sign is not known, a negative side answers NaN where the rule reads. A singular inverse rule on a line a sample is on fails as NumericalError code rcwa.singular, and one no sample is on does not fail the read. A uniform layer takes the rule's derivative, not the sum's, whenever a derivative runs through it, and stays bit-for-bit the sum without one. Refused by name, with code field.discontinuous and path discontinuous: a solve of sources, first-order layers, skew cells, tensor materials, merged layers, and on a raster under jit explicit coordinates, since choosing the pixel under a sample needs concrete values. Counts always work. The guide covers both this door and the shape path of the previous commits. Each 1024 by 1024 raster layer costs 16.8 MB of copy per wavelength, kept whether or not the rule is asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
discontinuous='continuity'now works on shape structures, andResult.fieldtakes it. The default stays'fourier': fields,R,Tand amplitudes hash the same as main on six raster and shape cases.What changed
golden_reticolo_2d_field_off_grid.npzholds RETICOLOchamp=1andchamp=0on walls no raster draws: 3.6e-11 at worst, where the Fourier sum'sE_xis 0.43 away.Result.field(discontinuous='continuity')answers what the solver's door answers, to rounding. It reads the result's own copy, so later edits and runs do not reach it.The rule (Lalanne & Jurek 1998, RETICOLO
champ=1) and the inverse rule (Li 1996) are cited in the guide.What the rule reads
The solve now keeps a copy of its structure and the rule reads only that. Reading the live structure moved the field by 0.134 on a shape edit, 0.67 on a raster assignment and 0.28 on matrices handed to
solve_conv, and none of those is the field of either scene. This replaces a digest guard, which is gone. The derivative runs through the copy exactly when it ran through the solve.Limits
solve_conv.NumericalErrorrcwa.singular, or NaN inE_xon JAX.'fourier'.The spelling
discontinuousreaches the public API here for the first time, so this is the cheapest moment to rename it.Verification
test_layer_selection_and_no_scattering_or_compat_importandtest_canary_inductor_compiles_the_eye_write_in_order, and both fail the same way on93cf7cb1in this environment.tools/run_verification.py --profile quick: 16 passed, 1 failed.test_installed_metadata_matches_the_checkout_distribution_contractfails on93cf7cb1too, because this environment has no installedwavebitmetadata. So quick is not green locally.tests/api/test_docs_contract.py: 166 passed. The Sphinx build was not run.one count: steps sign, does not change behaviour. Four of the 84 survived the first run and got tests that now catch them.The slow and research tiers were not run locally. Mark Ready to run required CI.
Related
Follow-ups filed from review: #132, #133, #134, #135, #136, #137, #138, and a comment on #130 (one global phase). #120 also edits
docs/guide/rcwa/fields.md, so whichever lands second rebases.🤖 Generated with Claude Code