Skip to content

Commit

Permalink
[mini] Fix stretch factor in Gaussian initialisation w/ spatial and a…
Browse files Browse the repository at this point in the history
…ngular chirps (ECP-WarpX#5494)

It seems to me that PR ECP-WarpX#2173
changed the actual terms of laser initialization in the presence of
chirps. This PR proposes to revert back to the previous behavior, which
I think is more correct. In this way, I think the advantage of
ECP-WarpX#2173 regarding single-precision
are preserved.
  • Loading branch information
MaxThevenet authored Jan 28, 2025
1 parent 65c4a3a commit 355d7be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ WarpXLaserProfiles::GaussianLaserProfile::fill_amplitude (
// Time stretching due to STCs and phi2 complex envelope
// (1 if zeta=0, beta=0, phi2=0)
const Complex stretch_factor = 1._rt + 4._rt *
(m_params.zeta+m_params.beta*m_params.focal_distance*inv_tau2)
* (m_params.zeta+m_params.beta*m_params.focal_distance*inv_complex_waist_2)
((m_params.zeta+m_params.beta*m_params.focal_distance)*inv_tau2)
* ((m_params.zeta+m_params.beta*m_params.focal_distance)*inv_complex_waist_2)
+ 2._rt*I*(m_params.phi2-m_params.beta*m_params.beta*k0*m_params.focal_distance)*inv_tau2;

// Amplitude and monochromatic oscillations
Expand Down

0 comments on commit 355d7be

Please sign in to comment.