pub fn overlap_integral(
a: &HarmonicField,
b: &HarmonicField,
method: InterpolationMethod,
) -> Result<Overlap, ErrorsJSL>Expand description
The overlap of fields a and b: |∫ a·b* dA|² / (∫|a|² dA ∫|b|² dA).
The integral is evaluated on a’s domain with that domain’s quadrature weights (so the
Jacobian of every coordinate system is handled), in Cartesian components (so a and b may
use different polarization bases). If b lives on another domain it is first resampled onto
a’s with method, taking zero outside b’s domain (e.g. an aperture field that does not
cover the whole plane). b is converted to a’s time convention if needed; the fields must
share rank and frequency.