pub enum Relaxation {
IdealMixing {
atomic_volumes_m3: BTreeMap<u8, f64>,
},
FixedNumberDensity {
number_density_m3: f64,
},
}Expand description
Volume-relaxation convention. See the module docs.
Variants§
IdealMixing
Ideal mixing of atomic volumes, thickness = sum A_i v_i.
FixedNumberDensity
Caller-specified total atom number density, thickness = sum A_i / n.
Implementations§
Source§impl Relaxation
impl Relaxation
Sourcepub fn ideal_mixing(volumes: &[(u8, f64)]) -> Result<Self, DynamicError>
pub fn ideal_mixing(volumes: &[(u8, f64)]) -> Result<Self, DynamicError>
Ideal mixing with explicit volumes (m³/atom) per atomic number.
Sourcepub fn ideal_mixing_elemental(zs: &[u8]) -> Result<Self, DynamicError>
pub fn ideal_mixing_elemental(zs: &[u8]) -> Result<Self, DynamicError>
Ideal mixing with each listed element at its elemental solid volume
(atomic_volume_from_density).
Sourcepub fn fixed_number_density(
number_density_m3: f64,
) -> Result<Self, DynamicError>
pub fn fixed_number_density( number_density_m3: f64, ) -> Result<Self, DynamicError>
Fixed total number density, atoms/m³.
Trait Implementations§
Source§impl Clone for Relaxation
impl Clone for Relaxation
Source§fn clone(&self) -> Relaxation
fn clone(&self) -> Relaxation
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 moreSource§impl Debug for Relaxation
impl Debug for Relaxation
Source§impl PartialEq for Relaxation
impl PartialEq for Relaxation
impl StructuralPartialEq for Relaxation
Auto Trait Implementations§
impl Freeze for Relaxation
impl RefUnwindSafe for Relaxation
impl Send for Relaxation
impl Sync for Relaxation
impl Unpin for Relaxation
impl UnsafeUnpin for Relaxation
impl UnwindSafe for Relaxation
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