Skip to content

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.

PusherStateDefining equation (u bar = (u^{n+1/2} + u^{n-1/2})/2)Properties
PUSHER_BORISv(v^+ - v^-)/dt = (q/m)(E + v bar x B)volume-preserving; |v| exact in pure B; ExB exact
PUSHER_BORIS_RELATIVISTICu(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_VAYu(u^+ - u^-)/dt = (q/m)(E + (v^+ + v^-)/2 x B)exact for E + v x B = 0; not volume-preserving
PUSHER_HIGUERA_CARYu(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 ​

NameTypeAttributesDescription
PUSHER_BORISinteger(kind=I4P)parameterBoris (1970), non-relativistic.
PUSHER_BORIS_RELATIVISTICinteger(kind=I4P)parameterBoris, relativistic (u = gamma v).
PUSHER_VAYinteger(kind=I4P)parameterVay (2008).
PUSHER_HIGUERA_CARYinteger(kind=I4P)parameterHiguera & 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).

fortran
subroutine selah_push(pusher, layout, n, dt, ix, iv, iq, im, p, e, b, c)

Arguments

NameTypeIntentAttributesDescription
pusherinteger(kind=I4P)inPUSHER_*.
layoutinteger(kind=I4P)inLAYOUT_V_FIRST (p(ncomp, np)) or LAYOUT_V_LAST (p(np, ncomp)).
ninteger(kind=I4P)inParticles pushed (the first n).
dtreal(kind=R_P)inTime step.
ixinteger(kind=I4P)inFirst components of the position and of the velocity (momentum).
ivinteger(kind=I4P)inFirst components of the position and of the velocity (momentum).
iqinteger(kind=I4P)inComponents of the charge and of the mass.
iminteger(kind=I4P)inComponents of the charge and of the mass.
preal(kind=R_P)inoutParticles.
ereal(kind=R_P)inElectric field at the particles, (3, np) or (np, 3).
breal(kind=R_P)inMagnetic field at the particles, (3, np) or (np, 3).
creal(kind=R_P)inoptionalSpeed of light (relativistic pushers; default 1).

Call graph

GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice