pub(super) fn peak_shells(
wave: Family,
dim: usize,
jet: bool,
decay: f64,
offset: f64,
(dual, reduction): (&[[f64; 3]; 3], Option<&Reduction>),
) -> i32Expand description
Cube shells that an Ewald part of wave on a lattice of dimension dim visits
before its convergence test may stop it (Shells::sum).
These are the shells with a lattice vector within offset (the reduced shift or Bloch
vector, the origin of the part) plus the radius where the moduli of its far terms
peak, on a lattice reduced by reduction with the dual rows dual. 0 where the
terms do not fall (decay <= 0): both parts diverge there.
§Formula
Far from the origin each term is the Gaussian exp(-decay x^2 / 2) of its distance
x times a polynomial of degree l (l - |m| along a chain, |m| for cylindrical
waves) in real and reciprocal space, less 2 for the endpoint of its Kambe integral or
1 / v. A shell holds about x^(dim - 1) terms, and jets up to x^2 more, so the
moduli of a shell peak at x^2 = power / decay and fall monotonically beyond.
§Why
Before the peak the moduli can fall and rise again, as the real-space terms of lossy
k at splits turned close to 90 degrees and the reciprocal terms of high degree do;
without the floor such sums stop on their first shells.