From 2422be92e705470540a0a3a61c8521a91694dae7 Mon Sep 17 00:00:00 2001 From: "Eya D." <81635404+EyaDammak@users.noreply.github.com> Date: Fri, 14 Feb 2025 13:11:14 +0100 Subject: [PATCH] Update src/particles/plasma/PlasmaParticleContainer.cpp Co-authored-by: Alexander Sinn <64009254+AlexanderSinn@users.noreply.github.com> --- src/particles/plasma/PlasmaParticleContainer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index 88f0cfcdea..6224192852 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -675,10 +675,11 @@ LaserIonization (const int islice, Ep *= E0; amrex::Real delta = std::sqrt(Ep) * laser_dp_prefactor[ion_lev_loc]; amrex::Real delta2 = delta * delta; - amrex::Real width_p = amrex::abs(A) * delta * (1 - (3./4.) * delta2 - (3./2.) * delta2 + laser_dp_second_prefactor[ion_lev_loc] * delta2); + amrex::Real width_p = amrex::abs(A) * delta * (1._rt - (3._rt/4._rt) * delta2 + - (3._rt/2._rt) * delta2 + laser_dp_second_prefactor[ion_lev_loc] * delta2); amrex::Real p_pol = amrex::RandomNormal(0.0, width_p, engine); ux = p_pol; // linear polarization is assumed along x. - uz = (amrex::abs(A * A) / 4._rt + p_pol * p_pol / 2._rt); + uz = (amrex::abs(A * A) * 0.25_rt + p_pol * p_pol * 0.5_rt); } else { amrex::Real const angle = amrex::Random(engine) * 2._rt * MathConst::pi; // A_t = A (e_x +/- i e_y) in circular polarization.