diff options
author | 2019-10-31 12:44:40 +0100 | |
---|---|---|
committer | 2019-10-31 12:44:40 +0100 | |
commit | d44b32225c22e870b909d4243168575ead339fc0 (patch) | |
tree | 52aff922439ed3993350f2e52cf60496b18a7202 /Source/Particles/PhotonParticleContainer.cpp | |
parent | f01e1f4a772644a0b81d054a6057c8cf56203f7d (diff) | |
download | WarpX-d44b32225c22e870b909d4243168575ead339fc0.tar.gz WarpX-d44b32225c22e870b909d4243168575ead339fc0.tar.zst WarpX-d44b32225c22e870b909d4243168575ead339fc0.zip |
Moved evolution of optical depth in a dedicated function
Diffstat (limited to 'Source/Particles/PhotonParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhotonParticleContainer.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp index 7e05656ef..7d63fff11 100644 --- a/Source/Particles/PhotonParticleContainer.cpp +++ b/Source/Particles/PhotonParticleContainer.cpp @@ -86,15 +86,6 @@ PhotonParticleContainer::PushPX(WarpXParIter& pti, ux[i], uy[i], uz[i], dt ); } ); - -#ifdef WARPX_QED - //m_shr_p_bw_engine->are_lookup_tables_initialized() is necessary here if we want - //to perform just initialization tests of the optical depth without actually - //enabling QED effects (this requires lookup tables). - if(has_breit_wheeler() && m_shr_p_bw_engine->are_lookup_tables_initialized()) - DoBreitWheeler(pti, dt); -#endif - } void @@ -124,10 +115,17 @@ PhotonParticleContainer::Evolve (int lev, } #ifdef WARPX_QED + void -PhotonParticleContainer::DoBreitWheeler(WarpXParIter& pti, - amrex::Real dt) +PhotonParticleContainer::EvolveOpticalDepth( + WarpXParIter& pti,amrex::Real dt) { + //m_shr_p_bw_engine->are_lookup_tables_initialized() is necessary here if we want + //to perform just initialization tests of the optical depth without actually + //enabling QED effects (this requires lookup tables). + if(!has_breit_wheeler() || !m_shr_p_bw_engine->are_lookup_tables_initialized()) + return; + auto& attribs = pti.GetAttribs(); ParticleReal* const AMREX_RESTRICT ux = attribs[PIdx::ux].dataPtr(); ParticleReal* const AMREX_RESTRICT uy = attribs[PIdx::uy].dataPtr(); |