Appearance
t0 elliptic solves on FLAIL
| Cases | Issues | Type | Backends | Figure | Regression |
|---|---|---|---|---|---|
rmf-pec-t0, rmf-open-t0, pic-pec-t0, pic-open-t0 | #84 (E3b, E3c; #105 open) | P | CPU, FNL | no | the four cases (digest + residuals, CPU and FNL) |
Case and scope
At
- electric:
, then ; - magnetic:
for each component, then .
These four cases are the first that enter the t0 solves; before them none of the 18 regression cases did. Two face kinds are covered:
- PEC (E3b): the potential is odd about the faces,
even about the faces normal to and odd about the others; - exact/open, PRISM's
Neumann(E3c): every ghost layer holds the continuum free-space potential of the source,( FLAIL_BC_FREE_GHOSTS), summed on rank 0 over the gathered source.
What the cases catch:
- a t0 field that does not satisfy the constraint it was solved for (Gauss's law,
); - a fall-back to the legacy smoother: the log must report every FLAIL solve;
- a t0 field that depends on the rank count: the legacy smoother summed the free-space potential over each rank's own blocks.
The PEC electric solve has one exact null mode. PRISM's centred divergence and gradient of order
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Equations | Maxwell, SI (rmf-*, 4 rectangular coils carrying their current at t0, time_delay = 0); PIC (pic-*, a plasma box) | models; the fields at t0 |
| Space | centred finite differences of order 6, ngc = 6 | adam_fdv_operators_library.F90 |
| t0 solve | FLAIL; PEC → FLAIL_BC_DIRICHLET (FLAIL_BC_NEUMANN (normal FLAIL_BC_FREE_GHOSTS | impose_pic_fields_time_zero, solve_time_zero, adam_prism_common_object.F90; adam_flail_object.F90; hazards |
| PIC deposit | TSC, non-conserving current (the conserving CPU deposit is single-block, single-rank) | particle-in-cell |
| Time | SSP Runge–Kutta (5,4), CFL 0.5; the oracles read the step-0 checkpoint | — |
Initial and boundary conditions
| Case | Domain (m) | Grid | Faces | Source | Steps |
|---|---|---|---|---|---|
rmf-pec-t0 | 64 blocks of | PEC | 4 AC coils at t0 | 10 | |
rmf-open-t0 | 64 blocks of | Neumann | the same coils, reaching the faces | 10 | |
pic-pec-t0 | 8 blocks of | PEC | plasma box, density | 4 | |
pic-open-t0 | 64 blocks of | Neumann | the same plasma | 4 |
Each check.sh runs its case at 1 and 2 ranks. The open cases use 64 blocks so that 2 ranks split them 32/32; pic-pec-t0 has 8 blocks, all on rank 0 at t0, so its rank-count leg checks the empty rank only.
Input files
| File | Role |
|---|---|
src/tests/prism/regression/{rmf,pic}-{pec,open}-t0/input.ini | the cases |
src/tests/prism/regression/{rmf,pic}-{pec,open}-t0/check.sh | the runs at 1 and 2 ranks and the oracle calls (--build; PRISM_EXE, PRISM_PY) |
src/tests/prism/regression/t0_elliptic.py | the oracles: gauss, open, divb, same |
src/tests/poisson/test_flail_bc.F90 (E3a, mode test-flail-bc-gnu) | PRISM's operators applied to FLAIL's solution reproduce the source to |
bash
cd src/tests/prism/regression/pic-pec-t0 && ./check.sh # CPU
PRISM_EXE=$PWD/../../../../../exe/adam_prism_fnl ./check.sh # FNLResults
Each case asserts, at 1 and 2 ranks: the run exits 0; the log reports the expected number of FLAIL t0 solve lines (3 for the rmf cases, pic cases,
| Case | Oracle | Bound | CPU | FNL |
|---|---|---|---|---|
rmf-pec-t0 | divb: max | |||
rmf-pec-t0 | same: | 0 | 0 | |
rmf-open-t0 | divb, beyond 3 cells of the faces | |||
rmf-open-t0 | same: | 0 | 0 | |
pic-pec-t0 | gauss: max | |||
pic-pec-t0 | checkerboard share | — | ||
pic-pec-t0 | same: | 0 | 0 | |
pic-open-t0 | open: max | |||
pic-open-t0 | same: | 0 | 0 |
Against the legacy smoother FLAIL replaced (measured in #84):
| Case | Legacy smoother | FLAIL |
|---|---|---|
pic-pec-t0 | ||
rmf-pec-t0 | stopped after 11 iterations with max | reference |
rmf-open-t0 | rank-independent | |
pic-open-t0 | rank-independent |
Related pages: the PIC cases run the conserving deposit with the same t0 solves; refusals holds the refusal of a t0 solve on a refined grid.
Findings
- With PEC faces Gauss's law holds to round-off up to the checkerboard mode, the one component of
no can carry with PRISM's centred operators ( of max on pic-pec-t0). at t0 follows from whatever the solve's accuracy; the rank-count leg is the one that tests the solve. - With open faces the operator is nonsingular, and Gauss's law holds to the CG tolerance on the cells that read no field-BC ghost. Nearer the faces the divergence reads ghosts that PRISM's own
Neumannfield BC rewrote, so the oracles skip 3 cells. - The free-space ghosts are summed over the whole domain on rank 0: the t0 field no longer depends on the rank count.