sum

Function sum 

Source
pub fn sum(
    wave: Family,
    k: Complex,
    lattice: &BlochLattice,
    shift: [f64; 3],
    eta: Complex,
) -> Result<Complex>
Expand description

The lattice sum of wave at the wavenumber k, the shift shift and the Ewald split parameter eta, as treams.lattice.lsum* returns it.

shift is the r of treams, and the lattice vectors a and the Bloch vector kpar come with lattice. eta = 0 selects the automatic split. The module docs give the definition, the frame, the crosswalk to treams and the differences from it.

Upstream: the lsum* functions of treams.lattice, from lsumsw1d to lsumcw2d.

ยงErrors

Error::InvalidInput for invalid labels, dimensions or inputs and at a diffraction threshold, Error::NotConverged where an Ewald part does not converge or the parts cancel beyond use, and Error::NonFinite for a non-finite term. The module docs list the messages.