Expand description
MAGIC weight-window generation.
Derives MCNP weight-window lower bounds from an MCNP mesh tally:
max_val[g] = max over all volume elements of flux[ve][g]
ww[ve][g] = null_value if rel_error[ve][g] > tolerance
= flux[ve][g] / (2 * max_val[g]) otherwiseDefaults: tolerance = 0.5, null_value = 0.0. The comparison against
the tolerance is strict (>), so a cell whose error equals the tolerance
keeps its scaled value.
Following the legacy mesh-tag convention, the output also carries the
single maximum energy bound for total/single-bin tallies (or e_bounds[1:]
for multi-group tallies) in MagicOutput::e_upper_bounds, plus the tag
names the data would be stored under (ww_n, n_e_upper_bounds, …) in
MagicOutput::ww_tag_name / MagicOutput::e_upper_bounds_tag_name.
If every flux feeding one energy bin is non-positive, the normalization
would divide by zero; Error::ZeroMaxFlux is returned rather than
emitting inf/nan.
Structs§
- Magic
Output - Output of the MAGIC algorithm — the data written to mesh tags in legacy workflows.
- Magic
Params - MAGIC tuning parameters.
Enums§
- Magic
Selection - Which tally arrays feed the MAGIC algorithm.
Functions§
- magic
- Run MAGIC on the energy-integrated totals of a tally with default
parameters (
tolerance = 0.5,null_value = 0.0). - magic_
with - Run MAGIC on a tally with explicit array selection and parameters.