diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp index fed9af4562f..9cef1e4e005 100644 --- a/Source/Particles/MultiParticleContainer.cpp +++ b/Source/Particles/MultiParticleContainer.cpp @@ -2135,8 +2135,8 @@ MultiParticleContainer::PulsarPairInjection () + (pos.y-yc)*(pos.y-yc) + (pos.z-zc)*(pos.z-zc)); if (rad > 0) theta_p = std::acos(amrex::Math::abs(pos.z-zc)/rad); - if (amrex::Math::abs(theta_p) > pulsar_removeparticle_theta_min*MathConst::pi/180. and - amrex::Math::abs(theta_p) < pulsar_removeparticle_theta_max*MathConst::pi/180.) { + if ( (amrex::Math::abs(theta_p) > (pulsar_removeparticle_theta_min*MathConst::pi/180.) ) && + (amrex::Math::abs(theta_p) < (pulsar_removeparticle_theta_max*MathConst::pi/180.) )) { ZeroInitializeAndSetNegativeID(p_sp1, pa_sp1, ip #ifdef WARPX_QED ,loc_has_quantum_sync_sp1, p_optical_depth_QSR_sp1 @@ -2149,6 +2149,23 @@ MultiParticleContainer::PulsarPairInjection () ,loc_has_breit_wheeler_sp2, p_optical_depth_BW_sp2 #endif ); + continue; + } + if ( ! ( ( rad > pulsar_particle_injection_rmin) && + ( rad < pulsar_particle_injection_rmax) )) { + ZeroInitializeAndSetNegativeID(p_sp1, pa_sp1, ip +#ifdef WARPX_QED + ,loc_has_quantum_sync_sp1, p_optical_depth_QSR_sp1 + ,loc_has_breit_wheeler_sp1, p_optical_depth_BW_sp1 +#endif + ); + ZeroInitializeAndSetNegativeID(p_sp2, pa_sp2, ip +#ifdef WARPX_QED + ,loc_has_quantum_sync_sp2, p_optical_depth_QSR_sp2 + ,loc_has_breit_wheeler_sp2, p_optical_depth_BW_sp2 +#endif + ); + continue; } // Initialize particle velocity along the Bfield line XDim3 u;