Skip to main content

build_inelastic_table_for_model

Function build_inelastic_table_for_model 

Source
pub fn build_inelastic_table_for_model(
    model: &PennInelastic,
    material: &Material,
    options: &InelasticTableOptions,
) -> Result<CrossSectionTable, InelasticTableError>
Expand description

Build the inelastic energy-loss table of any of the three ELF-extension models (PennInelastic: single-pole Penn, full Penn or Mermin-ELF) on the grid of options, by the same procedure as build_inelastic_table (module docs), with that model’s DIIMFP and inverse IMFP in place of the single pole’s. For PennInelastic::SinglePole the rows are those of build_inelastic_table; only the model and provenance strings differ, and they carry PennInelastic::model_identity, so a table names the algorithm it was built with.

The full Penn and Mermin models evaluate their DIIMFP by numerical integration, so a table of either costs far more than a single-pole table on the same grid. For the full model the rows read the DIIMFP from a DiimfpGrid built once for the grid energies (FullPenn::diimfp_grid: interpolation error held to the model tolerance), which is what makes such a table affordable (#256); the inverse mean free paths are still the model’s own.