// !!! This function affects the supercell convention !!! (SUPERCELL-CONV)
// When modifying it, you must modify all functions that have this label.
This function affects the supercell convention !!. (SUPERCELL-CONV)
When modifying it, you must modify all functions that have this label.
This function affects the supercell convention !! . ( SUPERCELL - CONV ) When modifying it you must modify all functions that have this label .
fn image_cells(periods: [u32; 3]) -> Vec<[u32; 3]> {
    let mut out = Vec::with_capacity(periods.iter().product::<u32>() as usize);
    let [na, nb, nc] = periods;
    for ia in 0..na {
        for ib in 0..nb {
            for ic in 0..nc {
                out.push([ia, ib, ic]);
            }
        }
    }
    out
}
fn image_cells ( periods : [ u32 ; 3 ] ) -> Vec < [ u32 ; 3 ] > { let mut out = Vec :: with_capacity ( periods . iter ( ) . product :: < u32 > ( ) as usize ) ; let [ na , nb , nc ] = periods ; for ia in 0 .. na { for ib in 0 .. nb { for ic in 0 .. nc { out . push ( [ ia , ib , ic ] ) ; } } } out }
This function affects the supercell convention !
This function affects the supercell convention !
periods
[u32; 3]