pub struct CrossSectionPlan<'a> { /* private fields */ }Expand description
Reusable evaluation plan for one immutable resonance source.
The formalism-specific resonance caches (J-groups, reduced width
amplitudes, penetrability at each resonance energy) are built once by
CrossSectionPlan::new and reused by every evaluation. This is the
primitive that lets the continuous Doppler integral evaluate the same
ENDF equation on many adaptively chosen energies without rebuilding the
caches per quadrature panel; cross_sections_on_grid is the plan
applied to one grid.
Implementations§
Source§impl<'a> CrossSectionPlan<'a>
impl<'a> CrossSectionPlan<'a>
Sourcepub fn evaluate_one(&self, energy_ev: f64) -> CrossSections
pub fn evaluate_one(&self, energy_ev: f64) -> CrossSections
Cross-sections at one energy, summed over every range covering it.
§Panics
Panics if energy_ev is non-finite or non-positive — the same
public contract as cross_sections_at_energy.
Sourcepub fn evaluate(&self, energies: &[f64]) -> Vec<CrossSections>
pub fn evaluate(&self, energies: &[f64]) -> Vec<CrossSections>
Cross-sections at every energy of energies, in order.
§Panics
Panics if any element of energies is non-finite or non-positive.
Validating the entire grid up-front (O(n) branch, one pass) means a
single bad energy fails fast with a clear message instead of being
hidden inside the inner loop.
Auto Trait Implementations§
impl<'a> Freeze for CrossSectionPlan<'a>
impl<'a> RefUnwindSafe for CrossSectionPlan<'a>
impl<'a> Send for CrossSectionPlan<'a>
impl<'a> Sync for CrossSectionPlan<'a>
impl<'a> Unpin for CrossSectionPlan<'a>
impl<'a> UnsafeUnpin for CrossSectionPlan<'a>
impl<'a> UnwindSafe for CrossSectionPlan<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more