diff options
Diffstat (limited to 'Source/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/PhysicalParticleContainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/PhysicalParticleContainer.cpp b/Source/PhysicalParticleContainer.cpp index e5f6b0c82..050e50daa 100644 --- a/Source/PhysicalParticleContainer.cpp +++ b/Source/PhysicalParticleContainer.cpp @@ -225,9 +225,9 @@ PhysicalParticleContainer::AddPlasma(int lev, RealBox part_realbox ) // and that the boost is along z) Real t = WarpX::GetInstance().gett_new(lev); Real v_boost = WarpX::beta_boost*PhysConst::c; - Real z_lab = WarpX::gamma_boost*( z - v_boost*t ); + Real z_lab = WarpX::gamma_boost*( z + v_boost*t ); plasma_injector->getMomentum(u, x, y, z_lab); - dens = plasma_injector->getDensity(x, y, z); + dens = plasma_injector->getDensity(x, y, z_lab); // Perform Lorentz transform // (Assumes that the plasma has a low velocity) u[2] = WarpX::gamma_boost * ( u[2] - v_boost ); |