Skip to main content

ElectronicStopping

Trait ElectronicStopping 

Source
pub trait ElectronicStopping {
    // Required methods
    fn name(&self) -> &'static str;
    fn stopping(
        &self,
        ion: &Ion,
        target_z: u8,
        energy_ev: f64,
    ) -> Result<f64, StoppingError>;
    fn validity(&self, ion: &Ion) -> ValidityRange;

    // Provided method
    fn sqrt_energy_coefficient(&self, _ion: &Ion, _target_z: u8) -> Option<f64> { ... }
}
Expand description

An electronic stopping model.

Required Methods§

Source

fn name(&self) -> &'static str

Short stable model name (used in output metadata).

Source

fn stopping( &self, ion: &Ion, target_z: u8, energy_ev: f64, ) -> Result<f64, StoppingError>

Stopping cross section per atom of element target_z, J m².

Source

fn validity(&self, ion: &Ion) -> ValidityRange

Advisory validity range for this ion.

Provided Methods§

Source

fn sqrt_energy_coefficient(&self, _ion: &Ion, _target_z: u8) -> Option<f64>

If this model is exactly S(E) = c sqrt(E) for this ion and target (the velocity-proportional Lindhard-Scharff form), return c in J m² eV^(-1/2); None (the default) otherwise.

A model that returns Some(c) promises that stopping succeeds for every finite positive energy and equals c sqrt(E) to rounding. A caller that evaluates the model many times for one ion and target (the collision loop) can then compute c, which involves several fractional powers, once. Return None whenever stopping could fail, so the error is still reported at evaluation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§