fn compute_ewald_factors(factors: &mut EwaldFactorVec, cell: &UnitCell, parameters: &EwaldParameters) {

    let kmax = parameters.kmax;
    let kmax3d = 4 * kmax * kmax * kmax + 6 * kmax * kmax + 3 * kmax;

    factors.clear();
    factors.reserve(kmax3d as usize);

    match cell.shape() {
        CellShape::Infinite => panic!("Ewald is not defined with infinite unit cell"),
        // TODO: there is a faster algorithm for orthorhombic cell
        CellShape::Orthorhombic | CellShape::Triclinic => compute_ewald_factors_triclinic(factors, cell, parameters),
    }
}
/// Compute the factors for the given `cell` and Ewald `parameters`
Compute the factors for the given `cell` and Ewald `parameters`
Compute the factors for the given ` cell ` and Ewald ` parameters `
fn compute_ewald_factors(factors: &mut EwaldFactorVec, cell: &UnitCell, parameters: &EwaldParameters) {
    let kmax = parameters.kmax;
    let kmax3d = 4 * kmax * kmax * kmax + 6 * kmax * kmax + 3 * kmax;
    factors.clear();
    factors.reserve(kmax3d as usize);
    match cell.shape() {
        CellShape::Infinite => panic!("Ewald is not defined with infinite unit cell"),
        // TODO: there is a faster algorithm for orthorhombic cell
        CellShape::Orthorhombic | CellShape::Triclinic => compute_ewald_factors_triclinic(factors, cell, parameters),
    }
}
fn compute_ewald_factors ( factors : & mut EwaldFactorVec , cell : & UnitCell , parameters : & EwaldParameters ) { let kmax = parameters . kmax ; let kmax3d = 4 * kmax * kmax * kmax + 6 * kmax * kmax + 3 * kmax ; factors . clear ( ) ; factors . reserve ( kmax3d as usize ) ; match cell . shape ( ) { CellShape :: Infinite => panic ! ( " " ) , // TODO: there is a faster algorithm for orthorhombic cell CellShape :: Orthorhombic | CellShape :: Triclinic => compute_ewald_factors_triclinic ( factors , cell , parameters ) , } }
Compute the factors for the given `cell` and Ewald `parameters`
Compute the factors for the given ` cell ` and Ewald ` parameters `
factors
&mut EwaldFactorVec
cell
&UnitCell
parameters
&EwaldParameters