diff options
author | 2018-12-06 16:32:29 -0800 | |
---|---|---|
committer | 2018-12-06 16:32:29 -0800 | |
commit | 8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c (patch) | |
tree | c912659c09cfa4ecf4ca42c45891a48f30557c6f /Source/WarpXEvolve.cpp | |
parent | ed2106748e33f62b67eb457d0564503d745762f6 (diff) | |
download | WarpX-8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c.tar.gz WarpX-8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c.tar.zst WarpX-8ae0feaf0f5573c5f1623cb8acaf3bcc6ab5566c.zip |
more changes due to AMReX changes
Diffstat (limited to 'Source/WarpXEvolve.cpp')
-rw-r--r-- | Source/WarpXEvolve.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/WarpXEvolve.cpp b/Source/WarpXEvolve.cpp index 38a630880..6d917e36d 100644 --- a/Source/WarpXEvolve.cpp +++ b/Source/WarpXEvolve.cpp @@ -525,8 +525,12 @@ WarpX::EvolveB (int lev, PatchType patch_type, amrex::Real dt) if (cost) { Box cbx = mfi.tilebox(IntVect{AMREX_D_DECL(0,0,0)}); if (patch_type == PatchType::coarse) cbx.refine(rr); - wt = (amrex::second() - wt) / cbx.d_numPts(); - (*cost)[mfi].plus(wt, cbx); + wt = (amrex::second() - wt) / cbx.d_numPts();\ + FArrayBox* costfab = cost->fabPtr(mfi); + AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( cbx, work_box, + { + costfab->plus(wt, work_box); + }); } } @@ -668,7 +672,11 @@ WarpX::EvolveE (int lev, PatchType patch_type, amrex::Real dt) Box cbx = mfi.tilebox(IntVect{AMREX_D_DECL(0,0,0)}); if (patch_type == PatchType::coarse) cbx.refine(rr); wt = (amrex::second() - wt) / cbx.d_numPts(); - (*cost)[mfi].plus(wt, cbx); + FArrayBox* costfab = cost->fabPtr(mfi); + AMREX_LAUNCH_HOST_DEVICE_LAMBDA ( cbx, work_box, + { + costfab->plus(wt, work_box); + }); } } |