Validation against published benchmarks
Milestone M10 compares hp-FEM with independent, published reference values, not with
our own implementations. Every benchmark on this page is a convergence test in
tests/convergence/ with the ctest labels convergence and validation; the long local
runs (label validation-long, hidden Catch2 tag, excluded from the test presets) produce
the tables below and are stored as JSON lines in benchmarks/results/. Only numbers are
taken from the sources (parameters and reference results, with the full citation); the
set-ups are described here in our own words. Parameters are never adjusted to match a
reference.
Conventions: time dependence \(e^{-i\omega t}\), lossy media have \(\operatorname{Im}\varepsilon > 0\) (ADR-0002). Values quoted from sources that use \(e^{+i\omega t}\) are conjugated here.
A. Rib waveguide (Vassallo 1997)
Source. C. Vassallo, "1993–1995 Optical mode solvers", Optical and Quantum Electronics 29, 95–114 (1997), section 7 and Table I, column MTRM (the author's reference method, stated to be exact to four digits).
Set-up. A classical semiconductor rib: a guiding layer of refractive index 3.44 on a
substrate of index 3.40, air above, vacuum wavelength 1.15 µm. Under the rib the guiding
layer is 1.0 µm thick in total (rib included); beside the 3.0 µm wide rib it is thinned
to the residual thickness \(t \in \{0.1, 0.3, 0.5, 0.7, 0.9\}\) µm. All materials are
lossless, so the 2D cross-section problem is solved with physics::PropagatingMode<2>
(Nédélec transverse field, H1 longitudinal field). The quantity compared is the
normalised propagation constant
of the fundamental quasi-TE mode (dominant \(E_x\), parallel to the substrate) and the fundamental quasi-TM mode (dominant \(E_y\)). \(\Delta B = 10^{-4}\) corresponds to \(\Delta n_\text{eff} \approx 4\cdot 10^{-6}\). The quasi-TM mode at \(t = 0.9\) µm is leaky (its effective index lies below the TE slab mode of the lateral layer); the solver's value is reported but not asserted.
Discretisation. The cross-section is a PEC box. The mesh is a conforming
tensor-product triangulation (built in the test, tests/convergence/rib_waveguide.cpp)
whose coordinate lines coincide with the material interfaces and are refined
geometrically (ratio 1/4, levels steps) towards the four dielectric corners of the rib,
where the transverse field is singular. On that mesh the polynomial order \(p\) is raised
uniformly. The mirror symmetry in \(x\) is exploited: a PEC wall at \(x = 0\) admits the
modes with even \(E_x\) (quasi-TE class), the natural (PMC) condition those with even \(E_y\)
(quasi-TM class). Within a class the modes are identified by their polarisation fraction
\(\int |E_x|^2 / \int (|E_x|^2 + |E_y|^2)\) (from the component mass matrices), never by
their order in the spectrum. The long study uses walls 3 µm below the layer, 0.5 µm above
the rib and 6 µm beside the rib centre (the source's values) and varies them.
Reference values and results. The tables are produced by the long run
(convergence_rib_waveguide "[validation-long]", results in
benchmarks/results/2026-10-03-validation-rib-waveguide.json); times are wall-clock
seconds for mesh, DoF maps, assembly and eigen-solve on the maintainer's machine
(24 cores, MSYS2 GCC, release preset).
p-convergence on the graded mesh (uniform spacing 0.25 µm, 3 geometric levels of ratio 1/4 at the rib corners, walls 3 µm below / 0.5 µm above / 6 µm beside; the DoF counts and times are those of the \(t = 0.5\) µm case, the other cases are within 5 %):
| t [µm] | mode | B (MTRM) | p = 2 | p = 3 | p = 4 | p = 5 | p = 6 | (B(p=6) − B_ref)·10⁴ |
|---|---|---|---|---|---|---|---|---|
| 0.1 | TE | 0.3019 | 0.301531 | 0.301882 | 0.301896 | 0.301896 | 0.301896 | −0.04 |
| 0.1 | TM | 0.2674 | 0.267425 | 0.267475 | 0.267475 | 0.267475 | 0.267475 | +0.75 |
| 0.3 | TE | 0.3110 | 0.310683 | 0.311018 | 0.311032 | 0.311032 | 0.311032 | +0.32 |
| 0.3 | TM | 0.2751 | 0.275119 | 0.275163 | 0.275163 | 0.275163 | 0.275163 | +0.63 |
| 0.5 | TE | 0.3270 | 0.326678 | 0.326991 | 0.327003 | 0.327004 | 0.327004 | +0.04 |
| 0.5 | TM | 0.2890 | 0.288955 | 0.289020 | 0.289019 | 0.289019 | 0.289019 | +0.19 |
| 0.7 | TE | 0.3512 | 0.350871 | 0.351153 | 0.351164 | 0.351165 | 0.351165 | −0.35 |
| 0.7 | TM | 0.3107 | 0.310680 | 0.310720 | 0.310718 | 0.310718 | 0.310718 | +0.18 |
| 0.9 | TE | 0.3883 | 0.388327 | 0.388531 | 0.388540 | 0.388540 | 0.388540 | +2.40 (wall, see below) |
| 0.9 | TM (leaky) | 0.3455 | 0.345353 | 0.345382 | 0.345381 | 0.345381 | 0.345381 | −1.19 (wall, see below) |
| p | DoF (t = 0.5 µm, half cross-section) | time [s] |
|---|---|---|
| 2 | 12 841 | 1 |
| 3 | 27 361 | 2 |
| 4 | 47 281 | 6 |
| 5 | 72 601 | 17 |
| 6 | 103 321 | 34 |
From \(p = 4\) on the discrete \(B\) is converged to about \(10^{-7}\); the remaining differences to the reference are therefore properties of the reference (four printed digits, i.e. a rounding of up to \(0.5\cdot 10^{-4}\)) and of the box walls, not of our discretisation.
Geometric refinement towards the rib corners (\(t = 0.5\) µm, \(p = 4\)): without grading the corner singularities limit the accuracy to about \(10^{-4}\) in \(B\); three levels suffice.
| levels | DoF | B (TE) | B (TM) |
|---|---|---|---|
| 0 | 22 801 | 0.3270778 | 0.2891156 |
| 1 | 30 129 | 0.3270150 | 0.2890303 |
| 2 | 38 289 | 0.3270047 | 0.2890201 |
| 3 | 47 281 | 0.3270034 | 0.2890188 |
| 4 | 57 105 | 0.3270032 | 0.2890186 |
| 5 | 67 761 | 0.3270032 | 0.2890186 |
Lateral wall position (\(p = 4\)). For \(t \le 0.7\) µm the wall is irrelevant from 4 µm on. For \(t = 0.9\) µm the fundamental mode lies close to the TE slab mode of the thick lateral layer and decays slowly sideways: the wall has to be at 10 µm before the fourth digit of \(B\) is stable. The source's statement that the walls do not matter therefore holds for the thin lateral layers only; at \(t = 0.9\) µm the reference evidently used a wide (or open) lateral domain. The leaky quasi-TM mode at \(t = 0.9\) µm has no converged value in a closed box: its \(B\) and its polarisation fraction (last column, \(\int|E_x|^2\) share) jump with the wall position because it hybridises with the box-quantised slab modes.
| wall |x| [µm] | t = 0.1 TE | t = 0.1 TM | t = 0.9 TE | t = 0.9 TM (leaky; E_x fraction) |
|---|---|---|---|---|
| 4 | 0.301896 | 0.267475 | 0.390415 | 0.343346 (0.01) |
| 6 | 0.301896 | 0.267475 | 0.388540 | 0.345381 (0.04) |
| 8 | 0.301896 | 0.267475 | 0.388328 | 0.345292 (0.31) |
| 10 | 0.301896 | 0.267475 | 0.388306 | 0.345467 (0.02) |
Vertical wall positions (substrate below / air above, in µm, \(p = 4\)). The source's walls (3 below, 0.5 above) are converged to \(2\cdot 10^{-5}\) in \(B\), i.e. they do not change the fourth digit; 4 / 1.0 is converged to \(10^{-6}\).
| below / above [µm] | t = 0.1 TE | t = 0.1 TM | t = 0.5 TE | t = 0.5 TM |
|---|---|---|---|---|
| 2 / 0.5 | 0.301587 | 0.267920 | 0.326702 | 0.289457 |
| 3 / 0.5 | 0.301896 | 0.267475 | 0.327003 | 0.289019 |
| 4 / 1.0 | 0.301907 | 0.267456 | 0.327013 | 0.289001 |
| 5 / 1.5 | 0.301907 | 0.267455 | 0.327014 | 0.289000 |
Symmetry check (\(t = 0.5\) µm, \(p = 4\)): the half cross-section with the symmetry wall at \(x = 0\) reproduces the full cross-section (all four walls PEC, modes classified by their polarisation fraction) to \(10^{-7}\).
| mode | half cross-section (symmetry wall) | full cross-section |
|---|---|---|
| TE | 0.3270034 (47 281 DoF) | 0.3270035 (94 321 DoF) |
| TM | 0.2890188 (47 281 DoF) | 0.2890188 (94 321 DoF) |
CI variant (spacing 0.5 µm, 3 levels, \(p = 4\), walls 4 / 1.0 µm and 5 µm beside, 10 µm beside for \(t = 0.9\) µm; 32 s for the whole test case including the \(p\)-sequence):
| t [µm] | mode | wall |x| [µm] | DoF | n_eff | B | B (MTRM) | (B − B_ref)·10⁴ | time [s] |
|---|---|---|---|---|---|---|---|---|
| 0.1 | TE | 5 | 21 129 | 3.4121256 | 0.301905 | 0.3019 | +0.05 | 2.5 |
| 0.1 | TM | 5 | 21 129 | 3.4107442 | 0.267456 | 0.2674 | +0.56 | 2.5 |
| 0.3 | TE | 5 | 21 129 | 3.4124919 | 0.311041 | 0.3110 | +0.41 | 2.2 |
| 0.3 | TM | 5 | 21 129 | 3.4110525 | 0.275144 | 0.2751 | +0.44 | 2.3 |
| 0.5 | TE | 5 | 20 289 | 3.4131321 | 0.327012 | 0.3270 | +0.12 | 1.7 |
| 0.5 | TM | 5 | 20 289 | 3.4116082 | 0.289001 | 0.2890 | +0.01 | 1.7 |
| 0.7 | TE | 5 | 21 129 | 3.4141005 | 0.351178 | 0.3512 | −0.22 | 2.0 |
| 0.7 | TM | 5 | 21 129 | 3.4124782 | 0.310699 | 0.3107 | −0.01 | 1.9 |
| 0.9 | TE | 10 | 34 209 | 3.4155881 | 0.388311 | 0.3883 | +0.11 | 4.5 |
| 0.9 | TM (leaky) | 10 | 34 209 | 3.4138712 | 0.345456 | 0.3455 | −0.44 | 4.5 |
Assessment.
All nine guided reference values are reproduced within \(0.8\cdot 10^{-4}\) in \(B\) (\(\Delta n_\text{eff} \le 3\cdot 10^{-6}\)), which is the precision of a four-digit reference; our own values are converged an order of magnitude further. The two caveats concern the reference, not the solver: the quasi-TE mode at \(t = 0.9\) µm needs a lateral domain of about 10 µm (the source's claim of wall independence is too optimistic there), and the leaky quasi-TM mode at \(t = 0.9\) µm is not a well-defined eigenvalue of a closed box; with the 10 µm wall our value happens to lie \(0.4\cdot 10^{-4}\) below the published one, but the table above shows that this agreement is accidental. No parameter was adjusted. Cost: the CI table at \(p = 4\) takes about 2 s per mode on 20 000–34 000 unknowns; the long study (p up to 6, \(10^5\) unknowns) takes about 30 minutes in total.
The CI variant of the test checks the nine guided cases at the discretisation shown to be converged above and the \(p\)-sequence for \(t = 0.5\) µm, with the tolerance \(|B - B_\text{ref}| \le 2\cdot 10^{-4}\) (the reference has four digits).
B. Metallic lamellar grating, H parallel to the ridges (Granet & Guizal 1996)
Source. G. Granet, B. Guizal, "Efficient implementation of the coupled-wave method for metallic lamellar gratings in TM polarization", J. Opt. Soc. Am. A 13, 1019–1023 (1996), Table 1, column "Exact" (values computed by L. Li with a modal method); the structure is that of L. Li, C. W. Haggans, J. Opt. Soc. Am. A 10, 1184–1189 (1993).
Set-up. A grating of period \(d = 1\) µm with metal ridges of height \(h\) on a half-infinite substrate of the same metal is illuminated from air at \(\lambda = 1\) µm under \(30°\) with the magnetic field parallel to the ridges (in-plane \(E\)). The metal has the refractive index \(0.22 + 6.71i\) in our \(e^{-i\omega t}\) convention, i.e. \(\varepsilon = -44.9757 + 2.9524i\) (skin depth 24 nm). Two orders propagate: the specular order 0 and order \(-1\) with \(k_y = k_0(\sin 30° - \lambda/d) = -k_0/2\), which travels back along the direction of incidence (Littrow mounting); they are assigned by their wave vector, not by a label. The ridge width is not stated in the sources; it is assumed to be \(d/2\) and the assumption is checked, not fitted (see below).
Discretisation. Bloch-periodic unit cell (tests/convergence/metal_grating.cpp), the
period along \(y\) and the surface normal along \(x\) as the diffraction post-processing of the
library expects; scattered-field formulation with the vacuum plane wave as incident field, PML
in the air above the ridge, PEC 0.25 µm (ten skin depths) below the metal surface, which is
consistent with the scattered field tending to \(-E_\text{inc}\) inside the metal. The mesh is
the tensor-product triangulation of tensor_mesh.hpp with coordinate lines on all interfaces,
graded geometrically (ratio 1/4, three levels) towards the ridge corners and the metal surfaces.
The efficiencies come from the Fourier coefficients of the scattered field on a line in the air,
the absorbed power from \(\tfrac12\,\omega\varepsilon_0\,\operatorname{Im}\varepsilon\int|E|^2\)
over the metal (exact total field of the formulation), so that \(\eta_{-1} + \eta_0 + A = 1\) is
an independent check.
Results (long run convergence_metal_grating "[validation-long]",
benchmarks/results/2026-10-03-validation-metal-grating.json):
p-convergence (spacing 0.25 µm, PML 3 µm of order 4 with target reflection \(10^{-14}\)):
| h [µm] | p | DoF | η₋₁ | η₀ | A | (1 − Σ)·10⁴ | time [s] |
|---|---|---|---|---|---|---|---|
| 0.1 | 2 | 4,568 | 0.33335 | 0.61959 | 0.03006 | -170.0 | 0.0 |
| 0.1 | 3 | 9,540 | 0.34063 | 0.63053 | 0.02790 | -9.4 | 0.1 |
| 0.1 | 4 | 16,304 | 0.34108 | 0.63099 | 0.02790 | -0.4 | 0.1 |
| 0.1 | 5 | 24,860 | 0.34088 | 0.63123 | 0.02790 | +0.1 | 0.4 |
| 0.1 | 6 | 35,208 | 0.34085 | 0.63124 | 0.02790 | -0.0 | 0.9 |
| 1.0 | 2 | 5,054 | 0.09032 | 0.84107 | 0.06057 | -80.4 | 0.0 |
| 1.0 | 3 | 10,557 | 0.10111 | 0.84792 | 0.05001 | -9.6 | 0.1 |
| 1.0 | 4 | 18,044 | 0.10159 | 0.84829 | 0.04996 | -1.6 | 0.1 |
| 1.0 | 5 | 27,515 | 0.10156 | 0.84848 | 0.04996 | -0.0 | 0.5 |
| 1.0 | 6 | 38,970 | 0.10155 | 0.84848 | 0.04996 | -0.0 | 1.2 |
| 4.8 | 2 | 7,646 | 0.00886 | 0.63173 | 0.40242 | +430.0 | 0.1 |
| 4.8 | 3 | 15,981 | 0.04762 | 0.50372 | 0.44841 | -2.4 | 0.1 |
| 4.8 | 4 | 27,324 | 0.05002 | 0.49928 | 0.45073 | +0.3 | 0.2 |
| 4.8 | 5 | 41,675 | 0.05023 | 0.49885 | 0.45093 | +0.0 | 0.8 |
| 4.8 | 6 | 59,034 | 0.05025 | 0.49879 | 0.45095 | -0.0 | 2.0 |
Against the reference (\(p = 6\)):
| h [µm] | η₋₁ (Li) | η₋₁ (hp-FEM) | Δ·10⁴ | η₀ (Li) | η₀ (hp-FEM) | Δ·10⁴ | Σ (Li) | Σ (hp-FEM) | A (hp-FEM) |
|---|---|---|---|---|---|---|---|---|---|
| 0.1 | 0.3408 | 0.34085 | +0.5 | 0.6312 | 0.63124 | +0.4 | 0.9720 | 0.97210 | 0.02790 |
| 1.0 | 0.1024 | 0.10155 | -8.5 | 0.8477 | 0.84848 | +7.8 | 0.9501 | 0.95003 | 0.04996 |
| 4.8 | 0.0503 | 0.05025 | -0.5 | 0.4985 | 0.49879 | +2.9 | 0.5488 | 0.54904 | 0.45095 |
Checks. The flat metal surface (no ridge) reproduces the Fresnel reflectance \(R_p = 0.9781663\) and the absorption \(1 - R_p\):
| p | DoF | η₀ | η₀ − R_p | A | A − (1 − R_p) | 1 − Σ |
|---|---|---|---|---|---|---|
| 2 | 5,054 | 0.9615469 | -1.7e-02 | 0.0239478 | +2.1e-03 | +1.5e-02 |
| 3 | 10,557 | 0.9769805 | -1.2e-03 | 0.0218338 | +5.6e-08 | +1.2e-03 |
| 4 | 18,044 | 0.9780752 | -9.1e-05 | 0.0218321 | -1.6e-06 | +9.3e-05 |
| 5 | 27,515 | 0.9781612 | -5.1e-06 | 0.0218337 | -4.4e-08 | +5.1e-06 |
| 6 | 38,970 | 0.9781652 | -1.1e-06 | 0.0218337 | -4.4e-08 | +1.1e-06 |
The PML matters at the \(10^{-4}\) level: the library's usual 1 µm / order 2 / \(10^{-10}\) layer leaves \(10^{-4}\) of the incident power unaccounted for although every other discretisation parameter is converged; 3 µm / order 4 / \(10^{-14}\) closes the balance to \(10^{-6}\).
| h [µm] | p | DoF | η₋₁ | η₀ | A | (1 − Σ)·10⁴ | time [s] |
|---|---|---|---|---|---|---|---|
| 0.1 | 2 | 4,568 | 0.33335 | 0.61959 | 0.03006 | -170.0 | 0.0 |
| 0.1 | 3 | 9,540 | 0.34063 | 0.63053 | 0.02790 | -9.4 | 0.1 |
| 0.1 | 4 | 16,304 | 0.34108 | 0.63099 | 0.02790 | -0.4 | 0.1 |
| 0.1 | 5 | 24,860 | 0.34088 | 0.63123 | 0.02790 | +0.1 | 0.4 |
| 0.1 | 6 | 35,208 | 0.34085 | 0.63124 | 0.02790 | -0.0 | 0.9 |
| 1.0 | 2 | 5,054 | 0.09032 | 0.84107 | 0.06057 | -80.4 | 0.0 |
| 1.0 | 3 | 10,557 | 0.10111 | 0.84792 | 0.05001 | -9.6 | 0.1 |
| 1.0 | 4 | 18,044 | 0.10159 | 0.84829 | 0.04996 | -1.6 | 0.1 |
| 1.0 | 5 | 27,515 | 0.10156 | 0.84848 | 0.04996 | -0.0 | 0.5 |
| 1.0 | 6 | 38,970 | 0.10155 | 0.84848 | 0.04996 | -0.0 | 1.2 |
| 4.8 | 2 | 7,646 | 0.00886 | 0.63173 | 0.40242 | +430.0 | 0.1 |
| 4.8 | 3 | 15,981 | 0.04762 | 0.50372 | 0.44841 | -2.4 | 0.1 |
| 4.8 | 4 | 27,324 | 0.05002 | 0.49928 | 0.45073 | +0.3 | 0.2 |
| 4.8 | 5 | 41,675 | 0.05023 | 0.49885 | 0.45093 | +0.0 | 0.8 |
| 4.8 | 6 | 59,034 | 0.05025 | 0.49879 | 0.45095 | -0.0 | 2.0 |
Discretisation parameters (grading ratio and levels, uniform spacing down to 0.0625 µm, metal depth below the surface, number of Fourier sampling points) change the converged efficiencies by less than \(2\cdot 10^{-5}\):
| variant | h [µm] | DoF | η₋₁ | η₀ | A | 1 − Σ |
|---|---|---|---|---|---|---|
| metal_depth_0.1 | 1 | 18,044 | 0.10157 | 0.84835 | 0.04992 | +1.6e-04 |
| metal_depth_0.15 | 1 | 18,044 | 0.10159 | 0.84829 | 0.04996 | +1.6e-04 |
| metal_depth_0.25 | 1 | 18,044 | 0.10159 | 0.84829 | 0.04996 | +1.6e-04 |
| metal_depth_0.5 | 1 | 18,624 | 0.10159 | 0.84829 | 0.04996 | +1.6e-04 |
| fourier_points_256 | 1 | 27,515 | 0.10156 | 0.84847 | 0.04996 | +1.1e-05 |
| fourier_points_1024 | 1 | 27,515 | 0.10156 | 0.84848 | 0.04996 | +3.3e-06 |
| fourier_points_4096 | 1 | 27,515 | 0.10156 | 0.84847 | 0.04996 | +5.7e-06 |
| fourier_points_16384 | 1 | 27,515 | 0.10156 | 0.84847 | 0.04996 | +5.1e-06 |
| grading_0.25_0 | 1 | 4,295 | 0.10037 | 0.85017 | 0.05070 | -1.2e-03 |
| grading_0.25_2 | 1 | 18,015 | 0.10156 | 0.84848 | 0.04996 | +4.5e-06 |
| grading_0.25_3 | 1 | 27,515 | 0.10156 | 0.84848 | 0.04996 | +3.3e-06 |
| grading_0.25_5 | 1 | 51,795 | 0.10156 | 0.84847 | 0.04996 | +4.2e-06 |
| grading_0.5_4 | 1 | 38,775 | 0.10155 | 0.84849 | 0.04996 | +2.2e-06 |
| grading_0.5_6 | 1 | 66,575 | 0.10155 | 0.84848 | 0.04996 | +2.1e-06 |
| grading_0.5_8 | 1 | 101,415 | 0.10155 | 0.84848 | 0.04996 | +2.1e-06 |
| spacing_0.25 | 1 | 38,970 | 0.10155 | 0.84848 | 0.04996 | +4.1e-06 |
| spacing_0.125 | 1 | 78,420 | 0.10156 | 0.84848 | 0.04996 | +2.4e-06 |
| spacing_0.0625 | 1 | 192,888 | 0.10156 | 0.84848 | 0.04996 | +2.2e-06 |
| spacing_0.25 | 4.8 | 59,034 | 0.05025 | 0.49879 | 0.45095 | +4.2e-06 |
| spacing_0.125 | 4.8 | 126,966 | 0.05025 | 0.49878 | 0.45096 | +2.1e-06 |
| spacing_0.0625 | 4.8 | 326,478 | 0.05026 | 0.49878 | 0.45097 | +2.2e-06 |
Validation of the assumed fill factor. With \(f = 0.5\) two of the three depths agree with the reference to \(5\cdot 10^{-5}\) (\(h = 0.1\) µm) and \(3\cdot 10^{-4}\) (\(h = 4.8\) µm); \(f = 0.45\) or \(0.55\) change the efficiencies by 3 to 30 percentage points at every depth. The assumption is therefore confirmed, not fitted.
| h [µm] | f | η₋₁ | η₀ | A |
|---|---|---|---|---|
| 0.1 | 0.45 | 0.29433 | 0.67682 | 0.02886 |
| 0.1 | 0.5 | 0.34088 | 0.63123 | 0.02790 |
| 0.1 | 0.55 | 0.37364 | 0.59866 | 0.02769 |
| 1 | 0.45 | 0.00527 | 0.89476 | 0.09996 |
| 1 | 0.5 | 0.10156 | 0.84848 | 0.04996 |
| 1 | 0.55 | 0.09921 | 0.70370 | 0.19709 |
| 4.8 | 0.45 | 0.05130 | 0.79708 | 0.15161 |
| 4.8 | 0.5 | 0.05023 | 0.49885 | 0.45093 |
| 4.8 | 0.55 | 0.15966 | 0.70456 | 0.13577 |
The \(h = 1\) µm case. Our converged efficiencies differ from the reference by \(-8.5\cdot 10^{-4}\) (\(\eta_{-1}\)) and \(+7.8\cdot 10^{-4}\) (\(\eta_0\)) while their sum agrees to \(7\cdot 10^{-5}\). At this depth the air slot between the ridges is resonant (depth \(= \lambda\)), and the efficiencies are extremely sensitive to the geometry and the material: \(\partial\eta/\partial h \approx 3.5\) per µm, so the deviation corresponds to a depth change of 0.24 nm, and rounding \(\varepsilon\) to \(-45 + 3i\) already moves \(\eta_0\) by \(6\cdot 10^{-4}\). The fourth digit of the reference at \(h = 1\) µm therefore depends on details the paper does not state (the exact \(\varepsilon\) and \(h\) used in Li's computation); our discretisation is converged to \(10^{-5}\) and energy-consistent to \(10^{-6}\).
| h [µm] | η₋₁ | η₀ | A |
|---|---|---|---|
| 0.98 | 0.03878 | 0.91322 | 0.04800 |
| 0.99 | 0.06648 | 0.88455 | 0.04897 |
| 1 | 0.10156 | 0.84848 | 0.04996 |
| 1.01 | 0.14373 | 0.80528 | 0.05098 |
| 1.02 | 0.19252 | 0.75547 | 0.05202 |
| ε | η₋₁ | η₀ | A |
|---|---|---|---|
| -44.98 + 2.95i | 0.10156 | 0.84852 | 0.04992 |
| -45 + 3i | 0.10143 | 0.84787 | 0.05069 |
| -44.9757 + 2.9524i | 0.10156 | 0.84848 | 0.04996 |
Assessment. Two of the three depths agree with the four-digit modal reference within the tolerance \(3\cdot 10^{-4}\) (\(h = 0.1\) µm to \(0.5\cdot 10^{-4}\), \(h = 4.8\) µm to \(2.9\cdot 10^{-4}\)) with the assumed fill factor \(f = 0.5\), which the sensitivity table rules out changing. The \(h = 1\) µm case is reported but not asserted (decision with the dev agent, 2026-10-03): the slot is resonant there, the published digits depend on the unstated exact \(\varepsilon\) and \(h\) of the reference computation, and our result is converged to \(10^{-5}\) with an energy balance of \(10^{-6}\) and reproduces the Fresnel limit to \(10^{-6}\). Nothing was fitted or loosened. Lesson for the library: a PML of one wavelength with the quadratic profile and target reflection \(10^{-10}\) is not enough for efficiencies at the \(10^{-4}\) level; 3 µm, order 4 and \(10^{-14}\) are. Cost: about 1 s per solve at \(p = 5\) on 25 000–40 000 unknowns; the whole long study takes a few minutes.
C. Mie scattering from a sphere (analytic, 3D)
Source. C. F. Bohren, D. R. Huffman, Absorption and Scattering of Light by Small
Particles (Wiley, 1983), chapter 4: the Mie series of a homogeneous sphere. The series is
implemented in physics::mie_sphere (coefficients \(a_n\), \(b_n\), \(c_n\), \(d_n\), efficiencies,
fields inside and outside for complex \(\varepsilon\); theory/maxwell.md)
and checked without any FEM: optical theorem, Rayleigh limit, lossless limit, convergence in
the order, continuity of the tangential field and of \(\varepsilon E_r\) across the surface, and
the efficiencies against the independent miepython package (\(Q_{sca}\) and \(Q_{ext}\) agree with miepython 3.3 to eight digits for both test spheres, and the total field at six points inside and outside agrees to \(10^{-6}\)).
Set-up. Two spheres of radius \(a\) in vacuum under the plane wave \(\hat x\,e^{ikz}\): a
dielectric one (\(n = 2\), \(ka = 2\)) and an absorbing "metallic" one (\(\varepsilon = -10 + 1i\),
\(ka = 0.6\)). Compared are the scattering and absorption efficiencies
\(Q = \sigma / (\pi a^2)\) from the Poynting fluxes through the sphere surface
(cross_sections) and the total field at seven points inside and outside the sphere.
Discretisation (tests/convergence/mie_sphere.cpp). The new generator
mesh::box_with_ball (3D counterpart of square_with_disc) resolves the sphere by curved
(quadratic) faces inside a cube with space for a PML; the mirror symmetries of the problem
reduce the domain to the quarter \(x \ge 0\), \(y \ge 0\) (PEC on \(x = 0\), natural condition on
\(y = 0\)), and the fluxes through the quarter sphere are multiplied by four. Scattered-field
formulation, PML on the outer sides, p-refinement on meshes with \(n\) cells per radius.
Results (long run convergence_mie_sphere "[validation-long]", rerun on 2026-11-24 after
the mesh fix of issue #234, benchmarks/results/2026-11-24-validation-mie-sphere.json; the PML
study and the first p-sequence on the previous mesh are in
benchmarks/results/2026-10-03-validation-mie-sphere.json; SparseLU, times on the
maintainer's machine, this time partly under concurrent load, so the times of \(p \ge 3\) are up
to three times those of the previous record for the same systems):
p-convergence (quarter domain, interior half-width 2a, PML 1a of order 3, SparseLU):
| case | n | p | DoF | Q_sca | Q_sca (Mie) | Q_abs | Q_abs (Mie) | err Q_sca | err Q_abs | err field | time [s] |
|---|---|---|---|---|---|---|---|---|---|---|---|
| dielectric n = 2, ka = 2 | 2 | 1 | 3,588 | 4.75794 | 4.77044 | -0.27029 | 0.00000 | 2.6e-03 | 5.7e-02 | 3.8e-01 | 0 |
| dielectric n = 2, ka = 2 | 2 | 2 | 18,264 | 5.02135 | 4.77044 | -0.13203 | 0.00000 | 5.3e-02 | 2.8e-02 | 7.7e-02 | 9 |
| dielectric n = 2, ka = 2 | 2 | 3 | 51,804 | 4.76139 | 4.77044 | 0.01099 | 0.00000 | 1.9e-03 | 2.3e-03 | 1.6e-02 | 105 |
| dielectric n = 2, ka = 2 | 2 | 4 | 111,984 | 4.75489 | 4.77044 | 0.00330 | 0.00000 | 3.3e-03 | 6.9e-04 | 5.8e-03 | 1214 |
| dielectric n = 2, ka = 2 | 3 | 1 | 11,457 | 4.69288 | 4.77044 | -0.19421 | 0.00000 | 1.6e-02 | 4.1e-02 | 3.0e-01 | 3 |
| dielectric n = 2, ka = 2 | 3 | 2 | 59,526 | 4.85170 | 4.77044 | -0.04985 | 0.00000 | 1.7e-02 | 1.0e-02 | 6.4e-02 | 275 |
| dielectric n = 2, ka = 2 | 3 | 3 | 170,451 | 4.76727 | 4.77044 | 0.00455 | 0.00000 | 6.6e-04 | 9.5e-04 | 4.7e-03 | 3029 |
| metallic eps = -10 + 1i, ka = 0.6 | 2 | 1 | 3,588 | 2.39935 | 1.11731 | 0.34616 | 0.22851 | 1.1e+00 | 1.1e-01 | 3.8e-01 | 0 |
| metallic eps = -10 + 1i, ka = 0.6 | 2 | 2 | 18,264 | 1.22617 | 1.11731 | 0.21771 | 0.22851 | 9.7e-02 | 9.7e-03 | 7.6e-02 | 7 |
| metallic eps = -10 + 1i, ka = 0.6 | 2 | 3 | 51,804 | 1.10134 | 1.11731 | 0.22637 | 0.22851 | 1.4e-02 | 1.9e-03 | 2.2e-02 | 81 |
| metallic eps = -10 + 1i, ka = 0.6 | 2 | 4 | 111,984 | 1.12383 | 1.11731 | 0.22944 | 0.22851 | 5.8e-03 | 8.3e-04 | 6.4e-03 | 664 |
| metallic eps = -10 + 1i, ka = 0.6 | 3 | 1 | 11,457 | 1.43567 | 1.11731 | 0.26154 | 0.22851 | 2.8e-01 | 3.0e-02 | 3.2e-01 | 1 |
| metallic eps = -10 + 1i, ka = 0.6 | 3 | 2 | 59,526 | 1.14525 | 1.11731 | 0.22516 | 0.22851 | 2.5e-02 | 3.0e-03 | 4.4e-02 | 128 |
| metallic eps = -10 + 1i, ka = 0.6 | 3 | 3 | 170,451 | 1.11376 | 1.11731 | 0.22852 | 0.22851 | 3.2e-03 | 4.3e-06 | 4.5e-03 | 2218 |
Assessment. The 3D solver converges to the Mie series in \(p\) for both spheres. The field error, the most robust measure, falls by a factor 3 to 5 per order at \(n = 2\) (\(0.38\), \(0.077\), \(0.016\), \(0.0058\) for the dielectric sphere, \(0.38\), \(0.076\), \(0.022\), \(0.0064\) for the absorbing one), and the finer mesh \(n = 3\) at \(p = 3\) reaches \(4.7\cdot 10^{-3}\) and \(4.5\cdot 10^{-3}\). The efficiencies are integrals of products of the field and converge less regularly: \(Q_{sca}\) of the absorbing sphere falls monotonically (\(1.1\), \(0.097\), \(0.014\), \(0.0058\); \(3.2\cdot 10^{-3}\) at \(n = 3\), \(p = 3\)), that of the dielectric sphere passes the series value between \(p = 1\) and \(p = 2\), so its small error at \(p = 1\) (\(2.6\cdot 10^{-3}\)) is a cancellation, and settles at \(2\)–\(3\cdot 10^{-3}\) for \(n = 2\), \(p = 3, 4\) and \(6.6\cdot 10^{-4}\) at \(n = 3\), \(p = 3\) (\(Q_{abs}\) of the metallic sphere at \(n = 3\), \(p = 3\), \(4\cdot 10^{-6}\), is likewise a crossing, not the accuracy level). Against the run on the previous mesh (with the thin cells along the diagonals that #234 removed) the field errors at \(p \ge 3\) are equal or smaller (\(n = 3\), \(p = 3\): \(4.7\cdot 10^{-3}\) against \(9.1\cdot 10^{-3}\) and \(4.5\cdot 10^{-3}\) against \(1.2\cdot 10^{-2}\)), the single values of \(Q_{sca}\) move within the discretisation error in either direction (\(n = 2\), \(p = 4\) dielectric: \(3.3\cdot 10^{-3}\) against \(1.3\cdot 10^{-3}\)). The absorbing sphere converges more slowly: its field decays inside the metal over half a radius and the near field dominates at \(ka = 0.6\). Two things limit this benchmark in practice. First, the quadratic approximation of the sphere by box_with_ball (geometry error \(\propto h^3\) on the interface) caps the accuracy of a given mesh at the \(10^{-3}\) level, which is why the finer mesh helps more than a higher order does. Second, the cost: Eigen::SparseLU needs 7 minutes for the \(1.1\cdot 10^5\) unknowns of \(p = 4\) and 20 minutes for \(1.7\cdot 10^5\) on an idle machine, so the CI variant stops at \(p = 2\) (18 s) and asserts only the trend of the field and a few-percent agreement, while the long run documents the convergence. A MUMPS or GPU backend and a cubic geometry map would move this benchmark to the \(10^{-4}\) level. No parameter was adjusted.
D. Slit–groove diffraction in a silver film with a layered background
Sources. M. Besbes, J. P. Hugonin, P. Lalanne, S. van Haver, O. T. A. Janssen, A. M. Nugrowati, M. Xu, S. F. Pereira, H. P. Urbach, A. S. van de Nes, P. Bienstman, G. Granet, A. Moreau, S. Helfert, M. Sukharev, T. Seideman, F. I. Baida, B. Guizal, D. Van Labeke, "Numerical analysis of a slit-groove diffraction problem", J. Eur. Opt. Soc. Rapid Publ. 2, 07022 (2007), DOI 10.2971/jeos.2007.07022 (substrate index 1.45, best values \(S/S_0 = 2.200952\) (MM3), \(2.200940\) (HYB), \(2.200904\) (MM2), \(2.201143\) (FEM2)); S. Burger, L. Zschiedrich, J. Pomplun, F. Schmidt, "Finite-element based electromagnetic field simulations: Benchmark results for isolated structures", Proc. SPIE 8880, 88801Z (2013), arXiv:1310.2732 (substrate \(\varepsilon = 2.25\), \(S/S_0 = 2.198825944 \pm 2\cdot 10^{-9}\)).
Set-up. A 400 nm silver film (\(\varepsilon_\text{Ag} = -33.22 + 1.17i\)) on a substrate under air is cut by a 100 nm wide slit through the film at \(x = 0\) and carries a 100 nm wide, 100 nm deep groove in its top surface centred at \(x = -500\) nm. A plane wave of wavelength 852 nm falls normally from above with the magnetic field parallel to slit and groove (in-plane \(E\)). The benchmark quantity is \(S/S_0\), the downward Poynting flux of the total field through the segment \(y = -800\) nm, \(|x| \le 100\) nm in the substrate with the groove divided by the same flux without it. The two sources disagree about the substrate (\(n = 1.45\), i.e. \(\varepsilon = 2.1025\), versus \(\varepsilon = 2.25\)); both are computed and the hypothesis that this explains the 0.1 % difference between the published values is tested.
Discretisation (tests/convergence/slit_groove.cpp). The feature of ADR-0009: the
background is the layer stack air / silver / substrate (physics::LayerStack<2>), whose
analytic plane-wave field is the incident field, so that the scattered-field source lives in
the slit and the groove only and the PML sees outgoing waves alone. PML on all four sides
(the surface plasmons on the silver are weakly damped: the lateral interior half-width and
the PML thickness are varied), graded tensor-product mesh (tensor_mesh.hpp) towards the
twelve metal corners and the three interfaces, \(p\)-refinement. \(S\) and \(S_0\) are two
solutions on the same mesh family (the groove filled with silver for \(S_0\)).
Results (long run convergence_slit_groove "[validation-long]",
benchmarks/results/2026-10-03-validation-slit-groove.json):
p-convergence (lateral interior half-width 3 µm, 1 µm of air above and 1.2 µm of substrate below the film inside the PML, PML 2 µm of order 4 with target reflection \(10^{-10}\), spacing 100 nm with three geometric levels at the corners):
| ε_sub | p | DoF | S | S₀ | S/S₀ | reference | rel. deviation | time [s] (S + S₀) |
|---|---|---|---|---|---|---|---|---|
| 2.25 | 2 | 101,212 | 2.941302e-08 | 1.338461e-08 | 2.19752498 | 2.19882594 | -5.9e-04 | 2 |
| 2.25 | 3 | 212,298 | 2.798531e-08 | 1.272789e-08 | 2.19873967 | 2.19882594 | -3.9e-05 | 7 |
| 2.25 | 4 | 363,704 | 2.796181e-08 | 1.271659e-08 | 2.19884572 | 2.19882594 | +9.0e-06 | 17 |
| 2.25 | 5 | 555,430 | 2.797766e-08 | 1.272375e-08 | 2.19885398 | 2.19882594 | +1.3e-05 | 41 |
| 2.25 | 6 | 787,476 | 2.797965e-08 | 1.272463e-08 | 2.19885700 | 2.19882594 | +1.4e-05 | 83 |
| 2.1025 | 2 | 101,212 | 2.914905e-08 | 1.325134e-08 | 2.19970539 | 2.20094600 | -5.6e-04 | 2 |
| 2.1025 | 3 | 212,298 | 2.781641e-08 | 1.263879e-08 | 2.20087529 | 2.20094600 | -3.2e-05 | 7 |
| 2.1025 | 4 | 363,704 | 2.779928e-08 | 1.263043e-08 | 2.20097630 | 2.20094600 | +1.4e-05 | 15 |
| 2.1025 | 5 | 555,430 | 2.781310e-08 | 1.263667e-08 | 2.20098327 | 2.20094600 | +1.7e-05 | 38 |
| 2.1025 | 6 | 787,476 | 2.781482e-08 | 1.263744e-08 | 2.20098560 | 2.20094600 | +1.8e-05 | 111 |
Domain, PML and mesh sensitivity (\(\varepsilon_\text{sub} = 2.25\), \(p = 4\); the deviation refers to Burger's value):
| variant | lateral [nm] | PML [nm] / order | above / below [nm] | levels / spacing [nm] | DoF | S/S₀ | rel. deviation (Burger) |
|---|---|---|---|---|---|---|---|
| lateral_3000_pml_1000_3 | 3000 | 1000 / 3 | 1000 / 1200 | 3 / 100 | 229,624 | 2.19966243 | +3.8e-04 |
| lateral_3000_pml_1500_3 | 3000 | 1500 / 3 | 1000 / 1200 | 3 / 100 | 293,064 | 2.19890469 | +3.6e-05 |
| lateral_3000_pml_1000_4 | 3000 | 1000 / 4 | 1000 / 1200 | 3 / 100 | 229,624 | 2.19995920 | +5.2e-04 |
| lateral_3000_pml_2000_3 | 3000 | 2000 / 3 | 1000 / 1200 | 3 / 100 | 363,704 | 2.19879897 | -1.2e-05 |
| lateral_3000_pml_2000_4 | 3000 | 2000 / 4 | 1000 / 1200 | 3 / 100 | 363,704 | 2.19884572 | +9.0e-06 |
| lateral_3000_pml_3000_4 | 3000 | 3000 / 4 | 1000 / 1200 | 3 / 100 | 526,584 | 2.19880155 | -1.1e-05 |
| lateral_2000_pml_2000_4 | 2000 | 2000 / 4 | 1000 / 1200 | 3 / 100 | 306,024 | 2.19883365 | +3.5e-06 |
| lateral_4000_pml_2000_4 | 4000 | 2000 / 4 | 1000 / 1200 | 3 / 100 | 421,384 | 2.19887287 | +2.1e-05 |
| vertical_600_1200 | 3000 | 2000 / 4 | 600 / 1200 | 3 / 100 | 345,544 | 2.19896605 | +6.4e-05 |
| vertical_1000_1200 | 3000 | 2000 / 4 | 1000 / 1200 | 3 / 100 | 363,704 | 2.19884572 | +9.0e-06 |
| vertical_1400_1200 | 3000 | 2000 / 4 | 1400 / 1200 | 3 / 100 | 381,864 | 2.19879809 | -1.3e-05 |
| vertical_1000_1600 | 3000 | 2000 / 4 | 1000 / 1600 | 3 / 100 | 381,864 | 2.19884572 | +9.0e-06 |
| grading_0_100 | 3000 | 2000 / 4 | 1000 / 1200 | 0 / 100 | 228,320 | 2.19962621 | +3.6e-04 |
| grading_2_100 | 3000 | 2000 / 4 | 1000 / 1200 | 2 / 100 | 315,120 | 2.19881672 | -4.2e-06 |
| grading_3_100 | 3000 | 2000 / 4 | 1000 / 1200 | 3 / 100 | 363,704 | 2.19884572 | +9.0e-06 |
| grading_4_100 | 3000 | 2000 / 4 | 1000 / 1200 | 4 / 100 | 415,744 | 2.19885695 | +1.4e-05 |
| grading_3_50 | 3000 | 2000 / 4 | 1000 / 1200 | 3 / 50 | 1,146,552 | 2.19885683 | +1.4e-05 |
Assessment. With the layered background the slit–groove problem converges in \(p\) to \(S/S_0 = 2.198857\) for \(\varepsilon_\text{sub} = 2.25\) and \(2.200986\) for \(2.1025\); from \(p = 4\) on the discretisation changes the result by less than \(10^{-5}\) and the finest mesh (spacing 50 nm, \(1.1\cdot 10^6\) unknowns) agrees with the default one to \(5\cdot 10^{-6}\). Against Burger et al. the converged value lies \(1.4\cdot 10^{-5}\) high, against the mean of the two best methods of Besbes et al. \(1.8\cdot 10^{-5}\) high; the CI tolerances (\(10^{-4}\) and \(2\cdot 10^{-4}\)) hold with a wide margin at \(p = 4\) in about 35 s for the four solves. The \(10^{-6}\) target of the long run against Burger is not reached: the remaining \(10^{-5}\) is the truncation of the surface plasmons on the silver, as the domain study shows (lateral extent 2–4 µm, PML 2–3 µm and 1–1.4 µm of air above the film each move the result by \(1\)–\(2\cdot 10^{-5}\), the mesh does not). A thinner PML or less air above the film costs an order of magnitude (the 1 µm PML of order 3 that the other benchmarks use leaves \(4\cdot 10^{-4}\)). Burger et al. reach \(10^{-9}\) with adaptive PML / pole condition techniques that this code does not have; closing the last \(10^{-5}\) needs a plasmon-aware termination, not more unknowns. The hypothesis about the two sources is confirmed: our two substrates give the ratio \(2.200986 / 2.198857 = 1.000968\), the published values \(2.200946 / 2.198826 = 1.000964\), so the 0.1 % difference between Besbes et al. and Burger et al. is the substrate permittivity to within \(4\cdot 10^{-6}\). No parameter was adjusted.
E. hp-adaptive silver grating with the conical solver (M15 F1)
Source. The acceptance case of docs/gui-support-features.md (F1, section 3): lamellar
silver grating, period 400 nm, ridge 200 nm wide and 148 nm high on a silver substrate
(\(\varepsilon_\text{Ag} = -4.6631 + 0.2160i\)), air above, \(\lambda = 405\) nm, TM (in-plane \(E\))
at \(\theta = 50^\circ\), \(\varphi = 0\). Reference \(R_0 = 0.77960 \pm 6\cdot 10^{-5}\),
\(R_{-1} = 0.07795 \pm 2\cdot 10^{-5}\) from the in-plane hp run of the GUI work and a conical
RCWA (Li factorisation, 1/N extrapolated); the two methods differ by \(2.3\cdot 10^{-4}\) in \(R_0\).
Uniform meshes of the in-plane solver stagnate at \(\Delta R_0 = -3.4\ldots -5.0\cdot 10^{-3}\) and
\(\Delta R_{-1} = +6.1\ldots +8.7\cdot 10^{-3}\) for 65–130 k DoFs (the corner singularities).
Discretisation (tests/convergence/conical_grating_hp.cpp). physics::ConicalScattering
at \(\beta = 0\) with the layered background (air over silver), the ridge as the only source
region, PML above and below (profile 2, \(R = 10^{-16}\), 407 nm), Bloch faces mirrored by
AdaptiveMesh::set_periodic and equal orders on the paired face cells; structured root mesh of
8 × 38 quads (37 nm) split into triangles; SOLVE – ESTIMATE (conical_residual_estimate) –
MARK (Dörfler 0.5) – DECIDE (error prediction) – REFINE. Reflected orders from the Fourier
coefficients of the scattered field on a line 199 nm above the ridges (256 points; the line
height is no facet line of any refinement level, so the one-sided \(E_y\) values on facets do not
enter).
Results (long run convergence_conical_grating_hp "[validation-long]", results in
benchmarks/results/2026-10-07-validation-conical-grating-hp.json). From \(p = 4\) everywhere the
loop reaches \(\Delta R_{-1} = -5\cdot 10^{-6}\) and \(\Delta R_0 = -2.2\cdot 10^{-4}\) at 88 k DoFs
(\(p \le 8\) at the corners, h-refinement to level 5 there), both inside the F1 tolerances
(\(5\cdot 10^{-5}\) and \(5\cdot 10^{-4}\) at \(\le 100\) k DoFs), and the result no longer changes with
the line height (two lines 148 nm apart agree to \(10^{-6}\)) or the DoF count.
Assessment and what was learnt. The conical solver is consistent with the in-plane solver:
the same loop with Scattering<2> on the same mesh gives the same \(R_0\), \(R_{-1}\) to the
\(10^{-4}\) level at every step. The energy-norm estimator drives the corners (the \(R_{-1}\)
accuracy) but its Dörfler marking is saturated by the corner indicators, so cells it never
marks stay at their initial order; the specular order then reports the discretisation error
of those cells: from \(p = 1\) the air region leaves a dispersion error of \(\sim 10^{-3}\) in \(R_0\)
that varies with the height of the measurement line (and neither a gentler PML profile,
\(R = 10^{-8}\), nor a doubled PML thickness nor 1024 Fourier points change it); from \(p = 3\) the
PML and substrate cells leave a line-independent offset of \(-5.5\cdot 10^{-4}\); from \(p = 4\) the
result is within the reference uncertainty. The remaining \(-2.2\cdot 10^{-4}\) is of the size of
the disagreement between the two reference methods. A goal-oriented estimator for the orders
(F1 stage 2) would weight the PML and air cells by their influence on \(R_0\) and remove the
hand-chosen initial order.
A second finding concerns the estimator itself, and applies to residual_estimate and the
axisymmetric variant as well: in SI units the Gauss-law terms \((h/p)^2\|\nabla\cdot d\|^2\) and
\(h/(2p)\|[n\cdot d]\|^2\) exceed the curl–curl residual \((h/p)^2\|R_K\|^2\) by a factor
\(\sim 1/(kh)^2\) (here \(10^{15}\) against \(10^{-2}\)), because \(\nabla\cdot d \sim k^2|E|/h\) carries one
more inverse length than \(R_K \sim k^2|E|\); the published form of the estimator is dimensionally
consistent only for lengths of order one. The marking is then driven by the Gauss-law residual
of the corner cells (which still localises the singularities, as the \(R_{-1}\) convergence
shows), but \(\eta\) is not a usable error measure: it jumps by an order of magnitude when a
sub-nanometre corner cell is created while \(R_0\), \(R_{-1}\) stay fixed to \(10^{-6}\). The rate
checks of conical_grating_hp therefore use \(|\Delta R_{-1}|\) (\(b = 0.65\) in the short variant),
and the estimator can be run with divergence_terms = false (then \(\eta\) decays monotonically,
\(0.37 \to 5.7\cdot 10^{-3}\) at 49 k DoFs, and the PML cells get marked too, at the price of a
slower \(R\) convergence per DoF: \(\Delta R_0 = -1.0\cdot 10^{-3}\), \(\Delta R_{-1} = +5.8\cdot 10^{-4}\) at
49 k DoFs). The remedy is the length scale \(\ell = 1/k\) on the Gauss-law terms of all three
estimators (EstimatorOptions::length_scale, the \(H(\mathrm{curl})\) norm with the wavelength
as its length scale; see error-estimation.md). With it \(\eta\) is
of order one (\(2.1 \to 0.42\) from 31 k to 46 k DoFs) instead of \(10^7\), problems with \(k = 1\) are
unchanged, and on the grating the marking and therefore every \(R_0\), \(R_{-1}\) of the table above
stay exactly the same: the Gauss-law residual of the corner cells still exceeds their curl–curl
residual by a factor \(\sim 400\), which is now a genuine statement about the discrete
divergence of the singular field (the gradient part of the error), not a unit artefact. The
\(\eta\) jumps at freshly created sub-nanometre cells remain, so the rate checks keep using
\(|\Delta R_{-1}|\).
Acceptance cases (b) and (c) (same loop, long variant, record as above). (b) TE on silver,
\(\theta = 50^\circ\): the \(E_z\) polarisation has no field singularity at the metal corners, and
the loop reproduces the RCWA reference \(R_0 = 0.319215\), \(R_{-1} = 0.643575\) to \(4\cdot 10^{-7}\) /
\(2\cdot 10^{-7}\) from the first step (18 k DoFs, \(p = 4\)) on; the energy estimate still falls
from \(8\cdot 10^{-2}\) to \(2\cdot 10^{-4}\) up to 100 k DoFs. (c) Conical TM on silicon
(\(\varepsilon = 29.63 + 2.77i\)), \(\theta = 50^\circ\), \(\varphi = 40^\circ\), \(\beta = 7.6\cdot 10^6\)/m,
all three field components coupled: \(\Delta R_0 = -1.9\cdot 10^{-5}\), \(\Delta R_{-1} = +1.0\cdot 10^{-5}\)
at 106 k DoFs (reference "converged in N", tolerance \(10^{-4}\)), starting from \(-4.5\cdot 10^{-4}\) /
\(+6.6\cdot 10^{-4}\); the decay is slower than on silver, \(b = 0.17\) over the last ten steps
above \(5\cdot 10^{-5}\), because the high-index ridges carry the singularity into the dielectric
with a weaker exponent. The goal-oriented loop (conical_dwr_estimate, section
error-estimation) and
the generator hpfem.adaptive_solve are verified on the manufactured conical corner, not on
the gratings: with the references good to \(10^{-4}\) at best, a goal error below that cannot be
checked there.
Case (d), non-matching Bloch faces (M15 F16). The TM silver case with the ridge centred at
\(x = 25\) nm instead of 0 (edges at \(-75\) and \(125\) nm on a 25 nm root grid), so the two Bloch
faces are no mirror images of each other, and the refinement left independent (no
set_periodic): the faces end up with different levels and orders, coupled by the non-matching
bloch_constraints, and the estimator includes the jump across them. The loop reaches
\(\Delta R_{-1} = +2\cdot 10^{-6}\) and \(\Delta R_0 = -2.2\cdot 10^{-4}\) at 110 k DoFs with \(b = 0.61\), the same
values and rate as the mirrored symmetric case (a): the coupling costs no accuracy and the
mirroring is no longer needed.
F. Directional coupler in 3D with modal ports (M12 stage A, production runs on cuDSS)
Source. The first 3D device of the port framework, the coupling element of ring
resonators and interferometers: two parallel SOI strip waveguides (450 nm × 220 nm, silica
cladding) at 1550 nm, gap 200 nm, with one two-mode port on each end face. Reference:
coupled-mode theory in the supermode basis of the two-core cross-section,
\(P_{\mathrm{cross}} = \sin^2(\kappa L)\) with \(\kappa = (\beta_e - \beta_o)/2\) from
hpfem.PropagatingMode on the section at the same cell size and order (the two-mode picture
is exact up to the mismatch between the launched single-core mode and the superposition of the
supermodes). The example, mesh builder and CMT reference are
examples/directional_coupler_3d/run.py (--ports full, PR #127); the convergence quantities
of the 3D solver are the phase errors \(|\arg t - \beta L|\) of the two supermode transmissions
against the section solver's \(\beta\) and the leakage between the supermodes.
Discretisation. Structured tetrahedral mesh (hpfem.box, six tetrahedra per 100-nm
cube, cores tagged by cell centroid), PEC walls at the cladding margins (750 nm beside,
605 nm above and below the cores), modal ports with two modes on \(z = 0\) and \(z = L\);
physics::s_parameters with one factorisation per S-matrix (ScatteringOperator::solve_port,
PR #128) on cuDSS, LDLᵀ, diagonal equilibration, three steps of iterative refinement. The
cross-section edges must lie on grid lines of the uniform box: with 100-nm cells this holds
for the gap 200 nm (26 cells of exactly 100 nm across), not for 150 nm (26 cells of 98.1 nm,
staircase cores that differ between the 3D end face and the 2D section: \(|t| = 0.53\), leakage
0.85) — a per-axis cell count from the edge lists is the proposed fix in the builder.
Results (RTX 3090 with 24 GB, 128 GB host, 24 threads;
benchmarks/results/2026-10-08-VR-directional-coupler-3d.json; the four solves of the
S-matrix share one factorisation):
| L [µm] | p | cell_z [nm] | DoFs | \(|t_e|\), \(|t_o|\) | phase error e / o [rad] | leakage | \(P_{\mathrm{cross}}\) FEM | CMT | FEM − CMT | 4 solves [s] | factors | |---|---|---|---|---|---|---|---|---|---|---|---| | 2 | 1 | 100 | 50 k | 0.99702, 0.99780 | 2.4e-1 / 2.0e-1 | 6.4e-2 | 0.06262 | 0.05234 | +1.0e-2 | 14 | device | | 2 | 2 | 100 | 266 k | 1.00000, 1.00000 | 1.4e-2 / 1.5e-2 | 1.6e-3 | 0.02359 | 0.02338 | +2.1e-4 | 47 | 7.8 GB device | | 2 | 3 | 100 | 769 k | 1.00000, 1.00000 | 5.0e-4 / 5.7e-4 | 5.5e-5 | 0.02221 | 0.02220 | +1.0e-5 | 500 | hybrid: 15 GB device + 34 GB host | | 10 | 2 | 100 | 1318 k | 0.99997, 0.99997 | 6.8e-2 / 7.5e-2 | 7.3e-3 | 0.48553 | 0.48213 | +3.4e-3 | 166 | hybrid: 6 GB device + 26 GB host | | 20 | 2 | 150 | 1752 k | 0.99969, 0.99968 | 5.4e-1 / 5.8e-1 | 2.5e-2 | 0.99984 | 0.99872 | +1.1e-3 | 196 | hybrid: 7 GB device + 32 GB host | | 30 | 2 | 200 | 1976 k | 0.99947, 0.99947 | 1.8 / 1.9 | 3.3e-2 | 0.49614 | 0.55352 | −5.7e-2 | 212 | hybrid: 7 GB device + 36 GB host |
The p = 2 row at L = 2 µm reproduces the MUMPS run of the example's README to all printed digits (293 s there for four factorisations). The phase error falls by a factor 27 from p = 2 to p = 3 and the leakage by 29 — the exponential p-convergence of the 3D solver at a fixed mesh — and grows linearly with the length at fixed p (1.4e-2 rad at 2 µm, 6.8e-2 at 10 µm for the even supermode, i.e. a relative dispersion error of the 3D discretisation of \(7\cdot 10^{-4}\) in \(\beta_e\) at p = 2 on 100-nm cells). \(P_{\mathrm{cross}}\) follows CMT to \(10^{-5}\) at p = 3 (L = 2 µm) and to \(3.4\cdot 10^{-3}\) at p = 2 over 10 µm, where the 3D phase error of 0.07 rad on each supermode is the whole deviation; the energy balance of the four channels closes to \(10^{-9}\) and the reflection stays below \(10^{-6}\) from p = 2 on.
Cost and limits. On cuDSS a factorisation of 266 k DoFs (p = 2) takes 42 s with the
factors on the device; from about 1 M DoFs the hybrid memory mode holds the factors in host
memory (1.32 M DoFs at p = 2: 26 GB host, 165 s for factorisation and four solves; 2.0 M
DoFs: 36 GB host, 212 s). The factors of p = 3 are much denser (769 k DoFs: 1.5 G entries,
34 GB host, 500 s), and p = 4 at L = 2 µm (about 1.5 M DoFs) exceeded the 128 GB of host
memory and was dropped. The 20 and 30 µm couplers were run under 2 M DoFs with a coarser
axial cell (--cell-z, Geometry.cell_z), which is where the accuracy goes: the axial
dispersion error scales like \(h_z^{2p}\), so 150 nm instead of 100 nm costs a factor 5 and
200 nm a factor 16 in the phase error per length — 0.54 rad over 20 µm and 1.8 rad over
30 µm for the even supermode (against 0.07 rad over 10 µm at 100 nm), and the leakage
grows to \(3\cdot 10^{-2}\). \(P_{\mathrm{cross}}\) depends only on the phase difference of
the two supermodes, in which the dispersion errors largely cancel: it still follows CMT to
\(10^{-3}\) at 20 µm (near the full transfer, \(L_c = 20.5\) µm) but is off by \(6\cdot 10^{-2}\) at
30 µm. A long coupler at p = 2 therefore needs the 100-nm axial cell (3.9 M DoFs at 30 µm,
about 80 GB host) or p = 3 on the coarse axial mesh (1.98 M DoFs at p = 2 become about 5 M at
p = 3, beyond this machine); the 3D coupler of 10 µm at p = 2 and 100 nm is the configuration
that is both converged and affordable here.
Assessment. With the ports, the operator reuse and the hybrid memory mode, a 3D coupler of 10 µm at p = 2 is a three-minute job on one workstation GPU, and the p-convergence at 2 µm shows the solver reaching CMT to \(10^{-5}\) in the cross power. The deviation that remains at p = 2 over 10 µm is the dispersion error of the 100-nm mesh along the guide, not the two-mode picture; coarsening that mesh to fit longer couplers into memory trades the phase accuracy away as \(h_z^{2p}\). The roadmap item "ring resonator with ports in 3D" ends with this stage by the maintainer's decision; the full ring in 3D (stage B) goes to the backlog, and it would need p = 3 on an hp-mesh that is fine only across the cores and in the coupling region.
G. Gold sphere dimer, field in a 1 nm gap (Hoffmann et al. 2009)
Source. Hoffmann, Hafner, Leidenberger, Hesselbarth, Burger, "Comparison of electromagnetic field solvers for the 3D analysis of plasmonic nano antennas", Proc. SPIE 7390, 73900J (2009), arXiv:0907.3570: two gold spheres of 80 nm diameter, gap 1 nm, plane wave at 632 nm incident perpendicular to the dimer axis and polarised along it, \(|E_{inc}| = 1\) V/m; the multiple-multipole reference (MaX-1, Mie expansion with four auxiliary multipoles) for \(|E|^2\) at the gap centre is \(5.47624\cdot10^5\) V²/m², "at least five digits correct"; JCMsuite reaches \(5.47347\cdot10^5\) at 216 k DoFs. The permittivity of gold is not stated ("material parameters for a wavelength of 632 nm are defined in the GUI"); the maintainer decided on 2026-10-08 to compute the case with the library's Johnson & Christy data (\(\varepsilon = -11.685 + 1.267i\)) as a documented assumption and to report the sensitivity instead of a five-digit comparison.
Discretisation (examples/gold_dimer/run.py). Body of revolution: the incident wave is
expanded in azimuthal orders (oblique_plane_wave, \(\theta_i = 90^\circ\), p polarisation),
and on the axis only \(m = 0\) (\(E_z\)) and \(m = \pm1\) (\(E_x\), \(E_y\)) are non-zero, so three
solves of physics::AxisymmetricScattering on the meridian mesh (cylindrical PML of 250 nm
outside the 300 nm box, PEC wall) give the gap field; the field is evaluated at
\(r = 0.002\) nm on the symmetry plane. Gmsh meridian mesh, second-order elements on the sphere
surfaces, graded from 0.1 nm at the gap to 25 nm in the box (6 715 cells; a coarser mesh with
the sizes doubled, 1 843 cells, for the regression test).
Results (benchmarks/results/2026-10-08-validation-gold-dimer.json).
| mesh | p | DoFs (m = 0) | \(|E|^2\) [V²/m²] | |---|---|---|---| | 1 843 cells | 2 / 3 | 13 k / 28 k | 2.97662e5 / 2.97242e5 | | 6 715 cells | 2 / 3 / 4 | 48 k / 101 k / 176 k | 2.97372e5 / 2.97239e5 / 2.97239e5 |
The value is converged to five digits in \(p\) and to \(10^{-4}\) between the meshes: \(2.9724\cdot10^5\), 45.7 % below the reference. The field at the centre is along the axis (\(|E_z| = 545\), \(|E_x| \approx 10^{-4}\), \(E_y = 0\) by symmetry). Sensitivity at the Johnson & Christy point: \(\partial|E|^2/\partial\mathrm{Re}\,\varepsilon = +1.07\cdot10^5\) per unit (\(-4.2\) % per 1 % of \(\mathrm{Re}\,\varepsilon\)), \(\partial|E|^2/\partial\mathrm{Im}\,\varepsilon = -2.11\cdot10^5\) per unit (\(-0.9\) % per 1 %); a \(\pm5\) % band in both parts spans \(2.2\ldots3.7\cdot10^5\) and does not contain the reference. The dependence on \(\mathrm{Re}\,\varepsilon\) is resonant: at \(\mathrm{Im}\,\varepsilon \approx 1.1\)–1.2 the gap intensity peaks at \(3.74\cdot10^5\) near \(\mathrm{Re}\,\varepsilon = -10.3\) and falls to \(2.9\cdot10^5\) at \(-9.0\); the reference is reached only with a lower loss, \(\varepsilon \approx -10.3 + 0.8i\) giving \(5.43\cdot10^5\) (\(-10.3 + 0.6i\): \(6.76\cdot10^5\); \(-11.68 + 0.8i\): \(4.23\cdot10^5\)).
Assessment. The solver's result for a given permittivity is converged (five digits in \(p\),
mesh-independent), and the deviation from the published number is governed by the material
datum the paper does not give: Johnson & Christy gold at 632 nm has about 35 % more loss
than the value that reproduces the reference, which lies in the range of single-crystal gold
data (Olmon et al. 2012). The five-digit comparison therefore remains out of reach without
the authors' \(\varepsilon\); what is validated here is the order expansion, the cylindrical PML
and the hp resolution of a 1 nm gap between curved metal surfaces, consistent with the
dielectric Mie checks of the axisymmetric solver (C and docs/theory/axisymmetric.md).
H. Gradient-based against gradient-free optimisation on a grating (M16 S8)
Problem. The quick silicon line grating of examples/grating_reconstruction (Si on Si,
period 300 nm; R0 for s and p at 65° and 400 / 550 / 700 nm, six observables; p = 2, about
15k DoFs), three parameters CD ∈ [70, 130] nm, height ∈ [90, 150] nm and side-wall angle
∈ [78°, 90°], the reference mesh at the start geometry (112 nm, 108 nm, 88.5°), morphed exactly
and remeshed when the quality guard trips. Objective: the spectrum match
\(F(p) = \sum_i ((R_i(p) - R_i^{target})/\sigma)^2\) with σ = 0.002 and the target from the same
model at the truth (100 nm, 120 nm, 86°) on a mesh built there; on the morphed start mesh the
truth gives \(F = 0.016\) (the floor of the discretisation, largest deviation \(1.9\cdot10^{-4}\)),
so \(F \le m = 6\) means a match to the noise level and \(F \le 0.06\) one to a tenth of it.
Budget 40 evaluations, seeds 0–2 (initial designs; random starts in the box for the local
methods). Driver benchmarks/opt_validation.py bo, record
benchmarks/results/2026-11-06-validation-opt-bo-server.json (code after the fix of the grating
PML angle #156; a server with two AMD EPYC 9015, 16 cores, 6 threads, next to the study of
section L). The first run, before #156 (2026-10-10-validation-opt-bo.json; target and model
shared the PML designed for normal incidence, so it was self-consistent), gave the same picture
with the differences noted below.
| method | evaluations to \(F \le m\) (seeds 0 / 1 / 2) | best \(F\) after 40 | s per evaluation |
|---|---|---|---|
| Bayesian optimisation, EI | 36 / 34 / 27 | 0.46 / 0.87 / 0.44 | 4.8 |
| Bayesian optimisation, EI, gradient-enhanced | 17 / 31 / 22 | 0.33 / 0.13 / 0.20 | 7.2 |
| Nelder–Mead | – / – / 38 | 35 / 42 / 4.1 | 4.5 |
| differential evolution | – / – / – | 337 / 779 / 285 | 4.5 |
| L-BFGS-B (random start) | – / – / – | 3360 / 3100 / 410 | 6.5 |
At the best points the gradient-enhanced BO is within 0.03–0.05 nm in CD, 0.16–0.29 nm in height and 0.05–0.08° in angle, plain BO within 0.04–0.13 nm, 0.14–0.31 nm and 0.03–0.07°; the BO runs remeshed 11–21 times (the initial designs fill the box).
Assessment. Gradient-enhanced BO reaches the noise level in fewer evaluations on all three seeds (17 / 31 / 22 against 36 / 34 / 27; before #156 the plain one was faster on seed 1) and ends 1.4–6.6 times lower in \(F\). An evaluation with the Jacobian costs about 1.5 times one without, so in wall time the two are close up to the noise level and the gradients pay off in the final accuracy. The local gradient method alone stops at a corner of the box from all three random starts (after 14, 14 and 28 evaluations); before #156 one of the three started in the basin and reached the noise level in 27 evaluations. Nelder–Mead and differential evolution are far from the goal after 40 evaluations (differential evolution needs a population of tens per generation). No method reached \(F \le 0.06\) within 40 evaluations. The study is small (three seeds, one problem, one budget); it supports the plan of S3/S5 — a global surrogate stage, with gradients where the evaluator provides them, before a local least-squares fit — rather than proving a general ranking.
I. The DWR estimate as fidelity indicator (M16 S8)
Question. ADR-0012 §6 does not use the DWR estimate as Gaussian noise of a surrogate (the discretisation error is systematic and signed), but as a fidelity indicator: refine until \(|\eta| \le \kappa\sigma\) with κ = 0.1. The study checks the premises of that rule on a reconstruction: is the estimate accurate on a morphed mesh, does the rule keep the bias of the fitted parameters at the size it promises, and what does the rejected alternative — the estimate added to the noise — do?
Problem. The cell, observables and parameters of section H; data from p = 5 on a mesh built
at the truth (100 nm, 120 nm, 86°) plus Gaussian noise σ = 0.002, seeds 0–4. Each strategy fits
the same five data sets with opt.fit (least squares from the start geometry 112 nm, 108 nm,
88.5°, Laplace standard deviations about 0.25 nm in CD, 0.45 nm in height and 0.30° in angle).
The bias of a strategy is measured paired: the shift of its estimate against the p = 4 fit of
the same data set, averaged over the seeds (the noise realisation cancels; the spread of the
shift over the seeds is below a third of its mean for CD and angle at p = 2). Driver
benchmarks/opt_validation.py dwr, record
benchmarks/results/2026-11-06-validation-opt-dwr-server.json (code after #156, the server of
section H, 6 threads). The first run before #156 (2026-10-10-validation-opt-dwr.json) agrees
to within 0.1 standard deviation in every shift below and picks the same order.
Effectivity. At the truth on the morphed start mesh, the signed DWR estimate
(conical_dwr_estimate of the order functional) against the true error (p = 5 on the same
mesh), largest over the six observables:
| p | largest true error | largest estimate | after subtracting the estimate | largest \(\eta\) at the start |
|---|---|---|---|---|
| 2 | \(1.61\cdot10^{-3}\) | \(1.58\cdot10^{-3}\) | \(2.7\cdot10^{-4}\) | \(2.67\cdot10^{-3}\) |
| 3 | \(2.64\cdot10^{-4}\) | \(1.85\cdot10^{-4}\) | \(8.0\cdot10^{-5}\) | \(1.93\cdot10^{-4}\) |
| 4 | \(7.95\cdot10^{-5}\) | \(7.95\cdot10^{-5}\) | \(1.9\cdot10^{-8}\) | \(8.29\cdot10^{-5}\) |
The sign is right for every observable at p = 3 and 4 and for five of six at p = 2 (the sixth has a true error of \(5\cdot10^{-5}\), a thirtieth of the largest); for the observables with the larger errors the estimate captures 67–105 % of the error at p = 3 and all of it at p = 4, so subtracting it gains a factor 6, 3 and 4000. The bound \(\sum_K |r_K|\) overestimates by 1.7 to 700 and is no stopping criterion. With κσ = \(2\cdot10^{-4}\) the rule selects p = 3 at the start geometry (largest \(\eta\) \(1.93\cdot10^{-4}\), just below).
Fits.
| strategy | shift against p = 4: CD / height / angle | same, in the fit's std | rms deviation from the truth, in std | within 2 std | evaluations | median time per fit |
|---|---|---|---|---|---|---|
| p = 2 | +0.154 nm / +0.039 nm / −0.100° | 0.62 / 0.09 / −0.33 | 0.85 / 0.81 / 0.54 | 15 of 15 | 10.2 | 90 s |
| p = 2, \(\sigma^2 + \eta^2\) as noise | +0.144 nm / −0.084 nm / −0.061° | 0.56 / −0.17 / −0.20 | 0.77 / 0.96 / 0.62 | 15 of 15 | 11.2 | 93 s |
| p = 3 (the DWR rule) | +0.024 nm / +0.023 nm / −0.024° | 0.10 / 0.05 / −0.08 | 0.77 / 0.93 / 0.78 | 15 of 15 | 10.6 | 195 s |
| p = 4 (reference) | 0 | 0 | 0.80 / 0.95 / 0.84 | 15 of 15 | 10.6 | 525 s |
(The rule's fits repeat the p = 3 computation and agree with it to \(10^{-7}\); the record has every run.)
Assessment. The premises hold on this problem. The estimate is accurate enough to choose the order: the rule picks p = 3 and the bias there is 0.10 std in CD and below 0.1 std in the other parameters — the size κ = 0.1 promises — at about a third of the cost of p = 4. At p = 2, where \(\eta\) reaches 1.3σ, the bias is 0.62 std in CD and 0.33 std in angle. Adding \(\eta^2\) to the noise variance does not remove it (0.56 / 0.20 std): it widens the error bars by at most 13 % and reweights the observables, but a systematic error stays a shift — the reason ADR-0012 gives for not doing so. The bias at p = 2 is invisible in the usual diagnostics: all strategies cover the truth within 2 std in every run and their rms deviations are alike, because the noise (rms ≈ 1 std) dominates five realisations; only the paired comparison shows it. Subtracting the estimate from the p = 2 values would give near-p = 3 accuracy at p = 2 cost (factor 6 in the error above); this correction was not tried in the fits.
The hypothesis in its full form, multi-fidelity BO with the DWR estimate as the fidelity indicator against single-fidelity BO, is section K: the indicator holds, the multi-fidelity optimisation built on it does not pay off there. One problem, five seeds, one κ.
J. Bodies of revolution on layer stacks against the 3D solver (M18)
Problem. The layered background of the axisymmetric solver (ADR-0014, M18 S1–S3) against
Scattering3D with the same LayerStack3D background, as specified in
docs/axisymmetric-layered-features.md (tests 5 and 7):
- sphere on a two-layer stack: a gold sphere (radius 40 nm, Johnson & Christy) 5 nm above air / SiO2 20 nm (n = 1.45) / Si3N4 60 nm (n = 2.0) / glass (n = 1.5), p-polarised at 45°, at 550 and 650 nm: absorption of the sphere, scattering through a measurement cylinder (r ≤ 120 nm, −120 nm < z < 145 nm) split into up / down / lateral, and |E| of the total field at three points of the plane of incidence (in the gap, beside the sphere, above it);
- nanohole: a hole of 200 nm diameter through a 100 nm gold film on glass at normal incidence, at 600 / 750 / 900 nm: T / T_geom (the power the hole adds through the disc r ≤ 300 nm 100 nm below the film, over the power on the hole area) and the absorption change of the film in the cylinder r ≤ 250 nm.
The 3D meshes are second-order gmsh tetrahedra with every interface, the PML boundaries and the
measurement surfaces embedded, symmetry-reduced (half domain with PMC on the plane of incidence for
the sphere, quarter domain with PEC / PMC for the x-polarised hole, powers doubled / quadrupled),
p = 2 and 3, solved with MUMPS. The 2.5D reference sums the orders m = 0, ±1, ±2 (p = 4 for the
sphere on the mesher of examples/particle_on_substrate with its lines on the measurement
cylinder; p = 3 for the hole, the example's full configuration). Driver
benchmarks/m18_validation_3d.py (meshes by benchmarks/m18_meshes_3d.py), record
benchmarks/results/2026-10-10-validation-m18-3d.json, quick CI regression against it
python/tests/test_m18_records.py.
| sphere, p = 3 (446 k DoFs) | 3D | 2.5D | deviation |
|---|---|---|---|
| 550 nm: σ_abs / σ_sca [nm²] | 6740.2 / 5391.1 | 6738.4 / 5394.2 | +0.03 % / −0.06 % |
| 550 nm: up / down / lateral [nm²] | 3748.3 / 694.1 / 948.6 | 3750.0 / 694.8 / 949.4 | −0.04 / −0.09 / −0.08 % |
| 550 nm: |E| gap / side / top | 7.447 / 2.341 / 2.722 | 7.452 / 2.354 / 2.720 | −0.07 / −0.57 / +0.04 % |
| 650 nm: σ_abs / σ_sca [nm²] | 459.72 / 1544.9 | 459.70 / 1542.7 | +0.004 % / +0.14 % |
| 650 nm: up / down / lateral [nm²] | 1134.0 / 162.1 / 248.8 | 1132.3 / 161.9 / 248.5 | +0.15 / +0.10 / +0.11 % |
| 650 nm: |E| gap / side / top | 5.344 / 1.697 / 2.499 | 5.348 / 1.707 / 2.499 | −0.07 / −0.56 / +0.02 % |
At p = 2 (155 k DoFs) the deviations are 0.03–0.4 % in absorption, up to 1 % in scattering and 2 % in the channels.
| nanohole | T / T_geom 3D p = 2 / p = 3 | 2.5D | ΔA / A_geom 3D p = 2 / p = 3 | 2.5D |
|---|---|---|---|---|
| 600 nm | 0.6312 / 0.6360 | 0.6441 | 0.1895 / 0.1848 | 0.1802 |
| 750 nm | 0.6423 / 0.6371 | 0.6363 | 0.0936 / 0.0933 | 0.0922 |
| 900 nm | 0.2740 / 0.2721 | 0.2716 | 0.0732 / 0.0730 | 0.0727 |
(309 k / 889 k DoFs.) The stack's own flux through the 3D disc is T I πR² to 2·10⁻⁶ at every
wavelength. Each 3D solve took 15 s / 80 s (sphere, p = 2 / 3) and 50–200 s / 170 s (hole) with
8 threads next to other jobs, the factors 3–27 GB (estimate_memory); the 2.5D solves take
seconds.
Full spectra of the example. examples/particle_on_substrate at p = 3 (record
benchmarks/results/2026-10-11-particle-on-substrate.json): the gold sphere on glass absorbs most
at 520 nm and scatters most at 530 nm (dark-field signal for NA 0.5: 107 nm²); on a gold mirror
with a 2 nm gap its scattering peak moves to 610 nm and is 22 times that of the sphere in air
(520 nm); the 200 nm hole in 100 nm of gold transmits 0.80 of the light on its area at 660 nm,
falling to 0.15 at 1000 nm. The power balance of the total field closes to 6·10⁻³ or better in
every study. These are results, not references: the 3D cross-checks above validate the method on
the same kinds of geometry.
A lesson on the channels. The first sphere runs used a cuboid |x|, y < 120 nm as the 3D
measurement surface against the 2.5D cylinder r < 117 nm (the nearest mesh line). Absorption, total
scattering and near field agreed as above, but about 5 % of the upward power appeared as
"down" in 3D (up −4.8 %, down +27 %), unchanged by p = 3 and by a PML of 35 nm cells instead of
90 nm (the record keeps these runs under diagnostics). Light leaving the sphere obliquely
downwards in the air leaves the cylinder through its side wall above the stack (up), while at the
corners of the cuboid it first reaches the stack and passes into the glass (down). The split of the
scattered power into up / down / lateral is a property of the surface where its side walls cross
the layers, not of the scatterer alone; already 3 nm in the radius of the 2.5D cylinder (117 to
120 nm) move 4 % of "down". With the same cylinder in both solvers the channels agree to 0.15 %.
The physical split into the two half-spaces is the far field (axisymmetric_layered_far_field,
M18 S3), which does not depend on the surface.
Assessment. The axisymmetric solver on a layered background reproduces the 3D solver on the same stack: absorption to 0.03 % and better, scattering and its channels to 0.15 %, the near field in a 5 nm gap to 0.6 % at p = 3; the hole's transmission and absorption change converge from p = 2 to p = 3 towards the 2.5D values (−1.3 % / +2.5 % at 600 nm, below 0.2 % / 1.2 % at 750 and 900 nm; the 2.5D reference is itself a p = 3 solution with a power balance of 10⁻³). The 3D runs need minutes and gigabytes where the orders need seconds, which is the reason for the layered background of the body-of-revolution solver.
K. Multi-fidelity BO and the DWR estimate as fidelity indicator (M16 S8)
Question. Section I showed that the DWR estimate chooses the order of a reconstruction well. Does a multi-fidelity optimisation built on it — or BoTorch's multi-fidelity knowledge gradient without it — find the optimum for less computing than single-fidelity BO?
Problem. The spectrum match of section H (six R0 values, σ = 0.002) with the target from
p = 5 on a mesh at the truth (100 nm, 120 nm, 86°) and no noise, the levels p = 2 and p = 3.
On the morphed start mesh the truth gives \(F = 1.46\) at p = 2, \(0.039\) at p = 3 and \(0.0073\)
at p = 4: p = 2 is biased by more than the noise in one observable, p = 3 is not. Every
strategy gets the same budget of 400 s of measured solve time (the summed Evaluation.cost):
sf_p2,sf_p3:opt.bayesian_optimize(EI, no gradients) at a fixed order;mf_kg:opt.multi_fidelity_optimizewith the levels p = 2 and p = 3 (BoTorch 0.18.1,SingleTaskMultiFidelityGP, cost-awareqMultiFidelityKnowledgeGradientwith the measured cost per level, 32 fantasies), stopped by its cost model at 400 s; its recommendation, the maximiser of the posterior mean at p = 3, is evaluated at the end;dwr_screened:opt.bayesian_optimizeon an evaluator that solves every point at p = 2 with the signed DWR estimates \(\eta\) of its six efficiencies and refines to p = 3 only if the point may beat the best p = 3 value: with \(r = (y - y^{target})/\sigma\) the bound \(\delta F = \sum (2|r||\eta|/\sigma + (\eta/\sigma)^2)\), a point with \(F - \delta F > F^*\) keeps its p = 2 values.
The recommendation of a run is its best evaluation at p = 3 (sf_p2: at p = 2), re-evaluated
at p = 4. Seeds 0–2, driver benchmarks/opt_validation.py mf --cost 400, record
benchmarks/results/2026-11-06-validation-opt-mf.json (code after #156).
| strategy | \(F\) at p = 4 of the recommendation (seeds 0 / 1 / 2) | evaluations p = 2 + p = 3 | solve s to \(F \le 6\) | wall time per run |
|---|---|---|---|---|
sf_p2 |
0.82 / 1.11 / 0.55 | 82 / 85 / 124 | 196 / 173 / 85 | 7 min |
sf_p3 |
18.5 / 0.24 / 0.020 | 32 / 33 / 53 | – / 296 / 174 | 7 min |
mf_kg |
4.9 / 156 / 1650 | 59+18 / 36+26 / 59+17 | 422 / – / – | 79–100 min |
dwr_screened |
44 / 56 / 6.5 | 14+5 / 12+5 / 19+8 | – / – / 378 | 7 min |
Parameter errors of the recommendations: sf_p2 0.16–0.19 nm in CD, 0.17–0.33 nm in height,
0.17–0.25° in angle (the bias of p = 2, cf. section I); sf_p3 within 0.04 nm, 0.20 nm and
0.13° on seeds 1 and 2, but 1.1 nm / 0.76° on seed 0, where it stayed in a side basin;
mf_kg 0.3, 3 and 10 nm in CD; dwr_screened 0.2–2 nm and 0.1–2.8 nm.
The runs were made on a 12-thread workstation, three processes with 4 threads in parallel, and
the solve time depends on the load: sf_p2 / sf_p3 of seed 2 ran alone and fitted 124 / 53
evaluations into the budget against 82–85 / 32–33 under load, dwr_screened of seed 2 ran next
to the MF-KG runs (27 evaluations against 17–19). The columns compare strategies under similar
but not identical conditions; the ranking below is larger than this effect.
The study was repeated on a server (two AMD EPYC 9015, 16 cores; the same driver and versions,
three processes with 4 threads, record 2026-11-06-validation-opt-mf-server.json):
| strategy | \(F\) at p = 4 (seeds 0 / 1 / 2) | evaluations p = 2 + p = 3 | wall time per run |
|---|---|---|---|
sf_p2 |
0.82 / 1.11 / 0.87 | 82 / 84 / 85 | 7 min |
sf_p3 |
83 / 3.8 / 0.57 | 27 / 28 / 28 | 7 min |
mf_kg |
84 / 244 / 185 | 38+13 / 26+17 / 33+14 | 50–55 min |
dwr_screened |
1220 / 426 / 460 | 7+4 / 9+3 / 9+3 | 7 min |
A p = 3 solve took 14.6 s there against 12.4 s on the workstation, so sf_p3 fitted fewer
evaluations into the budget and reached the truth on one seed only (0.13 nm, 0.01 nm, 0.00°);
sf_p2 found the same optima as on the workstation (seeds 0 and 1: the same recommendation).
No multi-fidelity run beats the best single-fidelity run of its seed on either machine.
Assessment. At this budget neither multi-fidelity strategy beats single-fidelity BO; the hypothesis of ADR-0012 §6 is not confirmed for the optimisation, only for the choice of the order (section I).
- DWR screening fails on cost: the estimate needs an adjoint solve per efficiency, and p = 2
with six estimates costs 1.4–1.7 times a p = 3 solve on the workstation and 2.1–2.2 times on
the server (from the counts: 18–21 s against 12.4 s, 31 s against 14.6 s). The screened
evaluator therefore made 17–27 evaluations (11–12 on the server) against 27–53 of
sf_p3, too few to leave the initial design (2(d + 1) = 8 points) far behind; the screening itself worked (most points kept their p = 2 values). It would pay where the observables are few and the solve dominates, or with an estimate shared between the functionals. - MF-KG spends most evaluations at p = 2 (36–59 of 62–77) and its best p = 3 value stalls after about 130 s; only the final posterior-mean recommendation improves it (seed 1: 1396 → 153, seed 0 to 4.9). Two seeds end far from the truth. Plausible causes, not tested separately: the p = 2 objective has its minimum elsewhere than p = 3 (the bias above), which the multi-fidelity kernel has to learn from few p = 3 points; and the GP models \(F\) over four decades directly. Its acquisition (knowledge gradient with fantasies) costs 72–93 min of wall time per run on the workstation and 43–48 min on the server against 400 s of solving, so on this problem it is slower by an order of magnitude in wall time as well.
- Single fidelity: p = 2 converges reliably to its own biased optimum (0.2 nm, 0.2°, inside the Laplace uncertainty of section I but systematic, identical on both machines); p = 3 reaches the truth to 0.04 nm when it finds the basin, but with 27–53 evaluations it misses the basin on one seed of three on the workstation and two of three on the server. A p = 2 search followed by a p = 3 refinement (the plan of S3/S5, global surrogate then local least squares at the order the DWR rule picks) uses the strengths of both.
Not tested: larger budgets (an MF-KG advantage typically shows when the cheap level is much cheaper than here, where p = 3 costs 2.3–2.6 times p = 2), the DWR estimate subtracted from the p = 2 values (section I: a factor 6 in the error), and other problems.
L. Gradient-based against gradient-free optimisation of a metasurface deflector (M16 S8)
Problem. A TiO₂ ridge (trapezoid) on fused silica, period 500 nm, illuminated from the
air at 600 nm under 36.87° — the Littrow angle of the −1 order in air — so that the cell deflects
the transmitted light into the −1 order in the glass. Objective: maximise the mean \(\bar T_{-1} = (T_{-1}^s + T_{-1}^p)/2\) of
the −1 transmission efficiency for s and p (polarisation-independent deflection) over the width
CD ∈ [60, 400] nm, the height ∈ [150, 600] nm and the side-wall angle ∈ [80°, 90°]. The
structured unit-cell mesh (a column line bent onto the side wall, 20 nm rows) is built at the
tallest ridge, morphed exactly and remeshed when the quality guard trips; p = 2 (at the start geometry p = 2
and p = 4 differ by less than \(5\cdot10^{-4}\) in the efficiencies, the energy balance closes to
\(10^{-4}\)). The landscape has two maxima, \(\bar T_{-1} \approx 0.92\) near (166 nm, 287 nm) and
\(\approx 0.68\) near (285 nm, 500 nm), and is about 0.5 at the height bound. The five
methods of section H, 40 evaluations, seeds 0–2 (random starts in the box for the local methods).
Driver benchmarks/opt_validation.py meta, record
benchmarks/results/2026-11-06-validation-opt-meta-server.json (the server of section H, 6
threads, next to the study of section H).
| method | best \(\bar T_{-1}\) (seeds 0 / 1 / 2) | evaluations to within 0.01 of the best | s per evaluation |
|---|---|---|---|
| Bayesian optimisation, EI | 0.9144 / 0.9160 / 0.9144 | 22 / 26 / 17 | 2.3 |
| Bayesian optimisation, EI, gradient-enhanced | 0.9153 / 0.9161 / 0.9161 | 22 / 15 / 21 | 6.1 |
| Nelder–Mead | 0.682 / 0.447 / 0.915 | – / – / 30 | 2.2 |
| differential evolution | 0.820 / 0.882 / 0.866 | – / – / – | 2.3 |
| L-BFGS-B (random start) | 0.503 / 0.470 / 0.470 | – / – / – | 6.5 |
The best value any run found is 0.9161 at CD 166.0 nm, height 287.4 nm, 88.5° (the gradient-enhanced BO of seeds 1 and 2, which agree to 0.1 nm); plain BO ends within \(1.7\cdot10^{-3}\) of it, twice at the vertical-wall bound (90°, 167.6 nm, 286.9 nm). The BO runs remeshed 16–35 times, differential evolution 37–38 times; one evaluation of all runs failed.
Assessment. Both BO variants find the global maximum on all three seeds, in 15–26 evaluations to within 0.01. On this landscape the gradients do not shorten the search (to within 0.01: 22 / 15 / 21 against 22 / 26 / 17) and cost 2.6 times as much per evaluation (two polarisations, four orders each, adjoint per order), but they place the final point more precisely (all three within \(8\cdot10^{-4}\) of the best against \(1.7\cdot10^{-3}\)). The local methods depend on the start: Nelder–Mead reaches the global maximum from one start of three and stops on the second maximum (0.68) from another, L-BFGS-B climbs to the height bound (600 nm) from all three random starts and stops there after 12–15 evaluations. Differential evolution gets within 0.05 on two seeds but not within 0.01 in 40 evaluations. Together with section H: a global surrogate stage is needed on multimodal design problems, and gradient enhancement pays where a least-squares objective sharpens the minimum (H) more than where a smooth maximum is to be found (L). Three seeds, one cell, one budget.
M. Bonded bimetal strip under a misfit strain (Timoshenko 1925, M20 S3)
Source. S. Timoshenko, "Analysis of bi-metal thermostats", J. Opt. Soc. Am. 11, 233–255 (1925). The curvature of two bonded layers with a misfit strain Δε:
Set-up.
- Layers. A printed polymer film (E = 2.5 GPa, ν = 0.35, thickness 0.5) on glass
(70 GPa, ν = 0.22, thickness 1.0).
- Load. The film shrinks by s = 10⁻³ along the strip (ε*_xx = −s).
- Geometry and model. A free strip of length 40 h in plane strain, i.e. cylindrical bending
of a plate, so the moduli in the formula are E/(1 − ν²). The rigid-body modes are removed
(remove_rigid_modes).
- Discretisation. p = 3, 80 × 4 cells, the interface on a mesh line, static condensation.
- Measurement. The curvature is twice the quadratic coefficient of the deflection u_y,
fitted over the central half of the strip.
Result (python/tests/test_elasticity.py):
| L/h | cells | p | κ / κ_Timoshenko − 1 |
|---|---|---|---|
| 20 | 40 × 4 | 3 | −3·10⁻⁹ |
| 40 | 80 × 4 | 3 | +2·10⁻⁹ |
| 40 | 80 × 4 | 4 | +6·10⁻⁹ |
| 40 | 160 × 8 | 3 | +8·10⁻⁹ |
| 80 | 160 × 4 | 3 | +2·10⁻⁸ |
Assessment. Away from the ends, Timoshenko's solution is an exact quadratic solution of plane elasticity: the strain is linear through the thickness, σ_yy = 0, and there is no shear. The edge disturbance decays within a few thicknesses. The FEM reproduces the solution in the centre exactly, independently of L/h, of the mesh and of p ≥ 2, so the remaining 10⁻⁹–10⁻⁸ is the noise of the polynomial fit.
The test confirms three parts of the code: the eigenstrain load, the treatment of two materials, and the free-body handling. It does not test the edge stresses, which beam theory does not describe.
N. Crossed grating against FourierGrating's RCWA (M21 S3)
Reference. This is a code-to-code comparison, not a published benchmark. The reference is
FourierGrating (commit 2caa01a), an RCWA code with exact Fourier coefficients of curved
contours (contour2d) and normal-vector factorisation, run with \(N_x = N_z = 20\) (41 × 41
orders). Its energy balance closes to \(6\cdot10^{-13}\).
Set-up.
- Model. FourierGrating's own configuration, examples/crossed_hole_array/hole_array_glass_r125.json.
Air holes of radius 125 nm on a square lattice of 500 nm, in a 150 nm glass film on glass
(\(n = 1.5\)).
- Incidence. \(\lambda = 405\) nm at normal incidence, delta_deg = 90 (p, E along x).
- hp-FEM. The model is imported unchanged with hpfem.fouriergrating and solved with
hpfem.crossed at \(p = 3, 4\) on one Gmsh mesh (2.5 elements per local wavelength,
second-order cells at the hole). The near fields are compared on FourierGrating's two cuts,
through the middle of the film and vertically through the hole.
- Script. examples/crossed_hole_array/run.py; record in
benchmarks/results/2026-11-23-validation-m21-fg-hole-array.json.
Result.
| order | RCWA N = 20 | hp-FEM p = 3 | hp-FEM p = 4 | p = 4 − RCWA |
|---|---|---|---|---|
| R (0, 0) | 0.024680 | 0.024994 | 0.024655 | −2.5·10⁻⁵ |
| R (±1, 0) | 0.001835 | 0.001869 / 0.001834 | 0.001836 / 0.001837 | ≤ 2.5·10⁻⁶ |
| R (0, ±1) | 0.002216 | 0.002227 / 0.002196 | 0.002214 / 0.002218 | ≤ 2.2·10⁻⁶ |
| T (0, 0) | 0.804148 | 0.802281 | 0.804491 | +3.4·10⁻⁴ |
| T (±1, 0) | 0.017612 | 0.01771 / 0.01778 | 0.017591 / 0.017587 | −2·10⁻⁵ |
| T (0, ±1) | 0.024624 | 0.02466 / 0.02448 | 0.024579 / 0.024573 | −5·10⁻⁵ |
| T (±1, ±1) | 0.019650 | 0.01961 … 0.01983 | 0.01961 … 0.01963 | −2 … −4·10⁻⁵ |
| ΣR + ΣT − 1 | 6·10⁻¹³ | −1.2·10⁻³ | 5.5·10⁻⁵ | |
| unknowns, time | 16 min | 39 564, 35 s | 84 888, 4.8 min |
The near field is compared as the relative L² deviation of E. The rows on the film interfaces are excluded, because the two codes evaluate the normal components there on different sides.
| cut | p = 3 | p = 4 | p = 4, away from the material edges |
|---|---|---|---|
| y = 0.075 µm (mid-film) | 1.9·10⁻² | 5.6·10⁻³ | 4.9·10⁻³ |
| z = 0.25 µm (through the hole) | 1.8·10⁻² | 6.9·10⁻³ | 4.5·10⁻³ |

Conventions. The frames were fixed on a case without mirror symmetry, so that a wrong sign
cannot hide:
- Test case. An off-centre elliptic hole tilted by 25°, \(\varphi = 25°\), \(\psi = 30°\), RCWA
with \(N = 8\).
- Polarisation factors. The fields of s and p polarisation match FourierGrating's with the
factors +1.000 and −1.000 (residual \(2\cdot10^{-3}\)–\(6\cdot10^{-3}\)). With the opposite azimuth
they do not match at all (residual 0.9).
- Mixed polarisation. The efficiencies at \(\delta = \pm 45°\) agree to \(7.6\cdot10^{-4}\). With
the other sign of p they would deviate by \(2.6\cdot10^{-2}\); for example, the order T(1, −1) is
0.00492 (RCWA) and 0.00495 (hp-FEM) against 0.0306 for the other sign.
- Mapping. FourierGrating's point (x, y, z) is (x, −z, y − H) here. Its ψ is −φ here, its
p is −p here, so δ becomes (cos δ, −sin δ). Its order (n, m) is (n, −m) here.
- Regression test. python/tests/test_fouriergrating.py keeps these reference values.
Assessment. - Diffracted orders. The two codes agree to \(5\cdot10^{-5}\) at \(p = 4\). - Zeroth transmitted order. \(T_{00}\) differs by \(3.4\cdot10^{-4}\), but it still moved by \(2.2\cdot10^{-3}\) between \(p = 3\) and 4. The truncation error of the RCWA (staircase-free coefficients, but a finite Fourier basis for a discontinuous permittivity) is unknown, so this residual cannot yet be attributed to one code. Two runs would settle it: \(p = 5\) (beyond the 8 GB of the laptop) and an RCWA series in N. - Near fields. They converge to the RCWA field by a factor of about 3 per order. The remaining differences sit at the 90° edges of the hole, where the field is singular: the FEM is not yet converged there at finite p, and the RCWA shows Gibbs ripple and the checkerboard pattern of its truncated Fourier series.