Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maxence Thévenet <maxence.thevenet@desy.de>
  • Loading branch information
huixingjian and MaxThevenet authored Feb 16, 2024
1 parent 6c3e2e3 commit 01410f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/laser/Laser.H
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public:
std::string m_name {""};
amrex::Real m_a0 {0.}; /**< Laser peak normalized amplitude */
amrex::Real m_w0 {0.}; /**< Laser waist */
amrex::Real m_propagation_angle_yz {0.};/**< Propagation angle of the pulse in the yz plane (0 is the along the z axis) */
/** Propagation angle of the pulse in the yz plane (0 is the along the z axis) */
amrex::Real m_propagation_angle_yz {0.};
amrex::Real m_L0 {0.}; /**< Laser length (HW 1/e in amplitude) */
amrex::Real m_tau {0.}; /**< Laser duration (HW 1/e in amplitude) */
/** Focal distance of the laser pulse */
Expand Down
3 changes: 2 additions & 1 deletion src/laser/MultiLaser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ MultiLaser::InitLaserSlice (const amrex::Geometry& geom, const int islice, const
const amrex::Real z = plo[2] + (islice+0.5_rt)*dx_arr[2] - z0;
const amrex::Real x = (i+0.5_rt)*dx_arr[0]+plo[0]-x0;
const amrex::Real y = (j+0.5_rt)*dx_arr[1]+plo[1]-y0;
const amrex::Real yp=std::cos(propagation_angle_yz)*y+std::sin(propagation_angle_yz)*z; // Coordinate rotation in yz plane for a laser propagating at an angle.
// Coordinate rotation in yz plane for a laser propagating at an angle.
const amrex::Real yp=std::cos(propagation_angle_yz)*y+std::sin(propagation_angle_yz)*z;
const amrex::Real zp=-std::sin(propagation_angle_yz)*y+std::cos(propagation_angle_yz)*z;
// For first laser, setval to 0.
if (ilaser == 0) {
Expand Down

0 comments on commit 01410f8

Please sign in to comment.