pub struct DynamicRun<'a> { /* private fields */ }Expand description
A fluence-stepped run. See the module docs.
Implementations§
Source§impl<'a> DynamicRun<'a>
impl<'a> DynamicRun<'a>
Sourcepub fn new(
grid: CompositionGrid,
beam: Beam,
config: BcaConfig,
stopping: &'a (dyn ElectronicStopping + Sync),
table: &'a ScatteringTable,
cfg: DynamicConfig,
) -> Result<Self, DynamicRunError>
pub fn new( grid: CompositionGrid, beam: Beam, config: BcaConfig, stopping: &'a (dyn ElectronicStopping + Sync), table: &'a ScatteringTable, cfg: DynamicConfig, ) -> Result<Self, DynamicRunError>
Set up a run of beam.count primaries on grid.
Sourcepub fn with_retention(
self,
limits: impl IntoIterator<Item = (u8, f64)>,
) -> Result<Self, DynamicRunError>
pub fn with_retention( self, limits: impl IntoIterator<Item = (u8, f64)>, ) -> Result<Self, DynamicRunError>
Set the retention limits (see the module docs, “Retention
limit”): for each (Z, f) the largest atomic fraction f, with
0 < f < 1, of element Z a slab may hold. Replaces any earlier
limits; an empty map switches the model off (the default).
Sourcepub fn re_emitted_m2(&self) -> &BTreeMap<u8, f64>
pub fn re_emitted_m2(&self) -> &BTreeMap<u8, f64>
Atoms/m² re-emitted by the retention limit over the accepted steps, by atomic number.
Sourcepub fn grid(&self) -> &CompositionGrid
pub fn grid(&self) -> &CompositionGrid
The current target.
Sourcepub fn ions_total(&self) -> u64
pub fn ions_total(&self) -> u64
Total primaries of the run.
Sourcepub fn fluence_done_m2(&self) -> f64
pub fn fluence_done_m2(&self) -> f64
Fluence delivered so far, ions/m².
Sourcepub fn fluence_per_ion_m2(&self) -> f64
pub fn fluence_per_ion_m2(&self) -> f64
Fluence one primary stands for, ions/m².
Sourcepub fn steps_done(&self) -> u64
pub fn steps_done(&self) -> u64
Accepted steps so far.
Sourcepub fn cumulative(&self) -> &Yields
pub fn cumulative(&self) -> &Yields
Event counts summed over the accepted steps.
Sourcepub fn recession_m(&self) -> f64
pub fn recession_m(&self) -> f64
Cumulative surface recession of the accepted steps, m (0 with erosion off).
Sourcepub fn step(&mut self) -> Result<Option<StepRecord>, DynamicRunError>
pub fn step(&mut self) -> Result<Option<StepRecord>, DynamicRunError>
Run the next step. Ok(None) when all primaries are used. On error the
grid and the run state are unchanged.
Sourcepub fn run_all(
&mut self,
on_step: impl FnMut(&StepRecord, &CompositionGrid),
) -> Result<(), DynamicRunError>
pub fn run_all( &mut self, on_step: impl FnMut(&StepRecord, &CompositionGrid), ) -> Result<(), DynamicRunError>
Run all remaining steps, calling on_step after each accepted step.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DynamicRun<'a>
impl<'a> !UnwindSafe for DynamicRun<'a>
impl<'a> Freeze for DynamicRun<'a>
impl<'a> Send for DynamicRun<'a>
impl<'a> Sync for DynamicRun<'a>
impl<'a> Unpin for DynamicRun<'a>
impl<'a> UnsafeUnpin for DynamicRun<'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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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