pub struct VoxelTally { /* private fields */ }Expand description
A sparse voxel tally; see the module docs.
Implementations§
Source§impl VoxelTally
impl VoxelTally
Sourcepub fn new(grid: VoxelTallyGrid) -> Self
pub fn new(grid: VoxelTallyGrid) -> Self
An empty tally on grid.
Sourcepub fn with_species(self, species_z: &[u8]) -> Self
pub fn with_species(self, species_z: &[u8]) -> Self
Also tally vacancies, interstitials and replacements per species.
species_z is crate::ion::bca::Bca::species_z of the run: entry
s is the atomic number of species index s.
Sourcepub fn grid(&self) -> &VoxelTallyGrid
pub fn grid(&self) -> &VoxelTallyGrid
The grid this tally bins on.
Sourcepub fn report(&self) -> VoxelReport
pub fn report(&self) -> VoxelReport
The merged tally as plain data: occupied voxels in flat-index order.
Trait Implementations§
Source§impl BcaTally for VoxelTally
impl BcaTally for VoxelTally
Source§fn electronic(
&mut self,
p: &Particle,
from: [f64; 3],
channel: ElectronicChannel,
energy_ev: f64,
)
fn electronic( &mut self, p: &Particle, from: [f64; 3], channel: ElectronicChannel, energy_ev: f64, )
Electronic loss of
energy_ev. For ElectronicChannel::NonLocal
it was spread along the straight segment from from to p.pos; for
ElectronicChannel::Local it was deposited at p.pos.Source§fn begin_history(&mut self, _index: u64)
fn begin_history(&mut self, _index: u64)
A primary history starts.
Source§fn lattice(
&mut self,
at: [f64; 3],
_layer: usize,
kind: LatticeDeposit,
energy_ev: f64,
)
fn lattice( &mut self, at: [f64; 3], _layer: usize, kind: LatticeDeposit, energy_ev: f64, )
Nuclear energy
energy_ev left in the lattice at at in region
layer (the layer index of a stack, the flat voxel index of a voxel
grid).Source§fn recoil(&mut self, r: &Particle)
fn recoil(&mut self, r: &Particle)
A target atom was displaced (transfer above
E_d); recoil is its
state at creation, before it is followed (or stopped, if below the
recoil cutoff or if cascades are off).Source§fn stopped(&mut self, p: &Particle)
fn stopped(&mut self, p: &Particle)
A particle came to rest at
p.pos with kinetic energy p.energy_ev.Source§fn escaped(&mut self, _p: &Particle, _face: Face)
fn escaped(&mut self, _p: &Particle, _face: Face)
A particle left the target through
face; p is its state outside
(after refraction by the surface barrier).Source§fn end_history(&mut self, _index: u64, _budget: &EnergyBudget)
fn end_history(&mut self, _index: u64, _budget: &EnergyBudget)
A primary history ended;
budget is its energy bookkeeping.Source§fn partner(&mut self, _p: &Particle, _impact_parameter_m: f64, _partners: usize)
fn partner(&mut self, _p: &Particle, _impact_parameter_m: f64, _partners: usize)
A collision partner of
p, reported before the collision changes
p (so p is the incoming state, unlike in the other hooks):
impact_parameter_m is the distance from the partner to the incoming
straight path, and partners the number of partners of this collision
step, each of which is reported by its own call. The amorphous model
reports its hard collision and each weak collision as a step of one
partner; the crystal flight model reports every simultaneous partner
of a step with the same partners.Source§impl Clone for VoxelTally
impl Clone for VoxelTally
Source§fn clone(&self) -> VoxelTally
fn clone(&self) -> VoxelTally
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VoxelTally
impl RefUnwindSafe for VoxelTally
impl Send for VoxelTally
impl Sync for VoxelTally
impl Unpin for VoxelTally
impl UnsafeUnpin for VoxelTally
impl UnwindSafe for VoxelTally
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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 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> ⓘ
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