aboutsummaryrefslogtreecommitdiff
path: root/Source/Laser/LaserParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers@lbl.gov> 2020-01-24 12:50:49 -0800
committerGravatar GitHub <noreply@github.com> 2020-01-24 12:50:49 -0800
commit6a5b0ea96d602186b9198b8b41326e9636dc1cc8 (patch)
tree647dcb65d5c59b9b8f61036132e71b47f8362b7f /Source/Laser/LaserParticleContainer.cpp
parentadc60b0ea3d8143450fdce597f006283b6a2affd (diff)
parentd21b7d819a1bc84fdb28deff578f369a6932b5b8 (diff)
downloadWarpX-6a5b0ea96d602186b9198b8b41326e9636dc1cc8.tar.gz
WarpX-6a5b0ea96d602186b9198b8b41326e9636dc1cc8.tar.zst
WarpX-6a5b0ea96d602186b9198b8b41326e9636dc1cc8.zip
Merge pull request #657 from atmyers/bugfix
fix shadowing warning
Diffstat (limited to 'Source/Laser/LaserParticleContainer.cpp')
-rw-r--r--Source/Laser/LaserParticleContainer.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp
index ed9f5eda0..7a75b9f24 100644
--- a/Source/Laser/LaserParticleContainer.cpp
+++ b/Source/Laser/LaserParticleContainer.cpp
@@ -466,17 +466,19 @@ LaserParticleContainer::Evolve (int lev,
// Current Deposition
//
// Deposit inside domains
- int* ion_lev = nullptr;
- DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, &jx, &jy, &jz,
- 0, np_current, thread_num,
- lev, lev, dt);
-
- bool has_buffer = cjx;
- if (has_buffer){
- // Deposit in buffers
- DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, cjx, cjy, cjz,
- np_current, np-np_current, thread_num,
- lev, lev-1, dt);
+ {
+ int* ion_lev = nullptr;
+ DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, &jx, &jy, &jz,
+ 0, np_current, thread_num,
+ lev, lev, dt);
+
+ bool has_buffer = cjx;
+ if (has_buffer){
+ // Deposit in buffers
+ DepositCurrent(pti, wp, uxp, uyp, uzp, ion_lev, cjx, cjy, cjz,
+ np_current, np-np_current, thread_num,
+ lev, lev-1, dt);
+ }
}
//