From 7f178a55df4d0973f6788d9c27fd10b128ad4571 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Tue, 8 Oct 2019 18:25:10 +0200 Subject: Heavy refactoring --- Source/Particles/PhotonParticleContainer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/Particles/PhotonParticleContainer.cpp') 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(); } ); } -- cgit v1.2.3