8 #ifndef WARPX_PARTICLES_PUSHER_UPDATEPOSITIONPHOTON_H_
9 #define WARPX_PARTICLES_PUSHER_UPDATEPOSITIONPHOTON_H_
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 )
27 using namespace amrex::literals;
31 const amrex::ParticleReal u_norm = std::sqrt(ux*ux + uy*uy + uz*uz);
32 const amrex::ParticleReal c_over_umod = (u_norm == 0._prt) ? 0._prt:
PhysConst::c/u_norm;
35 #if (AMREX_SPACEDIM >= 2)
36 x += ux * c_over_umod *
dt;
40 #if (defined WARPX_DIM_3D) || (defined WARPX_DIM_RZ)
41 y += uy * c_over_umod *
dt;
45 z += uz * c_over_umod *
dt;
#define AMREX_GPU_HOST_DEVICE
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 y
Definition: Excitation_Flag_Generator.py:76
def x
Formats datastring to remove "+" at the end of the string #####.
Definition: Excitation_Flag_Generator.py:75
def z
Definition: Excitation_Flag_Generator.py:77
static constexpr auto c
vacuum speed of light [m/s]
Definition: constant.H:44
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ignore_unused(const Ts &...)
int dt
Definition: stencil.py:440