aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhotonParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2019-06-03 15:24:54 +0200
committerGravatar Luca Fedeli <luca.fedeli@cea.fr> 2019-06-03 15:24:54 +0200
commitffb2c6a10bcfcf8c2b7a617f0d1ddb9fd8666aec (patch)
treec69e077810c509f7bc160abbdd1e24933d3c406e /Source/Particles/PhotonParticleContainer.cpp
parente1067378f5d43c11850f4e6518cbfe3a96250889 (diff)
downloadWarpX-ffb2c6a10bcfcf8c2b7a617f0d1ddb9fd8666aec.tar.gz
WarpX-ffb2c6a10bcfcf8c2b7a617f0d1ddb9fd8666aec.tar.zst
WarpX-ffb2c6a10bcfcf8c2b7a617f0d1ddb9fd8666aec.zip
Added function to initialize the optical depth (still crashing)
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