8#ifndef LINEAR_BREIT_WHEELER_UTIL_H
9#define LINEAR_BREIT_WHEELER_UTIL_H
44 void LinearBreitWheelerComputeProductMomenta (
79 const amrex::ParticleReal cos_ang = (p1x_in*p2x_in+p1y_in*p2y_in+p1z_in*p2z_in)/(p1_in*p2_in);
110 if ( vc_sq > std::numeric_limits<amrex::ParticleReal>::min() )
117 p1x_out = px_star + vcx * factor;
118 p1y_out = py_star + vcy * factor;
119 p1z_out = pz_star + vcz * factor;
134 u1x_out = p1x_out/me;
135 u1y_out = p1y_out/me;
136 u1z_out = p1z_out/me;
137 u2x_out = p2x_out/me;
138 u2y_out = p2y_out/me;
139 u2z_out = p2z_out/me;
#define AMREX_GPU_HOST_DEVICE
amrex_particle_real ParticleReal
AMREX_GPU_HOST_DEVICE AMREX_INLINE void RandomizeVelocity(amrex::ParticleReal &ux, amrex::ParticleReal &uy, amrex::ParticleReal &uz, const amrex::ParticleReal vp, amrex::RandomEngine const &engine)
Function to perform scattering of a particle that results in a random velocity vector with given magn...
Definition ParticleUtils.H:217
constexpr auto c
vacuum speed of light [m/s]
Definition constant.H:153
constexpr auto c2
square of the vacuum speed of light [m^2/s^2]
Definition constant.H:214
constexpr auto inv_c2_v
inverse of the square of the vacuum speed of light [s^2/m^2] (variable template)
Definition constant.H:146
constexpr auto m_e
electron mass [kg]
Definition constant.H:165
constexpr auto c2_v
square of the vacuum speed of light [m^2/s^2] (variable template)
Definition constant.H:138
constexpr auto inv_c2
inverse of the square of the vacuum speed of light [s^2/m^2]
Definition constant.H:220
constexpr T powi(T x) noexcept