From 7a5d2666a6a266f94e4acaa5710ffb0e453d6600 Mon Sep 17 00:00:00 2001 From: grote Date: Tue, 27 Aug 2019 13:48:43 -0700 Subject: Bug fix for RZ multimode on GPU --- Source/Particles/PhysicalParticleContainer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') 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(); -- cgit v1.2.3