From 6f356557b114e0716a02539dc5a1687ea9a58195 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Mon, 30 Mar 2020 08:27:31 -0700 Subject: 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 --- .../FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms') diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H index e1b7923e7..1154c55ed 100644 --- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H +++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H @@ -99,9 +99,13 @@ struct CartesianCKCAlgorithm { int const i, int const j, int const k ) { amrex::Real const alphax = coefs_x[1]; +#if defined WARPX_DIM_3D amrex::Real const betaxy = coefs_x[2]; +#endif amrex::Real const betaxz = coefs_x[3]; +#if defined WARPX_DIM_3D amrex::Real const gammax = coefs_x[4]; +#endif #if defined WARPX_DIM_3D return alphax * (F(i+1,j ,k ) - F(i, j, k )) + betaxy * (F(i+1,j+1,k ) - F(i ,j+1,k ) @@ -187,8 +191,10 @@ struct CartesianCKCAlgorithm { using namespace amrex; Real const alphaz = coefs_z[1]; Real const betazx = coefs_z[2]; +#if defined WARPX_DIM_3D Real const betazy = coefs_z[3]; Real const gammaz = coefs_z[4]; +#endif #if defined WARPX_DIM_3D return alphaz * (F(i ,j ,k+1) - F(i ,j ,k )) + betazx * (F(i+1,j ,k+1) - F(i+1,j ,k ) -- cgit v1.2.3