Skip to main content

interpolate_ooc_linear

Function interpolate_ooc_linear 

Source
pub fn interpolate_ooc_linear(
    energy_ev: &[f64],
    n_xx: &[f64],
    n_ixx: &[f64],
    n_zz: &[f64],
    n_izz: &[f64],
    query_ev: f64,
) -> [f64; 4]
Expand description

Piecewise-linear interpolation on a sorted energy grid.

Returns [n_xx, n_ixx, n_zz, n_izz] at query_ev. Out-of-range queries clamp to the grid endpoints.