Skip to main content

loss_density_node_count

Function loss_density_node_count 

Source
pub fn loss_density_node_count(
    model: &PennInelastic,
    grid: Option<&DiimfpGrid>,
    energy_ev: f64,
    density_tolerance: f64,
) -> usize
Expand description

The number of nodes of the loss-density model of the row at energy_ev (eV, on the model’s own axis) of a table of model built with density tolerance density_tolerance, reading the DIIMFP from grid where it covers the loss as a table build does (pass the grid of FullPenn::diimfp_grid for the table’s energies, or None). The count is bounded by MAX_NODES (a few more: the last refinement pass splits every failing panel); a row that reaches it is refused by the table build (InelasticTableError::DensityNodeLimit). Each node not covered by the grid costs one direct DIIMFP evaluation.