8 #ifndef WARPX_PARTICLES_PUSHER_UPDATEPOSITIONPHOTON_H_ 9 #define WARPX_PARTICLES_PUSHER_UPDATEPOSITIONPHOTON_H_ 14 #include <AMReX_FArrayBox.H> 15 #include <AMReX_REAL.H> 21 AMREX_GPU_HOST_DEVICE AMREX_INLINE
23 amrex::ParticleReal&
x, amrex::ParticleReal& y, amrex::ParticleReal&
z,
24 const amrex::ParticleReal
ux,
const amrex::ParticleReal uy,
const amrex::ParticleReal
uz,
25 const amrex::Real dt )
31 const amrex::Real u_norm = std::sqrt(ux*ux + uy*uy + uz*uz);
32 const amrex::Real c_over_umod = (u_norm == 0._rt) ? 0._rt: PhysConst::c/u_norm;
35 x += ux * c_over_umod * dt;
36 #if (defined WARPX_DIM_3D) || (defined WARPX_DIM_RZ) // RZ pushes particles in 3D 37 y += uy * c_over_umod * dt;
39 amrex::ignore_unused(y);
41 z += uz * c_over_umod * dt;
44 #endif // WARPX_PARTICLES_PUSHER_UPDATEPOSITION_H_
def x
Definition: read_lab_particles.py:25
def uz
Definition: read_lab_particles.py:29
def z
Definition: read_lab_particles.py:26
AMREX_GPU_HOST_DEVICE AMREX_INLINE void UpdatePositionPhoton(amrex::ParticleReal &x, amrex::ParticleReal &y, amrex::ParticleReal &z, const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz, const amrex::Real dt)
Push the position of a photon particle over one timestep, given the value of its momenta ux...
Definition: UpdatePositionPhoton.H:22
def ux
Definition: read_lab_particles.py:28