C8 Companion states
| ID | Group | Type | Backends | Figure | Program |
|---|---|---|---|---|---|
| C8 | Contracts | C | CPU (gfortran, nvfortran, ifx; R8P and R4P, the orders in R8P); GPU | no | selah_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
| Item | Value |
|---|---|
| Coupled system | a field |
| Forms | every Runge–Kutta scheme in the Butcher form (and with stages_on_q), ssp-33 two-register, lsrk-54 2N, ssp-104 Ketcheson |
| One state | the same steps with |
| Extent | capacity 8 particles, 8, 5, 6 active in turn; the companion rebuilt between steps 1 and 2 |
| Layouts | particles as (3, np) (components first) and as (np, 3) (a scalar rank-2 field) |
| Particles |
Program
bash
./exe/selah_test_companion ; ./exe/selah_test_rk_particlesResults
| Check | Result |
|---|---|
| field and companion against one state, 8 steps | bitwise, every scheme and form |
(np, 3) against (3, np) | bitwise |
| bitwise; the particles past | |
| the coupled system's order | 1.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: | to |
| stability: | no growth / growth (R8P); euler and ssp-22 grow at 0.1 |
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 (
: 0.887 over 50 steps of 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.