Accuracy and automatic convergence#

Reference hierarchy#

The validation suite separates the numerical decision made by QUARTIC2D from the reference used to evaluate that decision.

  1. HankelTransform is compared with analytic transforms where a closed form is available.

  2. HarmonicTransform separates omitted-q support, interpolation on the represented q domain, and radial quadrature error using the analytic field families in Benchmark matrix.

  3. Fixed-field Interaction results are compared with high-order direct-q quadrature of the same transformed fields.

  4. Large-displacement references use a phase-resolved composite Gauss-Legendre calculation whose own refinement stability must pass before a production configuration is evaluated.

  5. End-to-end tests begin with sampled real-space fields and compare the final result with analytic momentum-space form factors.

The automatic selectors never receive the independent interaction reference. They accept or refuse a calculation from internal refinement comparisons. The independent reference is evaluated afterward. This distinction is essential: automatic self-convergence and independent accuracy are related validation questions, not the same error metric.

Error metrics#

Reference comparisons use two global quantities. For numerical values \(f_i\) and reference values \(f_i^{\mathrm{ref}}\),

(1)#\[\epsilon_{L^2} =\frac{\|f-f^{\mathrm{ref}}\|_2}{\|f^{\mathrm{ref}}\|_2},\]

and

(2)#\[\epsilon_{\mathrm{peak}} =\frac{\|f-f^{\mathrm{ref}}\|_\infty}{\|f^{\mathrm{ref}}\|_\infty}.\]

When one scalar is needed for a plot or table, the benchmark uses

(3)#\[\epsilon_{\mathrm{ref}}=\max(\epsilon_{L^2},\epsilon_{\mathrm{peak}}).\]

A residual curve of the form \(|f_i-f_i^{\mathrm{ref}}|/\|f^{\mathrm{ref}}\|_\infty\) is a pointwise peak-normalized absolute error. Its maximum is \(\epsilon_{\mathrm{peak}}\). It is not a pointwise relative-error tolerance. The requested rtol is likewise not a guarantee that every pointwise residual lies below that numerical value.

HarmonicTransform validation#

The nine non-stress field workloads defined in Smooth Gaussian family, Nodal and complex fields, and Difficult radial profiles are evaluated at requested HarmonicTransform.rtol values of 1e-3, 1e-4, and 1e-5. Omitted-q support and in-domain transform accuracy have separate budgets.

At the primary HarmonicTransform.rtol = 1e-4 target, the finite-rule comparison gives:

Method

Workloads complete

Worst in-domain \(L^2\) error

Trapezoid

9/9

\(6.5\times10^{-5}\)

Simpson

9/9

\(5.1\times10^{-5}\)

GL4

9/9

\(1.5\times10^{-5}\)

GL8

9/9

\(1.5\times10^{-5}\)

Method

Median production time

Selected subdivisions (workload count)

Trapezoid

0.230 s

1: 1/9, 4: 3/9, 8: 5/9

Simpson

0.046 s

1: 7/9, 2: 2/9

GL4

0.152 s

1: 9/9

GL8

0.306 s

1: 9/9

These measurements support the Simpson default described in Choosing numerical methods for the tested smooth localized workloads. They do not establish a universal method ranking.

Harmonic-transform timing and independent-reference error for four finite quadrature methods

Finite-rule HarmonicTransform timing versus independently measured in-domain relative \(L^2\) error. Each marker is one workload/method calculation, so timing and error belong to the same evaluation. The horizontal guide marks \(10^{-4}\) as a reference-comparison level, not the selector’s internal acceptance metric.#

The automatic-convergence study separately tests nine non-stress workloads and two discontinuous stress profiles. Simpson and GL4 accept every non-stress workload in the declared search and those accepted results pass the analytic reference checks. The top-hat and annulus stress cases are refused at the declared settings rather than being reported as resolved smooth inputs.

Broad 74-case Interaction matrix#

The case construction is given in The 74-case Interaction matrix. At Interaction.rtol = 1e-4:

Method

Automatic acceptance

Reference pass among accepted

Conservative refusals with a passing tested point

Accepted / reference fail

Trapezoid

74 / 74

74 / 74

0

0

Simpson

74 / 74

74 / 74

0

0

GL4

74 / 74

74 / 74

0

0

GL8

74 / 74

74 / 74

0

0

FFTLog

46 / 74

46 / 46

5

0

Method

Worst relative \(L^2\) among accepted results

Worst peak-normalized max. error among accepted results

Trapezoid

\(5.08\times10^{-5}\)

\(4.37\times10^{-5}\)

Simpson

\(3.38\times10^{-5}\)

\(4.43\times10^{-5}\)

GL4

\(1.32\times10^{-5}\)

\(4.97\times10^{-5}\)

GL8

\(7.58\times10^{-6}\)

\(3.08\times10^{-5}\)

FFTLog

\(8.19\times10^{-5}\)

\(8.36\times10^{-5}\)

The FFTLog [Hamilton, 2000] row shows partial coverage in the declared parameter box; this is a coverage result, not a global grade.

At Interaction.rtol = 1e-5, the same broad matrix gives Simpson 74/74 automatic acceptances and 74/74 independent-reference passes; GL4 74/74 automatic acceptances and 74/74 independent-reference passes; FFTLog 0/74 automatic acceptances and 0/74 independent-reference passes. This records the boundary of the declared search boxes; it does not imply mathematical impossibility outside those boxes.

Interpreting the FFTLog coverage#

At Interaction.rtol = 1e-4, the declared FFTLog search has the following field- and kernel-family coverage:

Field-workload coverage

  • isotropic Gaussian: 9/14 accepted.

  • odd-pair Gaussian: 1/1 accepted.

  • anisotropic Gaussian: 9/14 accepted.

  • high-order \(m=4\) continuity: 0/1 accepted.

  • nodal mixed: 13/14 accepted.

  • complex mixed-parity: 10/15 accepted.

  • exponential cusp: 2/5 accepted.

  • oscillatory exponential: 0/5 accepted.

  • algebraic: 2/5 accepted.

Kernel-family coverage

  • Rytova–Keldysh: 4/17 accepted.

  • bare Coulomb: 1/7 accepted.

  • Thomas–Fermi: 4/4 accepted.

  • Yukawa: 12/12 accepted.

  • 2D Helmholtz/Yukawa: 4/4 accepted.

  • single gate: 4/4 accepted.

  • dual gate: 6/7 accepted.

  • interlayer Coulomb: 1/7 accepted.

  • gated interlayer: 4/4 accepted.

  • static 2DEG RPA: 5/7 accepted.

  • smooth numerical control: 1/1 accepted.

These counts motivate workload-dependent FFTLog guidance. They should not be extrapolated to untested field families, kernels, parameter boxes, or tolerances.

FFTLog automatic-acceptance counts by field workload in the declared search box

FFTLog automatic-acceptance coverage by field workload at the primary requested tolerance. Each marker is annotated as accepted/tested; zero-coverage rows remain visible rather than disappearing as empty bars. The workload order follows the benchmark definition and is not sorted by acceptance fraction.#

FFTLog automatic-acceptance counts by kernel family in the declared search box

FFTLog automatic-acceptance coverage by kernel family. Families retain a physics-based ordering instead of being sorted by acceptance rate, so the figure describes the tested boundary without presenting a ranking.#

Canonical automatic-convergence matrix#

The four canonical cases are defined in Benchmark matrix. Their Interaction.rtol = 1e-4 outcomes distinguish selector behavior from demonstrated numerical-method capability.

Automatic selector outcome

Domain

Case

Simpson

GL4

FFTLog

Ogata

standard

isotropic Coulomb

accepted

accepted

refused

accepted

standard

anisotropic RK

accepted

accepted

refused

accepted

standard

complex dual gate

accepted

accepted

accepted

accepted

standard

nodal RPA

accepted

accepted

refused

refused

large

isotropic Coulomb

accepted

accepted

accepted

accepted

large

anisotropic RK

accepted

accepted

accepted

accepted

large

complex dual gate

refused

accepted

refused

accepted

large

nodal RPA

refused

accepted

refused

refused

Independent qualification outcome

Domain

Case

Simpson

GL4

FFTLog

Ogata

standard

isotropic Coulomb

reference pass

reference pass

not established in tested box

reference pass

standard

anisotropic RK

reference pass

reference pass

not established in tested box

reference pass

standard

complex dual gate

reference pass

reference pass

reference pass

reference pass

standard

nodal RPA

reference pass

reference pass

qualified point found

terminal point passes reference

large

isotropic Coulomb

reference pass

reference pass

reference pass

reference pass

large

anisotropic RK

reference pass

reference pass

reference pass

reference pass

large

complex dual gate

not established

reference pass

not established in tested box

reference pass

large

nodal RPA

not established

reference pass

not established in tested box

not established

None of the automatic acceptances in these 32 method/case/domain rows fails the independent reference check.

Case-level automatic-convergence outcomes for four methods in standard and large displacement domains

Case-level selector outcomes for the canonical matrix in the standard and large-displacement domains. Filled circles indicate automatic acceptance followed by an independent-reference pass. Open symbols distinguish automatic refusals for which an independently qualified point was subsequently demonstrated from unresolved refusals. Crosses mark cases for which the declared search box did not demonstrate a capable point.#

For finite rules, validation also determines the minimum tested subdivision count that independently satisfies both (1) and (2). This reference-qualified minimum is distinct from the subdivision count chosen by the automatic selector.

Mixed-parity angular content#

The complex workload (4) contains \(m\in\{0,1,-2\}\). It therefore exercises odd differences \(m-m'\) and the signed-order translation Bessel parity. Unit tests also compare selected odd harmonic pairs with an unreduced \((q,\phi_q)\) quadrature.

This coverage matters because zero displacement and even-only harmonic sets cannot expose an incorrect odd-order translation sign.

Reference stability at large displacement#

Large-\(\delta\) references are refined independently before they are used to evaluate a production method.

For the complex mixed-parity dual-gate case, the final two phase-resolved reference levels differ by \(1.06\times10^{-7}\) in relative \(L^2\) and \(7.45\times10^{-8}\) in peak-normalized maximum error. The declared stability threshold is \(1\times10^{-5}\).

The harder nodal-RPA reference requires additional phase refinement and reaches a final coarse/fine relative-\(L^2\) change of \(8.29\times10^{-6}\).

Cross-stage and end-to-end checks#

The standard-domain cross-stage suite evaluates 74 cases after adaptive HarmonicTransform sampling. Simpson produces 74/74 independent-reference passes and GL4 produces 74/74. Automatic selector outcomes remain recorded separately from those reference comparisons.

At large displacement, an upstream q-boundary refusal remains a refusal. The validation suite does not extend q support beyond the information supported by the radial sampling merely to force a downstream result.

The true end-to-end suite begins with sampled Cartesian fields and reports errors at each layer separately:

Domain

Case

PETAL2D relative \(L^2\)

HarmonicTransform relative \(L^2\)

Interaction relative \(L^2\)

standard

isotropic Coulomb

\(4.97\times10^{-7}\)

\(1.24\times10^{-5}\)

\(7.95\times10^{-6}\)

standard

anisotropic RK

\(5.51\times10^{-7}\)

\(1.21\times10^{-5}\)

\(5.06\times10^{-7}\)

standard

nodal RPA

\(1.69\times10^{-6}\)

\(1.6\times10^{-5}\)

\(1.59\times10^{-6}\)

large

isotropic Coulomb

\(4.97\times10^{-7}\)

\(1.24\times10^{-5}\)

\(3.06\times10^{-6}\)

large

anisotropic RK

\(5.51\times10^{-7}\)

\(1.21\times10^{-5}\)

\(1.85\times10^{-6}\)

large

nodal RPA

\(1.69\times10^{-6}\)

\(1.6\times10^{-5}\)

\(2.64\times10^{-5}\)

This accounting keeps the sampled-field representation error, transform error, and final interaction error distinguishable. Agreement in the final scalar interaction is not used to hide a poorly resolved upstream field.

Unit tests#

Unit tests are software-regression evidence rather than publication numerical evidence. The current test command and CI expectations are maintained in Testing. Tests cover transform conventions, negative harmonic order, mixed-parity translation phases, zero-momentum and zero-displacement limits, numerical-method behavior, convergence interfaces, and public API checks.