pub enum PennInelastic {
SinglePole(SinglePolePenn),
Full(FullPenn),
Mermin(MerminPenn),
}Expand description
One of the three models, built from one material’s optical ELF.
Variants§
SinglePole(SinglePolePenn)
The single-pole model.
Full(FullPenn)
The full model.
Mermin(MerminPenn)
The Mermin-ELF model (a fit of oscillators).
Implementations§
Source§impl PennInelastic
impl PennInelastic
Sourcepub fn new(algorithm: PennAlgorithm, elf: OpticalElf) -> Self
pub fn new(algorithm: PennAlgorithm, elf: OpticalElf) -> Self
The model of algorithm for elf (Fermi energy zero, default
tolerance). For PennAlgorithm::Mermin the oscillators are fitted
with MerminFitOptions::default; use Self::try_new to handle a
failed fit, or Self::mermin to choose the fit options.
§Panics
Only for PennAlgorithm::Mermin, if the default fit fails (an ELF
table too short for three oscillators, or an ELF that is zero).
Sourcepub fn try_new(
algorithm: PennAlgorithm,
elf: OpticalElf,
) -> Result<Self, ElectronDataError>
pub fn try_new( algorithm: PennAlgorithm, elf: OpticalElf, ) -> Result<Self, ElectronDataError>
As Self::new, returning the error of a failed Mermin fit.
Sourcepub fn mermin(
elf: OpticalElf,
options: &MerminFitOptions,
) -> Result<Self, ElectronDataError>
pub fn mermin( elf: OpticalElf, options: &MerminFitOptions, ) -> Result<Self, ElectronDataError>
The Mermin-ELF model with oscillators fitted to elf with options.
Sourcepub fn algorithm(&self) -> PennAlgorithm
pub fn algorithm(&self) -> PennAlgorithm
Which algorithm this is.
Sourcepub fn optical_elf(&self) -> &OpticalElf
pub fn optical_elf(&self) -> &OpticalElf
The optical ELF the model is built from.
Sourcepub fn with_fermi_energy_ev(
self,
fermi_ev: f64,
) -> Result<Self, ElectronDataError>
pub fn with_fermi_energy_ev( self, fermi_ev: f64, ) -> Result<Self, ElectronDataError>
Set the Fermi energy, eV (see the two models).
Sourcepub fn fermi_energy_ev(&self) -> f64
pub fn fermi_energy_ev(&self) -> f64
The Fermi energy, eV (see the two models).
Sourcepub fn model_identity(&self) -> String
pub fn model_identity(&self) -> String
The identity string to record as the model of derived tables:
the algorithm label, the nonrelativistic kinematics, the Fermi energy
and the integration tolerance, e.g.
penn-full; nonrelativistic; E_F = 0 eV; rel tol 1e-4. For the Mermin
model the fitted oscillators follow the label (their parameters
decide the table), e.g. mermin-melf (3 oscillators (A=...)).
Sourcepub fn diimfp_per_m_ev(
&self,
energy_ev: f64,
loss_ev: f64,
) -> Result<f64, ElectronDataError>
pub fn diimfp_per_m_ev( &self, energy_ev: f64, loss_ev: f64, ) -> Result<f64, ElectronDataError>
The DIIMFP, m⁻¹ eV⁻¹ (see the two models).
Sourcepub fn imfp_and_stopping(
&self,
energy_ev: f64,
) -> Result<InelasticPoint, ElectronDataError>
pub fn imfp_and_stopping( &self, energy_ev: f64, ) -> Result<InelasticPoint, ElectronDataError>
The inverse IMFP and the stopping power at energy_ev.
Sourcepub fn tabulate(
&self,
energies_ev: &[f64],
) -> Result<Vec<InelasticPoint>, ElectronDataError>
pub fn tabulate( &self, energies_ev: &[f64], ) -> Result<Vec<InelasticPoint>, ElectronDataError>
IMFP and stopping power on a grid of energies.
Trait Implementations§
Source§impl Clone for PennInelastic
impl Clone for PennInelastic
Source§fn clone(&self) -> PennInelastic
fn clone(&self) -> PennInelastic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PennInelastic
impl RefUnwindSafe for PennInelastic
impl Send for PennInelastic
impl Sync for PennInelastic
impl Unpin for PennInelastic
impl UnsafeUnpin for PennInelastic
impl UnwindSafe for PennInelastic
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> 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> ⓘ
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