diff options
author | 2019-08-27 13:48:43 -0700 | |
---|---|---|
committer | 2019-08-27 13:48:43 -0700 | |
commit | 7a5d2666a6a266f94e4acaa5710ffb0e453d6600 (patch) | |
tree | 759266f8c2c9fc7cf0125c277373dcf74a74f5b5 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 9dbf87a8650bb3a5eb9b3107ed72f3a8e81452f8 (diff) | |
download | WarpX-7a5d2666a6a266f94e4acaa5710ffb0e453d6600.tar.gz WarpX-7a5d2666a6a266f94e4acaa5710ffb0e453d6600.tar.zst WarpX-7a5d2666a6a266f94e4acaa5710ffb0e453d6600.zip |
Bug fix for RZ multimode on GPU
Diffstat (limited to '')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 15f09d409..9a3b6a565 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -339,6 +339,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) Real density_max = plasma_injector->density_max; #ifdef WARPX_DIM_RZ + const long nmodes = WarpX::n_rz_azimuthal_modes; bool radially_weighted = plasma_injector->radially_weighted; #endif @@ -533,7 +534,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // Replace the x and y, setting an angle theta. // These x and y are used to get the momentum and density Real theta; - if (WarpX::n_rz_azimuthal_modes == 1) { + if (nmodes == 1) { // With only 1 mode, the angle doesn't matter so // choose it randomly. theta = 2.*MathConst::pi*amrex::Random(); |