WarpX
Loading...
Searching...
No Matches
Algorithms Namespace Reference

Functions

template<typename T = amrex::ParticleReal>
AMREX_GPU_HOST_DEVICE AMREX_INLINEKineticEnergy (const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz, const amrex::ParticleReal mass)
 Computes the kinetic energy of a particle. This method should not be used with photons.
 
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.
 

Function Documentation

◆ KineticEnergy()

template<typename T = amrex::ParticleReal>
AMREX_GPU_HOST_DEVICE AMREX_INLINE T 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. This method should not be used with photons.

Template Parameters
Tfloating-point type to be used in internal calculations (by default equal to amrex::ParticleReal)
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)