diff options
author | 2020-07-17 15:59:43 -0700 | |
---|---|---|
committer | 2020-07-17 15:59:43 -0700 | |
commit | 3ccc2ada05fa039a1788ed11741ea8729d05f539 (patch) | |
tree | 36ae731d7d32b9d5c314bf35f819b0def7d3997d /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp | |
parent | fae4146844066e335729763d44b9ea00c4078d9c (diff) | |
download | WarpX-3ccc2ada05fa039a1788ed11741ea8729d05f539.tar.gz WarpX-3ccc2ada05fa039a1788ed11741ea8729d05f539.tar.zst WarpX-3ccc2ada05fa039a1788ed11741ea8729d05f539.zip |
Fixing compiler warnings (#1178)
* Removed unused variables and made 'vy=v_galilean[1]' declaration conditional on 3D case (this fixes compiler warnings)
* Avoid unnecessary conversion from 'double' to 'int' (this fixes compiler warnings)
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp index 1ddcd6758..d9db745f1 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/AvgGalileanAlgorithm.cpp @@ -30,7 +30,6 @@ AvgGalileanAlgorithm::AvgGalileanAlgorithm(const SpectralKSpace& spectral_kspace Psi2_coef = SpectralComplexCoefficients(ba, dm, 1, 0); Psi3_coef = SpectralComplexCoefficients(ba, dm, 1, 0); - X1_coef = SpectralComplexCoefficients(ba, dm, 1, 0); X2_coef = SpectralComplexCoefficients(ba, dm, 1, 0); X3_coef = SpectralComplexCoefficients(ba, dm, 1, 0); @@ -91,9 +90,10 @@ void AvgGalileanAlgorithm::InitializeSpectralCoefficients( Array4<Complex> CRhonew = Rhonew_coef[mfi].array(); Array4<Complex> Jcoef = Jcoef_coef[mfi].array(); // Extract reals (for portability on GPU) - Real vx = v_galilean[0]; +#if (AMREX_SPACEDIM==3) Real vy = v_galilean[1]; +#endif Real vz = v_galilean[2]; // Loop over indices within one box @@ -250,11 +250,6 @@ AvgGalileanAlgorithm::pushSpectralFields(SpectralFieldData& f) const{ Array4<const Complex> Psi1_arr = Psi1_coef[mfi].array(); Array4<const Complex> Psi2_arr = Psi2_coef[mfi].array(); Array4<const Complex> Psi3_arr = Psi3_coef[mfi].array(); - Array4<const Real> C1_arr = C1_coef[mfi].array(); - Array4<const Real> S1_arr = S1_coef[mfi].array(); - Array4<const Real> C3_arr = C3_coef[mfi].array(); - Array4<const Real> S3_arr = S3_coef[mfi].array(); - Array4<const Complex> A1_arr = A1_coef[mfi].array(); Array4<const Complex> A2_arr = A2_coef[mfi].array(); @@ -305,7 +300,6 @@ AvgGalileanAlgorithm::pushSpectralFields(SpectralFieldData& f) const{ constexpr Real ky = 0; const Real kz = modified_kz_arr[j]; #endif - constexpr Real c = PhysConst::c; constexpr Real c2 = PhysConst::c*PhysConst::c; constexpr Real inv_ep0 = 1._rt/PhysConst::ep0; constexpr Complex I = Complex{0,1}; @@ -313,11 +307,6 @@ AvgGalileanAlgorithm::pushSpectralFields(SpectralFieldData& f) const{ const Real C = C_arr(i,j,k); const Real S_ck = S_ck_arr(i,j,k); - const Real C1 = C1_arr(i,j,k); - const Real C3 = C3_arr(i,j,k); - const Real S1 = S1_arr(i,j,k); - const Real S3 = S3_arr(i,j,k); - const Complex X1 = X1_arr(i,j,k); const Complex X2 = X2_arr(i,j,k); const Complex X3 = X3_arr(i,j,k); |