#[non_exhaustive]pub enum Error {
Show 17 variants
EmptyTally,
LengthMismatch {
expected: usize,
got: usize,
},
ZeroMaxFlux {
energy_group: usize,
},
EmptyPdf,
NegativePdf {
index: usize,
value: f64,
},
NonFinitePdf {
index: usize,
},
ZeroSumPdf,
NegativeTally {
index: usize,
value: f64,
},
NonFiniteTally {
field: &'static str,
index: usize,
},
ZeroVarianceDim {
dim: usize,
},
BadDraw {
value: f64,
},
NegativeWindow {
index: usize,
value: f64,
},
NonFiniteWindow {
index: usize,
},
BadEnergyBounds {
index: usize,
},
BadMeshBounds {
axis: usize,
index: usize,
},
BadEmissionOption {
option: &'static str,
value: String,
detail: &'static str,
},
Wwinp(String),
}Expand description
Errors raised by variance-reduction tools.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyTally
Tally carries no volume elements.
LengthMismatch
A requested array has the wrong length.
ZeroMaxFlux
Every flux value feeding one energy bin is non-positive, so the
MAGIC normalization value / (2 * max) would divide by zero.
(Rather than silently emitting inf/nan, this is an error.)
EmptyPdf
PDF input is empty.
NegativePdf
PDF contains a negative entry.
NonFinitePdf
PDF contains a non-finite (NaN/infinite) entry.
ZeroSumPdf
PDF sums to zero (or negatively); cannot normalize.
NegativeTally
Tally or user density contains a negative value.
NonFiniteTally
Tally array contains a non-finite (NaN/infinite) value.
Fields
ZeroVarianceDim
A KDE Silverman dimension has zero variance (a zero bandwidth is a delta spike, never a density); use an explicit fixed width instead.
BadDraw
A KDE draw uniform falls outside [0, 1).
NegativeWindow
A weight-window lower bound is negative and has no spelling in either target format (non-positive windows are inert; negative never is).
NonFiniteWindow
A weight-window lower bound is NaN or infinite.
BadEnergyBounds
Energy upper bounds are empty, non-finite, non-positive, or not strictly increasing, so the window energy grid is ill-defined.
BadMeshBounds
Mesh bounds have fewer than two entries, are non-finite, or are not strictly increasing.
BadEmissionOption
An emission tuning parameter or card token falls outside the range the target code enforces when reading the file, or cannot be interpolated into the emitted card safely.
Fields
Wwinp(String)
The WWINP writer in nucleide-mcnp-io refused the assembled file.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()