pub struct DynamicRun2d<'a> { /* private fields */ }Expand description
A fluence-stepped 2-D run. See the module documentation.
Implementations§
Source§impl<'a> DynamicRun2d<'a>
impl<'a> DynamicRun2d<'a>
Sourcepub fn new(
columns: Vec<CompositionGrid>,
column_width_m: f64,
beam: Beam,
config: BcaConfig,
stopping: &'a (dyn ElectronicStopping + Sync),
table: &'a ScatteringTable,
cfg: Dynamic2dConfig,
) -> Result<Self, DynamicRunError>
pub fn new( columns: Vec<CompositionGrid>, column_width_m: f64, beam: Beam, config: BcaConfig, stopping: &'a (dyn ElectronicStopping + Sync), table: &'a ScatteringTable, cfg: Dynamic2dConfig, ) -> Result<Self, DynamicRunError>
Set up a run on columns (front to back identical bookkeeping to the
1-D module; all columns must share the lateral width column_width_m).
beam.count is the number of primaries per illuminated column.
Sourcepub fn with_profiles(
self,
grid: VoxelTallyGrid,
snapshot_fluences_m2: &[f64],
) -> Result<Self, DynamicRunError>
pub fn with_profiles( self, grid: VoxelTallyGrid, snapshot_fluences_m2: &[f64], ) -> Result<Self, DynamicRunError>
Tally the implanted beam species and the displacement damage on grid
(sample frame, see the profiles module docs) and take a snapshot
when the peak fluence reaches each of snapshot_fluences_m2 (each in
(0, fluence_m2], rounded to a whole number of primaries per column).
Steps are shortened to end on a snapshot, so the step sequence (and
the random numbers drawn, which are indexed by primary) depends on the
snapshot list; with the same list a run is bit-identical at any thread
count. Without this call no profile is tallied and results are
unchanged.
Sourcepub fn snapshots(&self) -> &[ProfileSnapshot]
pub fn snapshots(&self) -> &[ProfileSnapshot]
Snapshots taken so far at the requested fluences, in order.
Sourcepub fn profile_snapshot(&self) -> Option<ProfileSnapshot>
pub fn profile_snapshot(&self) -> Option<ProfileSnapshot>
The profiles at the current fluence (None unless
with_profiles was called).
Sourcepub fn run_until_cut_through(
&mut self,
on_step: impl FnMut(&Step2d, &[CompositionGrid]),
) -> Result<CutThrough, DynamicRunError>
pub fn run_until_cut_through( &mut self, on_step: impl FnMut(&Step2d, &[CompositionGrid]), ) -> Result<CutThrough, DynamicRunError>
Run until the hole first reaches the substrate (an illuminated column
with no slab left) or the primaries are used up, calling on_step
after each accepted step.
The columns must have a substrate (the layer beneath the film). The
fluence is resolved to one step: see CutThrough. With a fixed or
small adaptive step the bracket is narrow; the damage left in the
substrate at the stop is in the profiles of the result.
Sourcepub fn columns(&self) -> &[CompositionGrid]
pub fn columns(&self) -> &[CompositionGrid]
The current columns.
Sourcepub fn profile_weights(&self) -> &[f64]
pub fn profile_weights(&self) -> &[f64]
Relative fluence per column (0 where not illuminated).
Sourcepub fn ions_total_per_column(&self) -> u64
pub fn ions_total_per_column(&self) -> u64
Primaries per column of the whole run.
Sourcepub fn fluence_done_m2(&self) -> f64
pub fn fluence_done_m2(&self) -> f64
Peak fluence delivered so far, 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 and columns.
Sourcepub fn redeposited_fraction(&self) -> f64
pub fn redeposited_fraction(&self) -> f64
Redeposited over sputtered atoms, over the whole run so far.
Sourcepub fn incidence_rad(&self) -> Vec<f64>
pub fn incidence_rad(&self) -> Vec<f64>
Beam incidence angle from the local surface normal per column, radians (the local-angle rule of the module docs) for the current surface.
Sourcepub fn step(&mut self) -> Result<Option<Step2d>, DynamicRunError>
pub fn step(&mut self) -> Result<Option<Step2d>, DynamicRunError>
Run the next step. Ok(None) when all primaries are used. On error the
run state is unchanged.
Sourcepub fn run_all(
&mut self,
on_step: impl FnMut(&Step2d, &[CompositionGrid]),
) -> Result<(), DynamicRunError>
pub fn run_all( &mut self, on_step: impl FnMut(&Step2d, &[CompositionGrid]), ) -> Result<(), DynamicRunError>
Run all remaining steps, calling on_step after each accepted step.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DynamicRun2d<'a>
impl<'a> !UnwindSafe for DynamicRun2d<'a>
impl<'a> Freeze for DynamicRun2d<'a>
impl<'a> Send for DynamicRun2d<'a>
impl<'a> Sync for DynamicRun2d<'a>
impl<'a> Unpin for DynamicRun2d<'a>
impl<'a> UnsafeUnpin for DynamicRun2d<'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