diff options
Diffstat (limited to 'Source/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/PhysicalParticleContainer.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/PhysicalParticleContainer.cpp b/Source/PhysicalParticleContainer.cpp index 3e26097f0..c28973ca3 100644 --- a/Source/PhysicalParticleContainer.cpp +++ b/Source/PhysicalParticleContainer.cpp @@ -638,8 +638,7 @@ PhysicalParticleContainer::Evolve (int lev, const MultiFab& Ex, const MultiFab& Ey, const MultiFab& Ez, const MultiFab& Bx, const MultiFab& By, const MultiFab& Bz, MultiFab& jx, MultiFab& jy, MultiFab& jz, - MultiFab* rho, MultiFab* rho2, - Real t, Real dt) + MultiFab* rho, Real t, Real dt) { BL_PROFILE("PPC::Evolve()"); BL_PROFILE_VAR_NS("PPC::Evolve::Copy", blp_copy); @@ -789,7 +788,7 @@ PhysicalParticleContainer::Evolve (int lev, long lvect = 8; - auto depositCharge = [&] (MultiFab* rhomf) + auto depositCharge = [&] (MultiFab* rhomf, int icomp) { long ngRho = rhomf->nGrow(); long ngRhoDeposit = (WarpX::use_filter) ? ngRho +1 : ngRho; @@ -845,16 +844,16 @@ PhysicalParticleContainer::Evolve (int lev, ncomp); amrex_atomic_accumulate_fab(BL_TO_FORTRAN_3D(filtered_rho), - BL_TO_FORTRAN_3D(rhofab), ncomp); + BL_TO_FORTRAN_N_3D(rhofab,icomp), ncomp); } else { amrex_atomic_accumulate_fab(BL_TO_FORTRAN_3D(local_rho), - BL_TO_FORTRAN_3D(rhofab), ncomp); + BL_TO_FORTRAN_N_3D(rhofab,icomp), ncomp); } }; - if (rho) depositCharge(rho); + if (rho) depositCharge(rho,0); if (! do_not_push) { @@ -1023,7 +1022,7 @@ PhysicalParticleContainer::Evolve (int lev, BL_PROFILE_VAR_STOP(blp_copy); } - if (rho2) depositCharge(rho2); + if (rho) depositCharge(rho,1); if (cost) { const Box& tbx = pti.tilebox(); |