diff options
author | 2020-10-02 14:11:31 -0700 | |
---|---|---|
committer | 2020-10-02 14:11:31 -0700 | |
commit | 5d661dc137e078e0b94fa72b794bab487ecd5b43 (patch) | |
tree | 12ec3785c41039c535c5af372441d7a0061d9383 /Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp | |
parent | a3e6d05ebc79201d0c4fe2904741e3b7080532f6 (diff) | |
download | WarpX-5d661dc137e078e0b94fa72b794bab487ecd5b43.tar.gz WarpX-5d661dc137e078e0b94fa72b794bab487ecd5b43.tar.zst WarpX-5d661dc137e078e0b94fa72b794bab487ecd5b43.zip |
Fix some warnings for PSATD builds (#1401)
* Fix warnings for 2D/3D PSATD builds
* Fix warnings for RZ PSATD builds
* Update FIXME comment: no known bug
* Fix remaining warning for RZ PSATD builds
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp index 631004325..ce0f466aa 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp @@ -24,9 +24,9 @@ PsatdAlgorithm::PsatdAlgorithm(const SpectralKSpace& spectral_kspace, const int norder_z, const bool nodal, const Real dt, const bool update_with_rho) // Initialize members of base class - : m_dt( dt ), - m_update_with_rho( update_with_rho ), - SpectralBaseAlgorithm( spectral_kspace, dm, norder_x, norder_y, norder_z, nodal ) + : SpectralBaseAlgorithm(spectral_kspace, dm, norder_x, norder_y, norder_z, nodal), + m_dt(dt), + m_update_with_rho(update_with_rho) { const BoxArray& ba = spectral_kspace.spectralspace_ba; @@ -144,7 +144,7 @@ PsatdAlgorithm::pushSpectralFields(SpectralFieldData& f) const{ fields(i,j,k,Idx::Bz) = C*Bz_old - S_ck*I*(kx*Ey_old-ky*Ex_old) + X1*I*(kx*Jy-ky*Jx); } ); } -}; +} /** * \brief Initialize coefficients for update equations @@ -256,8 +256,6 @@ PsatdAlgorithm::CurrentCorrection (SpectralFieldData& field_data, // Loop over indices within one box ParallelFor( bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { - using Idx = SpectralFieldIndex; - // Shortcuts for the values of J and rho const Complex Jx = fields(i,j,k,Idx::Jx); const Complex Jy = fields(i,j,k,Idx::Jy); @@ -330,11 +328,11 @@ PsatdAlgorithm::VayDeposition (SpectralFieldData& field_data, // Loop over indices within one box ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { - using Idx = SpectralFieldIndex; - // Shortcuts for the values of D const Complex Dx = fields(i,j,k,Idx::Jx); +#if (AMREX_SPACEDIM==3) const Complex Dy = fields(i,j,k,Idx::Jy); +#endif const Complex Dz = fields(i,j,k,Idx::Jz); // Imaginary unit @@ -346,8 +344,7 @@ PsatdAlgorithm::VayDeposition (SpectralFieldData& field_data, const amrex::Real ky_mod = modified_ky_arr[j]; const amrex::Real kz_mod = modified_kz_arr[k]; #else - constexpr amrex::Real ky_mod = 0._rt; - const amrex::Real kz_mod = modified_kz_arr[j]; + const amrex::Real kz_mod = modified_kz_arr[j]; #endif // Compute Jx |