Skip to main content

TableCoverageTally

Struct TableCoverageTally 

Source
pub struct TableCoverageTally { /* private fields */ }
Expand description

Counts the rate evaluations of every table of a run against its grid (see the module docs). Usable on its own as an ElectronTally; crate::tally::FullElectronTally carries one and puts its TableCoverageTally::layers in ElectronReport::table_coverage.

Implementations§

Source§

impl TableCoverageTally

Source

pub fn new<G: Geometry>(transport: &Transport<G>) -> Self

Empty counts for the tables of transport, one entry per layer.

Source

pub fn layers(&self) -> &[LayerTableCoverage]

The counts, by layer.

Source

pub fn record( &mut self, layer: usize, channel: TableChannel, coverage: GridCoverage, )

Count one evaluation.

Source

pub fn merge_from(&mut self, o: &Self)

Add o’s counts (a later chunk) to these.

§Panics

If o was built for tables with a different number of layers or different grid bounds.

Trait Implementations§

Source§

impl Clone for TableCoverageTally

Source§

fn clone(&self) -> TableCoverageTally

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TableCoverageTally

Source§

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

Formats the value using the given formatter. Read more
Source§

impl ElectronTally for TableCoverageTally

Source§

fn table_lookup( &mut self, at: &ElectronState, channel: TableChannel, coverage: GridCoverage, )

The rate of channel’s table in layer at.layer was evaluated at at.energy_ev, which lies coverage against that table’s grid. Read more
Source§

fn merge(&mut self, other: Self)

Fold other (a later chunk) into self.
Source§

fn begin_history(&mut self, _index: u64, _start: &ElectronState)

A primary history starts. With BoundaryModel::StepBarrier, start is the primary in vacuum, before it meets the front face.
Source§

fn step(&mut self, _from: [f64; 3], _end: &ElectronState, _length_m: f64)

A flight segment of length_m ended at end.pos (at a collision, a layer face or the target face). It started at from with energy end.energy_ev (the energy does not change in flight).
Source§

fn elastic(&mut self, _after: &ElectronState, _theta: f64)

An elastic collision deflected the electron by theta rad.
Source§

fn inelastic(&mut self, _after: &ElectronState, _w_ev: f64)

An inelastic collision took w_ev from the electron. after carries the new direction if the secondary model deflected it.
Source§

fn inner_shell( &mut self, _after: &ElectronState, _shell: &InnerShell, _w_ev: f64, )

Called right after ElectronTally::inelastic for every inelastic event drawn from an inner-shell channel (Transport::with_inner_shells), with or without a secondary model: the shell (its element, subshell and binding energy) and the loss w_ev (the same as passed to ElectronTally::inelastic). Not called for valence events. Comes before ElectronTally::secondary.
Source§

fn secondary( &mut self, _primary: &ElectronState, _event: &SecondaryEvent, _created: Option<&ElectronState>, )

Called right after ElectronTally::inelastic (and ElectronTally::inner_shell, for a shell event) for every inelastic event when a SecondaryModel is on: the event’s energy bookkeeping, and the secondary that was created (None if none was). The secondary is transported later, between ElectronTally::begin_secondary and ElectronTally::end_secondary.
Source§

fn phonon( &mut self, _after: &ElectronState, _kind: PhononEvent, _hbar_omega_ev: f64, _theta: f64, )

A Fröhlich LO-phonon event changed the energy by -ħω (emission) or +ħω (absorption), hbar_omega_ev given, and deflected the electron by theta rad. after is the state after the event.
Source§

fn polaron_trapped(&mut self, _at: &ElectronState)

The electron was trapped as a polaron at at and deposits its whole remaining energy at.energy_ev there. The history (or the secondary) then ends with Fate::PolaronTrapped (no ElectronTally::stopped call).
Source§

fn interface( &mut self, _at: &ElectronState, _from_layer: usize, _to_layer: usize, )

The electron crossed from layer from_layer into to_layer; at is its state on the face, inside the new layer (after refraction, with BoundaryModel::StepBarrier).
Source§

fn barrier( &mut self, _at: &ElectronState, _boundary: Boundary, _delta_u_ev: f64, )

With BoundaryModel::StepBarrier: the electron got through the face boundary, and its kinetic energy changed by delta_u_ev (the step U' - U). at is its state just past the face (in vacuum, for a surface). Comes before ElectronTally::interface or ElectronTally::escaped.
Source§

fn reflected(&mut self, _at: &ElectronState, _boundary: Boundary)

With BoundaryModel::StepBarrier: the electron was reflected at the face boundary; at is its state after the reflection. At the primary’s entry this is followed by ElectronTally::escaped.
Source§

fn begin_secondary(&mut self, _start: &ElectronState, _generation: u32)

A secondary of the given generation (1 for a secondary of the primary, 2 for one of a secondary, …) starts at start.
Source§

fn end_secondary(&mut self, _fate: Fate)

The current secondary ended with fate.
Source§

fn stopped(&mut self, _at: &ElectronState)

The electron fell below the stopping threshold (or was trapped) at at. A stop has at.energy_ev below the threshold of at.layer, a trapped electron at least that energy (Transport::stopping_thresholds_ev).
Source§

fn escaped(&mut self, _at: &ElectronState, _face: Face)

The electron left the target through face; at.energy_ev is the energy it leaves with (its vacuum energy, with the step barrier).
Source§

fn absorbed(&mut self, _at: &ElectronState)

The electron was absorbed at the back face (EscapeRule::FrontOnly).
Source§

fn end_history(&mut self, _index: u64, _fate: Fate)

The history ended (its last secondary included); fate is the primary’s.
Source§

impl PartialEq for TableCoverageTally

Source§

fn eq(&self, other: &TableCoverageTally) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TableCoverageTally

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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