diff options
author | 2019-06-20 16:22:24 -0700 | |
---|---|---|
committer | 2019-06-20 16:22:24 -0700 | |
commit | ae9fdb55a96d44f411d93c5bddcc31ea3be0c0dd (patch) | |
tree | e7b78ba43f53fb5a25544f9f62b58c7756d7a50b /Source/Laser/LaserParticleContainer.cpp | |
parent | 7e0bae5661709febce5c40db627f4a3f5dfeee84 (diff) | |
parent | b1beba190f3a4b55f1ec16a1b0c81dfcabfa5b95 (diff) | |
download | WarpX-ae9fdb55a96d44f411d93c5bddcc31ea3be0c0dd.tar.gz WarpX-ae9fdb55a96d44f411d93c5bddcc31ea3be0c0dd.tar.zst WarpX-ae9fdb55a96d44f411d93c5bddcc31ea3be0c0dd.zip |
Merge branch 'dev' of https://github.com/ECP-WarpX/WarpX into SliceGeneration_with_yt_compliance_for_viz
Diffstat (limited to 'Source/Laser/LaserParticleContainer.cpp')
-rw-r--r-- | Source/Laser/LaserParticleContainer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp index 2f964b6f3..de410b31f 100644 --- a/Source/Laser/LaserParticleContainer.cpp +++ b/Source/Laser/LaserParticleContainer.cpp @@ -518,10 +518,11 @@ LaserParticleContainer::Evolve (int lev, if (cost) { const Box& tbx = pti.tilebox(); wt = (amrex::second() - wt) / tbx.d_numPts(); - FArrayBox* costfab = cost->fabPtr(pti); - AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( tbx, work_box, + Array4<Real> const& costarr = cost->array(pti); + amrex::ParallelFor(tbx, + [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { - costfab->plus(wt, work_box); + costarr(i,j,k) += wt; }); } } |