Skip to content

Commit

Permalink
Update CovarianceMatrixMath.H
Browse files Browse the repository at this point in the history
Avoid subtracting complex and double types.
  • Loading branch information
cemitch99 authored Sep 16, 2024
1 parent f22eaae commit e4a9421
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/particles/diagnostics/CovarianceMatrixMath.H
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ namespace impactx::diagnostics

} else {

Complex z1 = Q/C - C - b/(3.0*a);
Complex z2 = Q/(xi*C) - xi*C - b/(3.0*a);
Complex z3 = Q/(pow(xi,2)*C) - pow(xi,2)*C - b/(3.0*a);
x1 = z2.m_real;
x2 = z1.m_real;
x3 = z3.m_real;
Complex z1 = Qc/C - C;
Complex z2 = Qc/(xi*C) - xi*C;
Complex z3 = Qc/(pow(xi,2)*C) - 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);
}

//std::cout << "Discriminant, Q, R " << discriminant << " " << Q << " " << R << "\n";
Expand Down

0 comments on commit e4a9421

Please sign in to comment.