From 7220ab302e9a62116f52f0345018d48d5884bca4 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 6 Nov 2019 02:43:07 +0100 Subject: fixed bug --- Source/Particles/PhotonParticleContainer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Particles/PhotonParticleContainer.cpp') 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, -- cgit v1.2.3