diff options
author | 2020-03-17 15:25:42 +0100 | |
---|---|---|
committer | 2020-03-17 07:25:42 -0700 | |
commit | 314acff8ddd7ca7af3af9a65c43908acc266533f (patch) | |
tree | 85c5bc45be68d1de3b665e44f50bad2633b9bba2 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 573489f64d977fff8ea2480858581fc2b72ee451 (diff) | |
download | WarpX-314acff8ddd7ca7af3af9a65c43908acc266533f.tar.gz WarpX-314acff8ddd7ca7af3af9a65c43908acc266533f.tar.zst WarpX-314acff8ddd7ca7af3af9a65c43908acc266533f.zip |
Add QED particle creaction routines (#698)
* Initial work to add back QED particle generation
* Work in progress: port old QED routines
* Add two distinct CopyFuncs
* modified getMFItInfo and CopyFunc (not working)
* bugfixing & work to add back QED particle creation routines
* bugfixing
* added back quantum photon emission
* bugfixing
* bugfixing
* added back pair generation (still some bugs in photon emission)
* removed unwanted check
* bugfixing
* bugfixing
* bugfixing
* Moved QED folder
* added comments + some refactoring
* added comments
* remove some virtual functions to make lgtm happy
* updated tests
* added PhysicalParticleType
* bugfixing
* added copyright
* improved comments
* improved comments
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* moved inclusion of QEDInternals folder
* moved some inclusion directives between Make files
* moved some inclusion directives between Make files (forgot to add a file)
* Update Source/Particles/PhysicalParticleContainer.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/PhysicalParticleContainer.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/PhysicalParticleContainer.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/PhysicalParticleContainer.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/PhysicalParticleContainer.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* corrected alignment
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja>
* removed some unnecessary amrex::
* add missing comment
* Replaced BL_PROFILE with WARPX_PROFILE
* bugfixing and making some variables const
* removed some moves
* removed some moves
* started to change tau into optical_depth_BW or optical_depth_QSR
* Using initialization policy to initialize optical depth
* bugfixing
* forgot to add a file
* fixed bug
* Revert "fixed bug"
This reverts commit a3fb98d10cc30327635aeaa71451a05ca2229ff4.
* Update Source/Particles/ElementaryProcess/QEDPairGeneration.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Added doQEDEvents to OneStep_sub1
* add a bunch of const
* add _rt suffix
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* added path to included files
* Introduced a templated AmIA<something> function using physical_species
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* added paths to included headers
* updated documentation
* updated examples
* bugfixing
* bugfixing
* fixing examples
* fixed example
* fixed example
* correct a misprint in error message
* fixed issue related to 1./mass for photons
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/MultiParticleContainer.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
* make the use of energy_threshold more transparent
* remove unnecessary checks
* bigfixing
* added comment
* separate checks for QED processes
* added a CheckIonizationProductSpecies for consistency
* bugfixing
* now using a new variable for photon energy creation threshold
* removed unwanted comment
* added option to set a user-defined threshold for photon creation
* bugfixing
* updated documentation
* updated example to include new option
* updated doc
* fixed merge conflict
* correct bug in example
* reorganized function
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
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 |