aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhotonParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2019-10-08 18:25:10 +0200
committerGravatar Luca Fedeli <luca.fedeli@cea.fr> 2019-10-08 18:25:10 +0200
commit7f178a55df4d0973f6788d9c27fd10b128ad4571 (patch)
tree0699381450eab0f59c1c738a61a3fe2171e12116 /Source/Particles/PhotonParticleContainer.cpp
parentd8cf34c82ccf179372e8f07700be72a39c528d9e (diff)
downloadWarpX-7f178a55df4d0973f6788d9c27fd10b128ad4571.tar.gz
WarpX-7f178a55df4d0973f6788d9c27fd10b128ad4571.tar.zst
WarpX-7f178a55df4d0973f6788d9c27fd10b128ad4571.zip
Heavy refactoring
Diffstat (limited to 'Source/Particles/PhotonParticleContainer.cpp')
-rw-r--r--Source/Particles/PhotonParticleContainer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp
index a8a51723e..9ed2e10e6 100644
--- a/Source/Particles/PhotonParticleContainer.cpp
+++ b/Source/Particles/PhotonParticleContainer.cpp
@@ -128,6 +128,9 @@ PhotonParticleContainer::Evolve (int lev,
void PhotonParticleContainer::InitTauBreitWheeler()
{
BL_PROFILE("PhotonParticleContainer::InitOpticalDepth");
+ //Get functor
+ auto get_opt = shr_ptr_bw_engine->build_optical_depth_functor();
+
//Looping over all the particles
int num_levels = finestLevel() + 1;
for (int lev=0; lev < num_levels; ++lev)
@@ -136,7 +139,7 @@ void PhotonParticleContainer::InitTauBreitWheeler()
amrex::ParallelFor(
pti.numParticles(),
[=] AMREX_GPU_DEVICE (long i) {
- taus[i] = warpx_breit_wheeler_engine::get_optical_depth();
+ taus[i] = get_opt();
}
);
}