Materials: compositions, mixing, and serialization for nuclear engineering.
A [Material] is a map from [NuclideId] to a stored mass in grams,
plus an optional mass density (g/cm3 by convention) and free-form JSON
metadata. Density lives outside the composition: it is a property of
the stream rather than part of the composition itself.
Atomic-mass-dependent conversions ([Material::from_atom_frac] and
[Material::atom_fractions]) take a [MassProvider] so the material
crate stays independent of the nuclear-data tables; wire up
nucleide_nuclei::data once it lands.
use ;
use NuclideId;
let mut mat = new;
mat.add_nuclide;
mat.add_nuclide;
assert_eq!;
// Atom conversions need atomic masses:
let atoms = mat.atom_fractions;
assert!;