Skip to content

Commit

Permalink
Use amrex:: math for complex functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
cemitch99 authored Sep 26, 2024
1 parent 59f5b4d commit 53024fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/particles/diagnostics/CovarianceMatrixMath.H
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace impactx::diagnostics
Complex Qc(Q,0.0_prt);
Complex Rc(R,0.0_prt);
Complex Dc(discriminant,0.0_prt);
Complex C = pow(-Rc + sqrt(Dc),1.0/3.0);
Complex C = amrex::pow(-Rc + amrex::sqrt(Dc),1.0/3.0);

// Define a cubic root of unity xi
amrex::ParticleReal xire = -1.0/2.0;
Expand All @@ -142,7 +142,7 @@ namespace impactx::diagnostics

Complex z1 = Qc/C - C;
Complex z2 = Qc/(xi*C) - xi*C;
Complex z3 = Qc/(pow(xi,2)*C) - pow(xi,2)*C;
Complex z3 = Qc/(amrex::pow(xi,2)*C) - amrex::pow(xi,2)*C;
x1 = z2.m_real - b/(3.0*a);
x2 = z1.m_real - b/(3.0*a);
x3 = z3.m_real - b/(3.0*a);
Expand Down

0 comments on commit 53024fa

Please sign in to comment.