diff options
author | 2019-11-06 02:43:07 +0100 | |
---|---|---|
committer | 2019-11-06 02:43:07 +0100 | |
commit | 7220ab302e9a62116f52f0345018d48d5884bca4 (patch) | |
tree | 6a886b16f47382815199984d1a7bf97728a940ed /Source/Particles/PhotonParticleContainer.cpp | |
parent | a1fab0ee7b8e864516d69b66edd1a26bf9f2aefa (diff) | |
download | WarpX-7220ab302e9a62116f52f0345018d48d5884bca4.tar.gz WarpX-7220ab302e9a62116f52f0345018d48d5884bca4.tar.zst WarpX-7220ab302e9a62116f52f0345018d48d5884bca4.zip |
fixed bug
Diffstat (limited to 'Source/Particles/PhotonParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhotonParticleContainer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp index 7d63fff11..001f748d0 100644 --- a/Source/Particles/PhotonParticleContainer.cpp +++ b/Source/Particles/PhotonParticleContainer.cpp @@ -143,14 +143,14 @@ PhotonParticleContainer::EvolveOpticalDepth( amrex::Real* AMREX_RESTRICT p_tau = pti.GetAttribs(particle_comps["tau"]).dataPtr(); - const auto me = PhysConst::m_e; + const auto mec = PhysConst::m_e * PhysConst::c; amrex::ParallelFor( pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { - const ParticleReal px = me * ux[i]; - const ParticleReal py = me * uy[i]; - const ParticleReal pz = me * uz[i]; + const ParticleReal px = mec * ux[i]; + const ParticleReal py = mec * uy[i]; + const ParticleReal pz = mec * uz[i]; bool has_event_happened = evolve_opt( px, py, pz, |