Milestone 4: staggered Yee solver and condensed periodic leads
Outcome
The 3D optimizer has crossed the operator-construction gate. The defect now uses a staggered Yee discretization, while each semi-infinite nanobeam mirror is still represented by an exact frequency-dependent self-energy. Internal slices of a mirror period are eliminated before surface recursion, reducing the workstation lead problem from 2,520 to 420 dense unknowns.
This milestone validates the numerical machinery; it does not claim a cavity Q or Purcell factor. The next scientific milestone is a complex-frequency pole solver with the frequency derivative of the mirror self-energy.
Changes from the collocated reference
- Electric fields occupy Ex, Ey, and Ez edge sublattices.
curl(E)occupies the three dual-face sublattices.- Cell-centred epsilon is interpolated to the edges by
W_epsilon; the adjoint uses the exact transpose mapW_epsilon.T. - Electric and magnetic inverse PML tensors are sampled at their respective staggered locations.
- The grad-div development penalty is no longer used.
- The discrete incidence matrices satisfy
curl @ gradient = 0exactly. - The fixed defect terminal slice is phase matched to the final narrow mirror slice; this is required because edge epsilon straddles the lead cut.
Exact lead condensation
Let q_n be the retained surface plane of period n and r_n its internal slices. Eliminating r_n by a Schur complement produces an equivalent chain
whose block dimension is one transverse vector plane. A surface period has a slightly different onsite block because it has no inward neighbouring segment; the implementation carries this surface block separately through the Lopez-Sancho reduction.
The slow full_period backend remains selectable and is used as an independent regression oracle. For both mirror directions on the test grid, condensed and full-period surface Green matrices agree to better than 8e-15 relative error.
Acceptance results
| Check | Local grid | 40 x 14 x 10 grid |
|---|---|---|
| Vector unknowns | 3,780 | 16,800 |
| Topology variables | 112 | 1,040 |
| Lead reduction | 756 -> 189 | 2,520 -> 420 |
| Complex symmetry | 3.646e-14 | 1.077e-14 |
curl(grad) residual | 0 | 0 |
| Two-period translation | 1.703e-11 | 1.656e-11 |
| Surface Dyson residual | 7.091e-14 | 7.741e-14 |
| Condensation reciprocity | 2.520e-14 | 2.213e-14 |
| Directional-gradient error | 4.085e-8 | 1.250e-5 |
| Peak RSS | 0.195 GiB | 0.594 GiB |
| End-to-end runtime | 5.5 s | 45.61 s |
The eight-step local continuation increased the zero-added-loss LDOS from 108.923 to 109.142 while keeping the full |x| < 0.5 lambda0 strip immutable air. This short run is only an optimizer sanity check, not a high-Q result.
Next implementation gate
Implement nonlinear complex-pole continuation for
including dSigma_L/domega and dSigma_R/domega. Validate the extracted Q = Re(omega)/(2|Im(omega)|) against a sufficiently resolved real-frequency LDOS linewidth for a fixed geometry. Only after pole/linewidth agreement should topology optimization target intrinsic Q and, subsequently, guided-mode beta factor and fabrication robustness.