|
WarpX
|
#include "Utils/WarpXConst.H"#include <AMReX.H>#include <AMReX_FArrayBox.H>#include <AMReX_REAL.H>Go to the source code of this file.
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | UpdatePosition (amrex::ParticleReal &x, amrex::ParticleReal &y, amrex::ParticleReal &z, const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz, const amrex::Real dt) |
Push the particle's positions over one timestep, given the value of its momenta ux, uy, uz. This uses the standard leapfrog algorithm x^{n+1} - x^{n} = dt*u^{n+1/2}/gamma^{n+1/2}. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | UpdatePositionImplicit (amrex::ParticleReal &x, amrex::ParticleReal &y, amrex::ParticleReal &z, const amrex::ParticleReal ux_n, const amrex::ParticleReal uy_n, const amrex::ParticleReal uz_n, const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz, const amrex::Real dt) |
Push the particle's positions over one timestep, given the value of its momenta ux, uy, uz. The implicit version is the Crank-Nicolson scheme, x^{n+1} - x^{n} = dt*(u^{n+1} + u^{n})/(gamma^{n+1} + gamma^{n}) See Eqs. 15 and 17 in Chen, JCP 407 (2020) 109228. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void | PositionNorm (amrex::ParticleReal dxp, amrex::ParticleReal dyp, amrex::ParticleReal dzp, amrex::ParticleReal &dxp_save, amrex::ParticleReal &dyp_save, amrex::ParticleReal &dzp_save, amrex::ParticleReal idxg2, amrex::ParticleReal idyg2, amrex::ParticleReal idzg2, amrex::ParticleReal &step_norm, const int iter) |
| Check particle position for convergence. This is used by the theta-implicit and semi-implicit time solvers to obtain a self-consistent time-centered update of the particles for given electric and magnetic fields on the grid. More... | |
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void PositionNorm | ( | amrex::ParticleReal | dxp, |
| amrex::ParticleReal | dyp, | ||
| amrex::ParticleReal | dzp, | ||
| amrex::ParticleReal & | dxp_save, | ||
| amrex::ParticleReal & | dyp_save, | ||
| amrex::ParticleReal & | dzp_save, | ||
| amrex::ParticleReal | idxg2, | ||
| amrex::ParticleReal | idyg2, | ||
| amrex::ParticleReal | idzg2, | ||
| amrex::ParticleReal & | step_norm, | ||
| const int | iter | ||
| ) |
Check particle position for convergence. This is used by the theta-implicit and semi-implicit time solvers to obtain a self-consistent time-centered update of the particles for given electric and magnetic fields on the grid.
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void UpdatePosition | ( | amrex::ParticleReal & | x, |
| amrex::ParticleReal & | y, | ||
| amrex::ParticleReal & | z, | ||
| const amrex::ParticleReal | ux, | ||
| const amrex::ParticleReal | uy, | ||
| const amrex::ParticleReal | uz, | ||
| const amrex::Real | dt | ||
| ) |
Push the particle's positions over one timestep, given the value of its momenta ux, uy, uz. This uses the standard leapfrog algorithm x^{n+1} - x^{n} = dt*u^{n+1/2}/gamma^{n+1/2}.
| AMREX_GPU_HOST_DEVICE AMREX_INLINE void UpdatePositionImplicit | ( | amrex::ParticleReal & | x, |
| amrex::ParticleReal & | y, | ||
| amrex::ParticleReal & | z, | ||
| const amrex::ParticleReal | ux_n, | ||
| const amrex::ParticleReal | uy_n, | ||
| const amrex::ParticleReal | uz_n, | ||
| const amrex::ParticleReal | ux, | ||
| const amrex::ParticleReal | uy, | ||
| const amrex::ParticleReal | uz, | ||
| const amrex::Real | dt | ||
| ) |
Push the particle's positions over one timestep, given the value of its momenta ux, uy, uz. The implicit version is the Crank-Nicolson scheme, x^{n+1} - x^{n} = dt*(u^{n+1} + u^{n})/(gamma^{n+1} + gamma^{n}) See Eqs. 15 and 17 in Chen, JCP 407 (2020) 109228.