Go to the source code of this file.
◆ ConvertDirection
Enumerator |
---|
WarpX_to_SI | |
SI_to_WarpX | |
◆ particlesConvertUnits()
template<typename T_ParticleContainer >
void particlesConvertUnits |
( |
ConvertDirection |
convert_direction, |
|
|
T_ParticleContainer * |
pc, |
|
|
amrex::ParticleReal const |
mass |
|
) |
| |
Convert particle momentum to/from SI
Particle momentum is defined as gamma*velocity, which is neither SI mass*gamma*velocity nor normalized gamma*velocity/c. This converts momentum to SI units (or vice-versa) to write SI data to file. Photons are a special case, since particle momentum is defined as (photon_energy/(m_e * c) ) * u, where u is the photon direction (a unit vector).
- Template Parameters
-
T_ParticleContainer | a WarpX particle container or AmrParticleContainer |
- Parameters
-
convert_direction | convert to or from SI |
pc | the particle container to manipulate |
mass | the particle rest mass to use for conversion |
◆ storePhiOnParticles()
Gathers phi (electrostatic potential) from a MultiFab to the macroparticles. Adds a runtime component of the particle container to store it.
- Parameters
-
tmp | the particle container on which to store the gathered field |
electrostatic_solver_id | the type of electrostatic solver used |
is_full_diagnostic | whether this diagnostic is a full diagnostic |