|
WarpX
|
#include "Particles/WarpXParticleContainer.H"#include "Particles/Pusher/GetAndSetPosition.H"#include <ablastr/particles/NodalFieldGather.H>#include <AMReX_AmrParticles.H>#include <AMReX_ParIter.H>#include <AMReX_Gpu.H>#include <AMReX_REAL.H>Go to the source code of this file.
Enumerations | |
| enum struct | ConvertDirection { WarpX_to_SI , SI_to_WarpX } |
Functions | |
| template<typename T_ParticleContainer> | |
| void | particlesConvertUnits (ConvertDirection convert_direction, T_ParticleContainer *pc, amrex::ParticleReal const mass) |
| void | storePhiOnParticles (WarpXParticleContainer::Base &tmp, ElectrostaticSolverAlgo electrostatic_solver_id, bool is_full_diagnostic) |
| void | storeFieldOnParticles (WarpXParticleContainer::Base &tmp, bool is_full_diagnostic, bool save_Ex, bool save_Ey, bool save_Ez, bool save_Bx, bool save_By, bool save_Bz) |
| Gathers fields from a MultiFab to the macroparticles. Adds a runtime component of the particle container to store it. | |
|
strong |
| 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).
| T_ParticleContainer | a WarpX particle container or AmrParticleContainer |
| convert_direction | convert to or from SI |
| pc | the particle container to manipulate |
| mass | the particle rest mass to use for conversion |
| void storeFieldOnParticles | ( | WarpXParticleContainer::Base & | tmp, |
| bool | is_full_diagnostic, | ||
| bool | save_Ex, | ||
| bool | save_Ey, | ||
| bool | save_Ez, | ||
| bool | save_Bx, | ||
| bool | save_By, | ||
| bool | save_Bz ) |
Gathers fields from a MultiFab to the macroparticles. Adds a runtime component of the particle container to store it.
| tmp | The particle container on which to store the gathered field |
| is_full_diagnostic | Whether this diagnostic is a full diagnostic |
| save_Ex | Whether the Ex field is saved |
| save_Ey | Whether the Ex field is saved |
| save_Ez | Whether the Ex field is saved |
| save_Bx | Whether the Ex field is saved |
| save_By | Whether the Ex field is saved |
| save_Bz | Whether the Ex field is saved |
| void storePhiOnParticles | ( | WarpXParticleContainer::Base & | tmp, |
| ElectrostaticSolverAlgo | electrostatic_solver_id, | ||
| bool | is_full_diagnostic ) |
Gathers phi (electrostatic potential) from a MultiFab to the macroparticles. Adds a runtime component of the particle container to store it.
| 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 |