selah_pushers
SELAH, L1: the two-level particle pushers (Boris, relativistic Boris, Vay, Higuera–Cary).
A staggered leapfrog for charged particles in given fields: the positions at t^n, the velocities (or the momenta per unit mass u = gamma v) at t^(n-1/2), the fields E and B gathered by the caller at the positions x^n. One call advances every particle by one step dt: v (or u) to t^(n+1/2), then x to t^(n+1). These are not Runge–Kutta stage schemes (no tableau, no registers): a kernel of their own. The theory and the sources: notes/companions-pushers-pml.md.
| Pusher | State | Defining equation (u bar = (u^{n+1/2} + u^{n-1/2})/2) | Properties |
|---|---|---|---|
PUSHER_BORIS | v | (v^+ - v^-)/dt = (q/m)(E + v bar x B) | volume-preserving; |v| exact in pure B; ExB exact |
PUSHER_BORIS_RELATIVISTIC | u | (u^+ - u^-)/dt = (q/m)(E + u bar x B / gamma(u^- + qh E)) | volume-preserving; wrong ExB velocity, fails E + v x B = 0 |
PUSHER_VAY | u | (u^+ - u^-)/dt = (q/m)(E + (v^+ + v^-)/2 x B) | exact for E + v x B = 0; not volume-preserving |
PUSHER_HIGUERA_CARY | u | (u^+ - u^-)/dt = (q/m)(E + u bar x B / gamma(u bar)) | volume-preserving; exact for E + v x B = 0 and the ExB drift |
SI units: F = q (E + v x B), with q/m per particle from two components of the particle array (iq, im); c the speed of light (relativistic pushers; a Gaussian-units caller passes B/c). The particle array holds a particle per column (LAYOUT_V_FIRST, p(ncomp, np), ADAM's host layout) or per row (LAYOUT_V_LAST, p(np, ncomp), its device layout); the positions at components ix..ix+2, the velocities or momenta at iv..iv+2. The fields e, b hold three components per particle in the same layout. The first n particles are pushed; the rest are untouched.
Source: src/lib/selah_pushers.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
PUSHER_BORIS | integer(kind=I4P) | parameter | Boris (1970), non-relativistic. |
PUSHER_BORIS_RELATIVISTIC | integer(kind=I4P) | parameter | Boris, relativistic (u = gamma v). |
PUSHER_VAY | integer(kind=I4P) | parameter | Vay (2008). |
PUSHER_HIGUERA_CARY | integer(kind=I4P) | parameter | Higuera & Cary (2017). |
Subroutines
selah_push
Push the first n particles of p by one step dt in the fields e, b (gathered at their positions).
subroutine selah_push(pusher, layout, n, dt, ix, iv, iq, im, p, e, b, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pusher | integer(kind=I4P) | in | PUSHER_*. | |
layout | integer(kind=I4P) | in | LAYOUT_V_FIRST (p(ncomp, np)) or LAYOUT_V_LAST (p(np, ncomp)). | |
n | integer(kind=I4P) | in | Particles pushed (the first n). | |
dt | real(kind=R_P) | in | Time step. | |
ix | integer(kind=I4P) | in | First components of the position and of the velocity (momentum). | |
iv | integer(kind=I4P) | in | First components of the position and of the velocity (momentum). | |
iq | integer(kind=I4P) | in | Components of the charge and of the mass. | |
im | integer(kind=I4P) | in | Components of the charge and of the mass. | |
p | real(kind=R_P) | inout | Particles. | |
e | real(kind=R_P) | in | Electric field at the particles, (3, np) or (np, 3). | |
b | real(kind=R_P) | in | Magnetic field at the particles, (3, np) or (np, 3). | |
c | real(kind=R_P) | in | optional | Speed of light (relativistic pushers; default 1). |
Call graph