diff options
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()); |