Skip to content

Commit

Permalink
Leftover
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l authored Sep 26, 2024
1 parent 38c51e7 commit 2930f94
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/particles/elements/ChrUniformAcc.H
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ namespace impactx
x = std::cos(theta)*xout + std::sin(theta)*yout;
pxout = std::cos(theta)*px + std::sin(theta)*py;

y = -sin(theta)*xout + std::cos(theta)*yout;
pyout = -sin(theta)*px + std::cos(theta)*py;
y = -std::sin(theta)*xout + std::cos(theta)*yout;
pyout = -std::sin(theta)*px + std::cos(theta)*py;

t = tout;
ptout = pt;
Expand Down
2 changes: 1 addition & 1 deletion src/particles/elements/ExactDrift.H
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ namespace impactx

// compute the radical in the denominator (= pz):
amrex::ParticleReal const pzden = std::sqrt(std::pow(pt-1_prt/bet,2) -
1_prt/pow(betgam,2) - std::pow(px,2) - std::pow(py,2));
1_prt / std::pow(betgam,2) - std::pow(px,2) - std::pow(py,2));

// advance position and momentum (exact drift)
x = xout + slice_ds * px / pzden;
Expand Down
2 changes: 1 addition & 1 deletion src/particles/elements/ExactSbend.H
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace impactx

// assign intermediate quantities
amrex::ParticleReal const pperp = std::sqrt(std::pow(pt,2)-2.0_prt/bet*pt-pow(py,2)+1.0_prt);
amrex::ParticleReal const pzi = std::sqrt(std::pow(pperp,2)-pow(px,2));
amrex::ParticleReal const pzi = std::sqrt(std::pow(pperp,2) - std::pow(px,2));
amrex::ParticleReal const rho = rc + xout;
auto const [sin_phi, cos_phi] = amrex::Math::sincos(slice_phi);

Expand Down
2 changes: 1 addition & 1 deletion src/particles/elements/Sol.H
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace impactx
amrex::ParticleReal const slice_ds = m_ds / nslice();

// assign intermediate parameter
amrex::ParticleReal const step = slice_ds /std::sqrt(std::pow(pt,2)-1.0_prt);
amrex::ParticleReal const step = slice_ds / std::sqrt(std::pow(pt,2) - 1.0_prt);

// advance position and momentum (straight element)
refpart.x = x + step*px;
Expand Down

0 comments on commit 2930f94

Please sign in to comment.