diff --git a/Source/Particles/PulsarParameters.cpp b/Source/Particles/PulsarParameters.cpp index 28be08046a6..5fb57517eb4 100644 --- a/Source/Particles/PulsarParameters.cpp +++ b/Source/Particles/PulsarParameters.cpp @@ -2271,6 +2271,7 @@ Pulsar::FlagCellsForInjectionWithPcounts () amrex::Real sum_magnetization = m_sum_inj_magnetization; amrex::Real GJdensitythreshold = m_injection_GJdensitythreshold; // fill pcounts and injected cell flag + amrex::Real chi = m_Chi; for (amrex::MFIter mfi(*m_injection_flag[lev], amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const amrex::Box& tb = mfi.tilebox(iv); @@ -2357,7 +2358,8 @@ Pulsar::FlagCellsForInjectionWithPcounts () //amrex::Real rho_GJ = rho_GJ_fac * (1. - 3. * std::cos(theta) * std::cos(theta) ); //amrex::Real n_GJ = amrex::Math::abs(rho_GJ)/q; //amrex::Real num_part_real = 0.; - amrex::Real GJ_factor = amrex::Math::abs( 1. - 3. * std::cos(theta)*std::cos(theta)); + amrex::Real shifted_theta = theta - chi; + amrex::Real GJ_factor = amrex::Math::abs( 1. - 3. * std::cos(shifted_theta)*std::cos(shifted_theta)); if (GJ_factor < GJdensitythreshold) GJ_factor = GJdensitythreshold; amrex::Real sigma_factor = sigma_inj_ring(i,j,k)/sum_magnetization; amrex::Real num_part_cell = (num_GJParticles * GJ_factor) + (PairPlasmaParticles * sigma_factor);