Expand description
Sums over cube shells and when they stop.
Upstream: the shell loops of realsum* and recsum* in lattice/_esum.pyx. The
relative tolerance, the shell limits that grow with the terms and the compensated
sums are treams-rs extensions.
StructsΒ§
- Shells π
- One Ewald part summed over cube shells of integer points (
Shells::sum), whichShells::extendcontinues. Below every automatic split (below_automatic), where the parts cancel, a part that stops atSHELL_TOLERANCEof its own sum leaves that much in the complete sum, so both parts continue toSHELL_TOLERANCEof the complete sum, and each part keeps the rounding errors of its additions (add_exactly): next to a lattice point at a zero Bloch vector millions of real-space terms add in phase far below an ulp of it.
ConstantsΒ§
- NOT_
CONVERGED π - The message of a shell sum that does not converge within its limit.
- SHELL_
TOLERANCE π - Largest part of the scale of a shell sum that each of its last two shells may add before the sum stops.
- TERM_
DECAY π - The shell limits of
real_shellsandreciprocal_shellsreach every term whose Gaussian factor exceedse^-TERM_DECAY.
FunctionsΒ§
- add_
exactly π - Adds
xtosumand the rounding error of that addition, which Knuthβs two-sum finds exactly, toerror. - add_
jet_ πexactly add_exactlyfor the real and imaginary parts of a jetβs value and derivatives.- is_
shell_ πlimit - Whether
erroris the failure ofnot_convergedrather than one of the cancellation failures that share its variant. - largest_
index π - The largest shell index of the lattice vectors within
radiusof a lattice reduced byreduction, whose dual rows aredual(seeshells_within). - largest_
modulus π Jet::norm, the largest modulus of the value and derivatives, from one square root of the largest squared modulus instead of ahypotper component;Jet::normwhen the squares overflow.- norm π
- The Euclidean norm of a lattice-frame vector.
- not_
converged π - The failure of a shell sum that does not converge within its limit.
- peak_
shells π - Cube shells that an Ewald part of
waveon a lattice of dimensiondimvisits before its convergence test may stop it (Shells::sum). - real_
shells π - Cube shells the real-space sum may visit.
- reciprocal_
shells π - Cube shells the reciprocal sum may visit, as
[fail, extend]. - shells π
- Cube shells a sum may visit before it fails: 200, 32 and 16 in one, two and three dimensions.
- shells_
within π - Cube shells of a sum over a lattice, reduced by
reduction, whose dual rows aredual(a_i . b_j = 2 pi delta_ij):shells, or where reaching the lattice vectors withinradiusneeds more, that many plus two, up to four times the base. Indexiof a lattice vectorxisc_i . x / 2 pifor the dual rowscof the reduced basis.