Source
engines/quan_loncar_meep_lab/notes/quality_refinement.md · assembled 2026-09-05 15:13 UTC.
Stage two: refining Q on a created structure¶
Creation maximizes emitted power at a fixed drive frequency, which brings a resonance into being but says nothing about how long it lives. Refinement tracks the pole itself. No adjoint is involved: the eigenproblem is complex-symmetric, so the left eigenvector is the transpose of the right one and the eigenvalue derivative falls out of the mode alone. One eigensolve per candidate.
The gradient is validated¶
Perturbing by phi -> phi -+ delta is an exact uniform dilation on a signed
distance field, so the test carries no advection, no scatter and no velocity
interpolation. Against the analytic dQ/dh summed over every wall point:
| delta | measured | ratio to predicted |
|---|---|---|
| 8 nm | 1348.1 | 0.8987 |
| 4 nm | 1358.9 | 0.9059 |
| 2 nm | 1365.4 | 0.9102 |
Monotone toward about 0.91 as the step shrinks. For contrast, the same test on the geometry from before the state-versus-view fix gave 0.5935, 0.5708, 0.4092 — no settling at all. That is the difference between a gradient with a finite-difference bias and one being evaluated on the wrong wall.
The residual nine percent is not chased. Acceptance is by measurement, so a magnitude error bounds prediction quality rather than correctness, and the direction is what the trust region needs. This matches the earlier finding on wall-mode directions, where the analytic magnitude was off by 1.63 while smooth-boundary directions validated at 0.954.
One thing the test exposed: shifting a distance field lands the contour nearer the medial axis, where the field has ridges rather than smooth level sets. The wall inherits those kinks and a 4 nm shift asked for 989,100 degrees of freedom. One cell of filtering fixes it — the same anti-aliasing every advected step already gets. The robust erosion/dilation formulation will need this, since it perturbs the same way.
What the eight-hole article can and cannot show¶
| before | after | |
|---|---|---|
| Q | 52.89 | 53.26 |
| wavelength | 1591.7 nm | 1591.8 nm |
| accepted | 3 of 11 |
Seven tenths of a percent, then the feature floor stops it. The loop is behaving — it ascends, rejects correctly, halves the trust step, converges — but there is nothing here to win. Fifteen holes span 2.33 micrometres, three and a half periods each side of the defect, so Q is capped near fifty-five by running out of mirror rather than by the shape of any wall.
Two lessons carried forward.
The article has to be long enough. The five micrometre article exists for this: fifteen holes, seven periods a side. Its uniform seed sits at F_P 0.051 against the short article's 0.355, which is the bandgap actually being deep.
Creation must stop short of the fabrication floor. The short article's creation stage drove every feature to 40 nm because that maximized F_P, and refinement then had nowhere to move — iteration 2 was rejected on minimum feature, and the run spent most of its life halving the step. Creation on the five micrometre article uses a 60 nm floor against refinement's 40 nm, so the second stage inherits room to work in. The two stages want different floors and the pipeline should say so rather than sharing one number.