diff options
author | 2020-03-30 08:27:31 -0700 | |
---|---|---|
committer | 2020-03-30 08:27:31 -0700 | |
commit | 6f356557b114e0716a02539dc5a1687ea9a58195 (patch) | |
tree | 1f31878397a9dc2bca90a4815f024689540b4d2d /Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H | |
parent | 237cba843348973e8163967bdd63e8af684a8df9 (diff) | |
download | WarpX-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/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H')
-rw-r--r-- | Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H | 6 |
1 files changed, 6 insertions, 0 deletions
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 ) |