Skip to content

Commit

Permalink
moving inv_c2 define line for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinRayAngus committed Aug 28, 2024
1 parent 6823a30 commit c4f48a0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ void UpdateMomentumPerezElastic (
T_R const dt, amrex::RandomEngine const& engine )
{

// Compute Lorentz factor gamma
T_PR constexpr inv_c2 = T_PR(1.0) / ( PhysConst::c * PhysConst::c );

// Compute Lorentz factor gamma
T_PR const gb1sq = (u1x*u1x + u1y*u1y + u1z*u1z)*inv_c2;
T_PR const gb2sq = (u2x*u2x + u2y*u2y + u2z*u2z)*inv_c2;
T_PR const g1 = std::sqrt( T_PR(1.0) + gb1sq );
Expand Down

0 comments on commit c4f48a0

Please sign in to comment.