diff options
Diffstat (limited to '')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index de0c2d153..188ff4cb4 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -676,7 +676,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // include ballistic correction for plasma species with bulk motion const XDim3 u_bulk = inj_mom->getBulkMomentum(x, y, z); const Real gamma_bulk = std::sqrt(1.+(u_bulk.x*u_bulk.x+u_bulk.y*u_bulk.y+u_bulk.z*u_bulk.z)); - const Real betaz_bulk = u.z/gamma_bulk; + const Real betaz_bulk = u_bulk.z/gamma_bulk; const Real z0 = z - PhysConst::c*t*betaz_bulk; if (!inj_pos->insideBounds(xb, yb, z0)) { @@ -711,7 +711,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // At this point u is the lab-frame momentum // => Apply the above formula for z0_lab const Real gamma_lab_bulk = std::sqrt(1.+(u_bulk.x*u_bulk.x+u_bulk.y*u_bulk.y+u_bulk.z*u_bulk.z)); - const Real betaz_lab_bulk = u.z/(gamma_lab_bulk); + const Real betaz_lab_bulk = u_bulk.z/(gamma_lab_bulk); const Real z0_lab = gamma_boost * ( z*(1-beta_boost*betaz_lab_bulk) - PhysConst::c*t*(betaz_lab_bulk-beta_boost) ); // If the particle is not within the lab-frame zmin, zmax, etc. |