pub struct CompendiumEntry {
pub name: String,
pub acronym: Vec<String>,
pub mat_num: u32,
pub density: f64,
pub atom_density: f64,
pub source: String,
pub comment: Vec<String>,
pub elements: Vec<CompendiumElement>,
}Expand description
One compendium material entry.
Fields§
§name: StringDisplay name ("Bone Equivalent Plastic, B-110").
acronym: Vec<String>Acronym(s) of the material; the upstream field mixes bare strings and arrays, so this is always a vector.
mat_num: u32Compendium material number (unique across the dataset).
density: f64Nominal density [g/cm³].
atom_density: f64Nominal atom density [atoms/barn·cm]; 0.0 when the field is absent.
source: StringProvenance string (e.g. "PNNL"); empty when absent.
comment: Vec<String>Free-form comment lines; upstream mixes bare strings and arrays, so this is always a vector.
elements: Vec<CompendiumElement>Elemental constituents of the material.
Implementations§
Source§impl CompendiumEntry
impl CompendiumEntry
Sourcepub fn weight_fractions(&self) -> BTreeMap<u32, f64>
pub fn weight_fractions(&self) -> BTreeMap<u32, f64>
All (isotope ZAID → material-level weight fraction) pairs.
Sourcepub fn to_material(&self) -> Result<Material, Error>
pub fn to_material(&self) -> Result<Material, Error>
Convert to a Material whose composition holds relative masses
equal to the isotopic weight fractions (normalized to 1 g total).
Density and provenance are attached as metadata; set the real mass or density separately when building transport inputs.
Trait Implementations§
Source§impl Clone for CompendiumEntry
impl Clone for CompendiumEntry
Source§fn clone(&self) -> CompendiumEntry
fn clone(&self) -> CompendiumEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more