From b590b2051c17f34ec735c1e4b8df3cddd0936ae5 Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Fri, 5 May 2023 14:24:00 -0700 Subject: Prevent implicit capture on GPU for RZ sims (#3895) --- 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 ac6aecbac..0c9b7ce69 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1482,6 +1482,7 @@ PhysicalParticleContainer::AddPlasmaFlux (amrex::Real dt) #ifdef WARPX_DIM_RZ const int nmodes = WarpX::n_rz_azimuthal_modes; + const bool rz_random_theta = m_rz_random_theta; bool radially_weighted = plasma_injector->radially_weighted; #endif @@ -1793,7 +1794,7 @@ PhysicalParticleContainer::AddPlasmaFlux (amrex::Real dt) // Replace the x and y, setting an angle theta. // These x and y are used to get the momentum and density Real theta; - if (nmodes == 1 && m_rz_random_theta) { + if (nmodes == 1 && rz_random_theta) { // With only 1 mode, the angle doesn't matter so // choose it randomly. theta = 2._prt*MathConst::pi*amrex::Random(engine); -- cgit v1.2.3