diff options
author | 2020-10-02 14:11:31 -0700 | |
---|---|---|
committer | 2020-10-02 14:11:31 -0700 | |
commit | 5d661dc137e078e0b94fa72b794bab487ecd5b43 (patch) | |
tree | 12ec3785c41039c535c5af372441d7a0061d9383 /Source/Particles | |
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 '')
-rw-r--r-- | Source/Particles/Deposition/ChargeDeposition.H | 6 | ||||
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Source/Particles/Deposition/ChargeDeposition.H b/Source/Particles/Deposition/ChargeDeposition.H index 860788f40..180133188 100644 --- a/Source/Particles/Deposition/ChargeDeposition.H +++ b/Source/Particles/Deposition/ChargeDeposition.H @@ -101,7 +101,7 @@ void doChargeDepositionShapeN(const GetParticlePosition& GetPosition, // Compute shape factor along x // i: leftmost grid point that the particle touches - amrex::Real sx[depos_order + 1]; + amrex::Real sx[depos_order + 1] = {0._rt}; int i = 0; Compute_shape_factor< depos_order > const compute_shape_factor; if (rho_type[0] == NODE) { @@ -113,7 +113,7 @@ void doChargeDepositionShapeN(const GetParticlePosition& GetPosition, #if (defined WARPX_DIM_3D) // y direction const amrex::Real y = (yp - ymin)*dyi; - amrex::Real sy[depos_order + 1]; + amrex::Real sy[depos_order + 1] = {0._rt}; int j = 0; if (rho_type[1] == NODE) { j = compute_shape_factor(sy, y); @@ -123,7 +123,7 @@ void doChargeDepositionShapeN(const GetParticlePosition& GetPosition, #endif // z direction const amrex::Real z = (zp - zmin)*dzi; - amrex::Real sz[depos_order + 1]; + amrex::Real sz[depos_order + 1] = {0._rt}; int k = 0; if (rho_type[zdir] == NODE) { k = compute_shape_factor(sz, z); diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index d3427b148..ba1e2b438 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -101,7 +101,11 @@ WarpXParticleContainer::AddNParticles (int /*lev*/, const ParticleReal* vx, const ParticleReal* vy, const ParticleReal* vz, int nattr, const ParticleReal* attr, int uniqueparticles, amrex::Long id) { - BL_ASSERT(nattr == 1); //! @fixme nattr is unused below: false sense of safety + // nattr is unused below but needed in the BL_ASSERT + amrex::ignore_unused(nattr); + + BL_ASSERT(nattr == 1); + const ParticleReal* weight = attr; int ibegin, iend; |