WarpX
Functions | Variables
Algorithms Namespace Reference

Functions

AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::ParticleReal KineticEnergy (const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz, const amrex::ParticleReal mass)
 Computes the kinetic energy of a particle. Below a threshold for the Lorentz factor (gamma_relativistic_threshold) it uses a Taylor expansion instead of the full relativistic expression. This method should not be used with photons. More...
 
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::ParticleReal KineticEnergyPhotons (const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz)
 Computes the kinetic energy of a photon. More...
 

Variables

static constexpr auto gamma_relativistic_threshold
 

Function Documentation

◆ KineticEnergy()

AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::ParticleReal Algorithms::KineticEnergy ( const amrex::ParticleReal  ux,
const amrex::ParticleReal  uy,
const amrex::ParticleReal  uz,
const amrex::ParticleReal  mass 
)

Computes the kinetic energy of a particle. Below a threshold for the Lorentz factor (gamma_relativistic_threshold) it uses a Taylor expansion instead of the full relativistic expression. This method should not be used with photons.

Parameters
[in]uxx component of the particle momentum (code units)
[in]uyy component of the particle momentum (code units)
[in]uzz component of the particle momentum (code units)
[in]massmass of the particle (in S.I. units)
Returns
the kinetic energy of the particle (in S.I. units)

◆ KineticEnergyPhotons()

AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::ParticleReal Algorithms::KineticEnergyPhotons ( const amrex::ParticleReal  ux,
const amrex::ParticleReal  uy,
const amrex::ParticleReal  uz 
)

Computes the kinetic energy of a photon.

Parameters
[in]uxx component of the particle momentum (code units)
[in]uyy component of the particle momentum (code units)
[in]uzz component of the particle momentum (code units)
Returns
the kinetic energy of the photon (in S.I. units)

Variable Documentation

◆ gamma_relativistic_threshold

constexpr auto Algorithms::gamma_relativistic_threshold
static
Initial value:
=
static_cast<amrex::ParticleReal>(1.005)