Skip to content

C8 Companion states ​

IDGroupTypeBackendsFigureProgram
C8ContractsCCPU (gfortran, nvfortran, ifx; R8P and R4P, the orders in R8P); GPUnoselah_test_companion, selah_test_rk_particles

Case and scope ​

A companion (initialize_companion) is a stepper with the field stepper's scheme, form and stages on q, for a state that advances with the field in the same step, its residual coupled both ways inside each stage: PRISM's particles and PML auxiliary fields (guide). The case checks that the pair is the coupled system's Runge–Kutta step, bitwise; that the companion's active extent and component range are the box's, whatever its capacity and layout; and the properties of particles pushed this way.

Setup ​

ItemValue
Coupled systema field y and 4 particles (z1,z2,c): y′=−y+meani(ciz1,i2), z1′=z2, z2′=−c(1+y)z1, c constant
Formsevery Runge–Kutta scheme in the Butcher form (and with stages_on_q), ssp-33 two-register, lsrk-54 2N, ssp-104 Ketcheson
One statethe same steps with y, z1, z2 as one state of one stepper
Extentcapacity 8 particles, 8, 5, 6 active in turn; the companion rebuilt between steps 1 and 2
Layoutsparticles as (3, np) (components first) and as (np, 3) (a scalar rank-2 field)
Particlesx′=v, v′=E+v×B, B=ωz^: gyration (E=0), E×B drift (E⊥B), on a companion of a field stepper

Program ​

bash
./exe/selah_test_companion ; ./exe/selah_test_rk_particles

Results ​

CheckResult
field and companion against one state, 8 stepsbitwise, every scheme and form
(np, 3) against (3, np)bitwise
n of 8 particles active against a companion of exactly n; the rebuildbitwise; the particles past n and the constant component untouched
the coupled system's order1.01, 2.00, 2.99, 3.99, 4.00, 3.99, 3.00, 4.00 (euler … lsrk-54), the same in the low-storage forms
gyration: wn=R(−iωΔt)nw0 (R by a complex triangular solve of the tableau)to 10−14
stability: ωΔt=βI(1−10−6) / βI(1+10−3), 104 stepsno growth / growth (R8P); euler and ssp-22 grow at 0.1
E×B: started at vEvE kept bit for bit (4.7e-15 in the Ketcheson form, whose (un+9q1)/25 rounds); the position advances by ΔtvE per step

Findings ​

  • A companion needs no code of its own in SELAH: the stepper's box already holds an active extent, a component range and either layout. What is new is the guarantee that the pair is the coupled step (bitwise) and the call that binds a companion to its field's scheme.
  • Gyration energy decays in every stable scheme (|R(iωΔt)|<1: 0.887 over 50 steps of ωΔt=0.5 for ssp-33, 0.998 for ssp-54); euler and ssp-22 gain energy at any step. A two-level pusher (Boris) keeps it exactly.

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