sum_array

Function sum_array 

Source
pub fn sum_array(
    waves: Vec<Family>,
    wavenumbers: Vec<Complex>,
    lattices: Vec<BlochLattice>,
    shifts: Vec<[f64; 3]>,
    etas: Vec<Complex>,
    parts: Vec<SumPart>,
) -> Result<(Vec<Complex>, SumResidual)>
Expand description

sum_part over arrays, with the residual for the pullback.

Each input holds one value for all outputs or one per output. The residual keeps the inputs only; the pullback recomputes the local derivatives.

treams-rs extension: the lsum* ufuncs of treams.lattice broadcast their inputs but have no gradients.