Skip to content

Commit

Permalink
Update src/particles/diagnostics/EmittanceInvariants.cpp
Browse files Browse the repository at this point in the history
Use amrex::abs
  • Loading branch information
cemitch99 authored Sep 19, 2024
1 parent 2ee73f4 commit 96818f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/particles/diagnostics/EmittanceInvariants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ namespace impactx::diagnostics
// order ex,ey,et in the limit of uncoupled transport.
// The order below is important and has been checked.
roots = CubicRootsTrig(a,b,c,d);
amrex::ParticleReal e1 = sqrt(abs(std::get<1>(roots)));
amrex::ParticleReal e2 = sqrt(abs(std::get<2>(roots)));
amrex::ParticleReal e3 = sqrt(abs(std::get<0>(roots)));
amrex::ParticleReal e1 = sqrt(amrex::abs(std::get<1>(roots)));
amrex::ParticleReal e2 = sqrt(amrex::abs(std::get<2>(roots)));
amrex::ParticleReal e3 = sqrt(amrex::abs(std::get<0>(roots)));

emittances = std::make_tuple(e1,e2,e3);
return emittances;
Expand Down

0 comments on commit 96818f2

Please sign in to comment.