aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/WarpXPushFieldsEM.cpp
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-08-08 16:56:27 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-08-08 16:56:27 -0700
commit006c27ae9eb5ed31fdb4824b1c7e602712d5132f (patch)
tree1eb8b86b851154cc891c146545f1aa82f14ff317 /Source/FieldSolver/WarpXPushFieldsEM.cpp
parent7b25d97d25e54a9da04a3bd58c31ce33a8c3dad3 (diff)
downloadWarpX-006c27ae9eb5ed31fdb4824b1c7e602712d5132f.tar.gz
WarpX-006c27ae9eb5ed31fdb4824b1c7e602712d5132f.tar.zst
WarpX-006c27ae9eb5ed31fdb4824b1c7e602712d5132f.zip
Moved loop over ncomps into ApplyInverseVolumeScalingToChargeDensity
Diffstat (limited to 'Source/FieldSolver/WarpXPushFieldsEM.cpp')
-rw-r--r--Source/FieldSolver/WarpXPushFieldsEM.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/FieldSolver/WarpXPushFieldsEM.cpp b/Source/FieldSolver/WarpXPushFieldsEM.cpp
index f199e0660..1df05bc0f 100644
--- a/Source/FieldSolver/WarpXPushFieldsEM.cpp
+++ b/Source/FieldSolver/WarpXPushFieldsEM.cpp
@@ -673,7 +673,7 @@ WarpX::ApplyInverseVolumeScalingToCurrentDensity (MultiFab* Jx, MultiFab* Jy, Mu
}
void
-WarpX::ApplyInverseVolumeScalingToChargeDensity (MultiFab* Rho, int icomp, int lev)
+WarpX::ApplyInverseVolumeScalingToChargeDensity (MultiFab* Rho, int lev)
{
const long ngRho = Rho->nGrow();
const std::array<Real,3>& dx = WarpX::CellSize(lev);
@@ -699,8 +699,8 @@ WarpX::ApplyInverseVolumeScalingToChargeDensity (MultiFab* Rho, int icomp, int l
// Rescale charge in r-z mode since the inverse volume factor was not
// included in the charge deposition.
- amrex::ParallelFor(tb,
- [=] AMREX_GPU_DEVICE (int i, int j, int k)
+ amrex::ParallelFor(tb, Rho->nComp(),
+ [=] AMREX_GPU_DEVICE (int i, int j, int k, int icomp)
{
// Wrap the charge density deposited in the guard cells around
// to the cells above the axis.