aboutsummaryrefslogtreecommitdiff
path: root/Source/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Weiqun Zhang <weiqunzhang@lbl.gov> 2018-12-06 16:32:29 -0800
committerGravatar Weiqun Zhang <weiqunzhang@lbl.gov> 2018-12-06 16:32:29 -0800
commit8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c (patch)
treec912659c09cfa4ecf4ca42c45891a48f30557c6f /Source/PhysicalParticleContainer.cpp
parented2106748e33f62b67eb457d0564503d745762f6 (diff)
downloadWarpX-8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c.tar.gz
WarpX-8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c.tar.zst
WarpX-8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c.zip
more changes due to AMReX changes
Diffstat (limited to 'Source/PhysicalParticleContainer.cpp')
-rw-r--r--Source/PhysicalParticleContainer.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/Source/PhysicalParticleContainer.cpp b/Source/PhysicalParticleContainer.cpp
index f76c74579..c4fdd4464 100644
--- a/Source/PhysicalParticleContainer.cpp
+++ b/Source/PhysicalParticleContainer.cpp
@@ -437,7 +437,11 @@ PhysicalParticleContainer::AddPlasmaCPU (int lev, RealBox part_realbox)
if (cost) {
wt = (amrex::second() - wt) / tile_box.d_numPts();
- (*cost)[mfi].plus(wt, tile_box);
+ FArrayBox* costfab = cost->fabPtr(mfi);
+ AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( tile_box, work_box,
+ {
+ costfab->plus(wt, work_box);
+ });
}
}
}
@@ -674,7 +678,11 @@ PhysicalParticleContainer::AddPlasmaGPU (int lev, RealBox part_realbox)
if (cost) {
wt = (amrex::second() - wt) / tile_box.d_numPts();
- (*cost)[mfi].plus(wt, tile_box);
+ FArrayBox* costfab = cost->fabPtr(mfi);
+ AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( tile_box, work_box,
+ {
+ costfab->plus(wt, work_box);
+ });
}
}
}
@@ -981,7 +989,11 @@ PhysicalParticleContainer::FieldGather (int lev,
if (cost) {
const Box& tbx = pti.tilebox();
wt = (amrex::second() - wt) / tbx.d_numPts();
- (*cost)[pti].plus(wt, tbx);
+ FArrayBox* costfab = cost->fabPtr(pti);
+ AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( tbx, work_box,
+ {
+ costfab->plus(wt, work_box);
+ });
}
}
}
@@ -1406,7 +1418,11 @@ PhysicalParticleContainer::Evolve (int lev,
if (cost) {
const Box& tbx = pti.tilebox();
wt = (amrex::second() - wt) / tbx.d_numPts();
- (*cost)[pti].plus(wt, tbx);
+ FArrayBox* costfab = cost->fabPtr(pti);
+ AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( tbx, work_box,
+ {
+ costfab->plus(wt, work_box);
+ });
}
}
}