diff options
author | 2019-08-09 16:37:29 -0700 | |
---|---|---|
committer | 2019-08-09 16:37:29 -0700 | |
commit | 8b455ff9c46aa8d8a378d8c262eea8edcdf10e3f (patch) | |
tree | 40128db1c734442b1157e3668977236a7494bb28 /Source/Particles/WarpXParticleContainer.cpp | |
parent | 00cd6d4cee3c5f01b5e68b080019fcd85dc73714 (diff) | |
download | WarpX-8b455ff9c46aa8d8a378d8c262eea8edcdf10e3f.tar.gz WarpX-8b455ff9c46aa8d8a378d8c262eea8edcdf10e3f.tar.zst WarpX-8b455ff9c46aa8d8a378d8c262eea8edcdf10e3f.zip |
Fix charge deposition for GPU
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index c4e670bf8..aa74f9c4a 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -587,7 +587,8 @@ WarpXParticleContainer::DepositCharge (WarpXParIter& pti, RealVector& wp, #ifdef AMREX_USE_GPU // No tiling on GPU: rho_arr points to the full rho array. - Array4<Real> const& rho_arr = rho->array(pti); + MultiFab rhoi(*rho, amrex::make_alias, icomp, 1); + Array4<Real> const& rho_arr = rhoi.array(pti); #else // Tiling is on: rho_arr points to local_rho[thread_num] const Box tb = amrex::convert(tilebox, IntVect::TheUnitVector()); |