INNER CODE UNIT · Rust

calculate_for

TeamAtomECS/AtomECS · src/dipole/mod.rs:53

    pub fn calculate_for(
        dipole_beam_wavelength: f64,
        optical_transition_wavelength: f64,
        optical_transition_linewidth: f64,
    ) -> Polarizability {
        let transition_f = constant::C / optical_transition_wavelength;
        let dipole_f = constant::C / dipole_beam_wavelength;
        let prefactor = -3. * constant::PI * constant::C.powf(2.0)
            / (2. * (2. * constant::PI * transition_f).powf(3.0))
            * optical_transition_linewidth
            * -(1. / (transition_f - dipole_f) + 1. / (transition_f + dipole_f));
        Polarizability { prefactor }
    }
}

/// A system that attaches `DipoleLightIndex` components to entities which have `DipoleLight` but no index.
pub struct AttachIndexToDipoleLightSystem;
impl<'a> System<'a> for AttachIndexToDipoleLightSystem {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…