aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhotonParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/PhotonParticleContainer.cpp')
-rw-r--r--Source/Particles/PhotonParticleContainer.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp
index 9ea448ec8..6e6300bd1 100644
--- a/Source/Particles/PhotonParticleContainer.cpp
+++ b/Source/Particles/PhotonParticleContainer.cpp
@@ -11,6 +11,8 @@
#include <WarpX.H>
#include <WarpXConst.H>
+#include "breit_wheeler_engine_wrapper.h"
+
using namespace amrex;
PhotonParticleContainer::PhotonParticleContainer (AmrCore* amr_core, int ispecies,
@@ -37,10 +39,6 @@ void PhotonParticleContainer::InitData()
{
AddParticles(0); // Note - add on level 0
-#ifdef WARPX_QED
- InitOpticalDepth();
-#endif
-
if (maxLevel() > 0) {
Redistribute(); // We then redistribute
}
@@ -110,7 +108,12 @@ PhotonParticleContainer::Evolve (int lev,
#ifdef WARPX_QED
- void PhotonParticleContainer::InitOpticalDepth(){
-
- }
+void PhotonParticleContainer::InitOpticalDepth(
+ WarpXParIter& pti,
+ warpx_breit_wheeler_engine& engine)
+{
+ auto& taus = pti.GetAttribs(particle_comps["tau"]);
+ for(auto& tau: taus)
+ tau = engine.get_optical_depth();
+}
#endif