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 map W_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 = 0 exactly.
  • 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

\[ \widetilde V^Tq_{n-1}+\widetilde Hq_n+\widetilde Vq_{n+1}=0, \]

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

CheckLocal grid40 x 14 x 10 grid
Vector unknowns3,78016,800
Topology variables1121,040
Lead reduction756 -> 1892,520 -> 420
Complex symmetry3.646e-141.077e-14
curl(grad) residual00
Two-period translation1.703e-111.656e-11
Surface Dyson residual7.091e-147.741e-14
Condensation reciprocity2.520e-142.213e-14
Directional-gradient error4.085e-81.250e-5
Peak RSS0.195 GiB0.594 GiB
End-to-end runtime5.5 s45.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

\[ A_\mathrm{eff}(\omega,p)E=0, \]

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.