Skip to main content

DynamicRun2d

Struct DynamicRun2d 

Source
pub struct DynamicRun2d<'a> { /* private fields */ }
Expand description

A fluence-stepped 2-D run. See the module documentation.

Implementations§

Source§

impl<'a> DynamicRun2d<'a>

Source

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.

Source

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.

Source

pub fn snapshots(&self) -> &[ProfileSnapshot]

Snapshots taken so far at the requested fluences, in order.

Source

pub fn profile_snapshot(&self) -> Option<ProfileSnapshot>

The profiles at the current fluence (None unless with_profiles was called).

Source

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.

Source

pub fn columns(&self) -> &[CompositionGrid]

The current columns.

Source

pub fn surface_m(&self) -> &[f64]

Surface position per column: cumulative recession, m.

Source

pub fn profile_weights(&self) -> &[f64]

Relative fluence per column (0 where not illuminated).

Source

pub fn ions_total_per_column(&self) -> u64

Primaries per column of the whole run.

Source

pub fn ions_done(&self) -> u64

Primaries per column used so far.

Source

pub fn fluence_done_m2(&self) -> f64

Peak fluence delivered so far, ions/m².

Source

pub fn steps_done(&self) -> u64

Accepted steps so far.

Source

pub fn cumulative(&self) -> &Yields

Event counts summed over the accepted steps and columns.

Source

pub fn redeposited_fraction(&self) -> f64

Redeposited over sputtered atoms, over the whole run so far.

Source

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.

Source

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.

Source

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§

Source§

impl Debug for DynamicRun2d<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V