aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-05-28 17:19:53 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-05-28 17:19:53 -0700
commit6c20c43e0ecc9a03b21ef6c57adb2f13911004e2 (patch)
tree06d7befbf09a0ec9d27e48ba910fef2285b55d84 /Source/Particles/PhysicalParticleContainer.cpp
parent2ddfcb10aeb31b496153658269147e203a362657 (diff)
downloadWarpX-6c20c43e0ecc9a03b21ef6c57adb2f13911004e2.tar.gz
WarpX-6c20c43e0ecc9a03b21ef6c57adb2f13911004e2.tar.zst
WarpX-6c20c43e0ecc9a03b21ef6c57adb2f13911004e2.zip
typos
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index 2c501985f..6faf7a127 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -216,7 +216,7 @@ PhysicalParticleContainer::AddGaussianBeam(Real x_m, Real y_m, Real z_m,
plasma_injector->getMomentum(u, x, y, z);
if (do_symmetrize){
std::array<Real, 3> u_tmp;
- Real x_tmp, y_tmp, z_tmp;
+ Real x_tmp, y_tmp;
// Add four particles to the beam:
// (x,ux,y,uy) (-x,-ux,y,uy) (x,ux,-y,-uy) (-x,-ux,-y,-uy)
for (int ix=0; ix<2; ix++){
@@ -226,7 +226,8 @@ PhysicalParticleContainer::AddGaussianBeam(Real x_m, Real y_m, Real z_m,
u_tmp[0] *= std::pow(-1,ix);
y_tmp = y*std::pow(-1,iy);
u_tmp[1] *= std::pow(-1,iy);
- CheckAndAddParticle(x, y, z, u_tmp, weight/4);
+ CheckAndAddParticle(x_tmp, y_tmp, z,
+ u_tmp, weight/4);
}
}
} else {