Skip to content

TruncationError

Defined in: mod.rs:157

Available on crate feature alloc only.

pub enum TruncationError {
DegreeUnavailable { requested: usize, available: usize },
OrderExceedsDegree { degree: usize, order: usize },
DegreeBelowTwo(usize),
}

Why a degree × order window over a coefficient set could not be set up (SphericalHarmonicField::new / truncated(SphericalHarmonicField::truncated)).

Each of these is a request the evaluator cannot honour as stated. It does not clamp instead: a simulation configured for 70×70 on a degree-36 file would otherwise run at 36×36 and report nothing.

requested: usize available: usize

degree exceeds the coefficient set’s max_degree.


degree: usize order: usize

order > degree (there is no C̄nm with m > n).


DegreeBelowTwo(usize)

degree < 2: the field starts at degree 2 (degree 0 is the point mass, degree 1 vanishes), so such a field would evaluate to exactly zero.