diff options
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index d5e3bfb99..87b43f661 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -70,8 +70,10 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp //if the species is not a lepton, do_classical_radiation_reaction //should be false AMREX_ALWAYS_ASSERT_WITH_MESSAGE( - !(do_classical_radiation_reaction && !AmIALepton()), - "Can't enable classical radiation reaction for non lepton species. " ); + !(do_classical_radiation_reaction && + !(AmIA<PhysicalSpecies::electron>() || + AmIA<PhysicalSpecies::positron>() )), + "Can't enable classical radiation reaction for non lepton species. "); //Only Boris pusher is compatible with radiation reaction AMREX_ALWAYS_ASSERT_WITH_MESSAGE( @@ -92,7 +94,12 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp AddRealComp("optical_depth_BW"); } - //TODO: SHOULD CHECK IF SPECIES IS EITHER ELECTRONS OR POSITRONS!! + if(m_do_qed_quantum_sync){ + pp.get("qed_quantum_sync_phot_product_species", + m_qed_quantum_sync_phot_product_name); + } + + #endif //variable to set plot_flags size @@ -2148,15 +2155,9 @@ PhysicalParticleContainer::getIonizationFunc () ion_atomic_number}; } -//This function return true if the PhysicalParticleContainer contains electrons -//or positrons, false otherwise -bool -PhysicalParticleContainer::AmIALepton(){ - return (this-> mass == PhysConst::m_e); -} - #ifdef WARPX_QED + bool PhysicalParticleContainer::has_quantum_sync() { return m_do_qed_quantum_sync; @@ -2181,4 +2182,18 @@ set_quantum_sync_engine_ptr(std::shared_ptr<QuantumSynchrotronEngine> ptr) m_shr_p_qs_engine = ptr; } +PhotonEmissionFilterFunc +PhysicalParticleContainer::getPhotonEmissionFilterFunc () +{ + WARPX_PROFILE("PPC::getPhotonEmissionFunc"); + return PhotonEmissionFilterFunc{particle_runtime_comps["optical_depth_QSR"]}; +} + +PairGenerationFilterFunc +PhysicalParticleContainer::getPairGenerationFilterFunc () +{ + WARPX_PROFILE("PPC::getPairGenerationFunc"); + return PairGenerationFilterFunc{particle_runtime_comps["optical_depth_BW"]}; +} + #endif |