aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2020-03-30 08:27:31 -0700
committerGravatar GitHub <noreply@github.com> 2020-03-30 08:27:31 -0700
commit6f356557b114e0716a02539dc5a1687ea9a58195 (patch)
tree1f31878397a9dc2bca90a4815f024689540b4d2d /Source/FieldSolver/SpectralSolver/SpectralAlgorithms
parent237cba843348973e8163967bdd63e8af684a8df9 (diff)
downloadWarpX-6f356557b114e0716a02539dc5a1687ea9a58195.tar.gz
WarpX-6f356557b114e0716a02539dc5a1687ea9a58195.tar.zst
WarpX-6f356557b114e0716a02539dc5a1687ea9a58195.zip
Remove compiler warnings (#843)
* Fix compiler warnings with DIM=2 * Fix compiler warnings with USE_RZ=TRUE * Fix compiler warnings with USE_PSATD=TRUE and DIM=2 * Fix compiler warnings with USE_PSATD=TRUE and DIM=3 * Fix bug: discard only return value when calling DefineAndReturnParticleTile * Remove unused variables not triggering warnings
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp2
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H3
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp
index 5af33e2cb..0478c2a6b 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanAlgorithm.cpp
@@ -155,7 +155,9 @@ void GalileanAlgorithm::InitializeSpectralCoefficients(const SpectralKSpace& spe
Array4<Complex> Theta2 = Theta2_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
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
index 743d6d1c7..7ce774ab2 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
+++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H
@@ -61,10 +61,11 @@ class SpectralBaseAlgorithm
{};
// Modified finite-order vectors
- KVectorComponent modified_kx_vec, modified_kz_vec;
+ KVectorComponent modified_kx_vec;
#if (AMREX_SPACEDIM==3)
KVectorComponent modified_ky_vec;
#endif
+ KVectorComponent modified_kz_vec;
};
#endif // WARPX_USE_PSATD