diff --git a/src/particles/diagnostics/CovarianceMatrixMath.H b/src/particles/diagnostics/CovarianceMatrixMath.H index 4fec87eb0..2e832874e 100644 --- a/src/particles/diagnostics/CovarianceMatrixMath.H +++ b/src/particles/diagnostics/CovarianceMatrixMath.H @@ -52,7 +52,7 @@ namespace impactx::diagnostics amrex::ParticleReal theta = 0.0_prt; // Discriminant should be < 0. Otherwise, keep theta at default and throw an error. - if(discriminant > 0.0_prt){ + if(discriminant > 0.0_prt){ std::cout << "Polynomial in CubicRoots has one or more complex roots." << "\n"; } else { theta = acos(R/sqrt(-pow(Q,3))); @@ -66,13 +66,13 @@ namespace impactx::diagnostics std::cout << "Discriminant, Q, R " << discriminant << " " << Q << " " << R << "\n"; std::cout << "Return x1, x2, x3 " << x1 << " " << x2 << " " << x3 << "\n"; - roots = std::make_tuple(x1,x2,x3); + roots = std::make_tuple(x1,x2,x3); return roots; } /** Function to take the trace of a square 6x6 matrix. - * + * * @param[in] matrix A * @returns the trace of A */ @@ -81,11 +81,11 @@ namespace impactx::diagnostics amrex::Array2D A ) { - int const dim = 6; + int const dim = 6; amrex::ParticleReal trA = 0.0; for (int i = 1; i < dim+1; i++) { - trA += A(i,i); + trA += A(i,i); } return trA; } @@ -115,9 +115,9 @@ namespace impactx::diagnostics } } - + } - return C; + return C; } diff --git a/src/particles/diagnostics/EmittanceInvariants.cpp b/src/particles/diagnostics/EmittanceInvariants.cpp index 3f6db3725..831a8b39f 100644 --- a/src/particles/diagnostics/EmittanceInvariants.cpp +++ b/src/particles/diagnostics/EmittanceInvariants.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -22,7 +22,7 @@ namespace impactx::diagnostics { /** This function returns the three independent kinetic invariants - * denoted I2, I4, and I6 as constructed from the 6x6 + * denoted I2, I4, and I6 as constructed from the 6x6 * beam covariance matrix. These three quantities are invariant * under any linear symplectic transport map, and are used in the * calculation of the three eigenemittances. @@ -51,8 +51,8 @@ namespace impactx::diagnostics amrex::Array2D S4; amrex::Array2D S6; - // Construct the matrix S1 = Sigma*J. This is a - // permutation of the columns of Sigma with + // Construct the matrix S1 = Sigma*J. This is a + // permutation of the columns of Sigma with // a change of sign. for (int i = 1; i < 7; i++) { for (int j = 1; j < 7; j++) { @@ -69,7 +69,7 @@ namespace impactx::diagnostics S2 = impactx::diagnostics::MultiplyMat(S1,S1); S4 = impactx::diagnostics::MultiplyMat(S2,S2); S6 = impactx::diagnostics::MultiplyMat(S2,S4); - + // Define the three kinematic invariants (should be nonnegative). I2 = -impactx::diagnostics::TraceMat(S2)/2.0_prt; I4 = +impactx::diagnostics::TraceMat(S4)/2.0_prt; @@ -130,6 +130,6 @@ namespace impactx::diagnostics emittances = std::make_tuple(e1,e2,e3); return emittances; } - + } // namespace impactx::diagnostics