Expand description
The spectral series of 1D spherical sums off the axis, and when to take it.
treams-rs extension: treams has only the Ewald sum.
ConstantsΒ§
- QUIET_
SHELL π - Part of the summed moduli below which a shell of
spectral_sw1dcounts as quiet; the series stops after two quiet shells past the peak. - REAL_
ULPS π - Rounding error of the real-space part of a 1D spherical sum relative to its moduli, in ulps: its Kambe integrals of even order keep their relative accuracy.
- SERIES_
DECAY π spectral_sw1dis used only where its terms fall bye^-SERIES_DECAYpast their peak withinSERIES_SHELLSorders.- SERIES_
SHELLS π - Diffraction orders the spectral series of a 1D spherical sum may take on each side of zero before it is not used.
- SPECTRAL_
FIRST_ πW - The
w = |k| rho |eta|from which a 1D spherical sum tries its spectral series before the Ewald sum, whose reciprocal part then cancels bye^(w^2)or more. - SPECTRAL_
SWITCH_ πLOSS - Relative rounding error, on the scale of
max(|S|, 1), from which a component of a 1D spherical Ewald sum is taken from its spectral series instead, if that bounds it more tightly. Derivatives count on the scale|dS| + max(|S|, 1) swiths = |k|for length derivatives and1 / |k|for inverse-length ones.
FunctionsΒ§
- prefer_
spectral_ πsw1d - A 1D spherical Ewald sum
ewaldwith the rounding boundsroundingof its components (the valueβs with the predicted loss of thecancellationof its parts), completed from the spectral series: each component whose bound exceedsSPECTRAL_SWITCH_LOSScomes from the series where that bounds it more tightly, and a failed sum is replaced by the series. The choice of the value reads only values and value bounds, as in value-only evaluations. Fails where the valueβs bound still exceedsMAX_LOSS. - spectral_
sw1d π - The spectral series of a 1D spherical sum along z off the axis, with first-order bounds on its rounding errors in units of epsilon.