Commit 4093d68
Consolidate wave tests: fold correctness tests into convergence binaries (#1978)
### Description
This PR implements the proposal in #1916: each of the five wave
convergence binaries now supports a dual-mode `problem_main()`,
controlled by two TOML flags, `setup.run_convergence` (default `true`)
and `setup.run_sim` (default `false`). The four standalone correctness
binaries (FastWave, SlowWave, AlfvenWaveLinear, HydroWave) are deleted;
their CTets are re-registered against the corresponding convergence
binary with identical test names and labels, so CI coverage is
unchanged.
**Dual-mode design.** The two flags are independent: both can be `true`
simultaneously, in which case the exit status is OR'd. The default
(`run_convergence=true, run_sim=false`) means that bare invocations
(including the existing convergence CTets, which pass no `run_sim` flag)
are entirely backward compatible. The correctness TOMLs (FastWave.toml,
SlowWave.toml, AlfvenWaveLinear.toml, HydroWave.toml, HydroWaveFc.toml)
each get `setup.run_convergence=false` and `setup.run_sim=true`, turning
the correctness path on and the convergence path off.
**Correctness path.** The `run_sim` block reads wave geometry from the
TOML (`setup.num_modes_*`, `setup.angle_between_k_b0`), sets the
GPU-managed globals used by the IC kernel, constructs periodic BCs
explicitly, creates and evolves the simulation, then checks the error.
For the four MHD tests this is `sim.computeErrorNorm() <
setup.error_tol`; for HydroWave it is the fextract-based L1 norm that
the old standalone binary used. FastWave.toml gains the wave geometry
params that the old binary hardcoded (theta=90 deg, one x-mode);
HydroWave.toml gains `stop_time=1.0` and `max_timesteps=20000` that the
old binary hardcoded; HydroWaveFc.toml gains `cfl=0.1` because the old
binary hardcoded `sim.cflNumber_=0.1` and without it the one-step error
at the default CFL=0.3 marginally exceeds the 1e-8 tolerance.
**Convergence path.** The Richardson block is the old `problem_main()`
content, with one addition: `pp.query("nx_start", params.nx_initial)`
exposes the initial resolution as a TOML-overridable parameter alongside
the existing `setup.nx_max`.
I ran all binaries locally in both modes before opening this PR: all ten
test invocations (five binaries x two modes) pass.
### Related issues
- #1916: this PR implements the proposal described there.
- #1959: this PR was enabled by it; the N-dim Richardson extension was a
prerequisite for the dual-mode design to work correctly across 1D/2D/3D
setups.
### Checklist
- [x] I have added a description (see above).
- [x] I have added a link to any related issues (if applicable; see
above).
- [x] I have read the [Contributing
Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md).
- [ ] I have added tests for any new physics that this PR adds to the
code.
- [x] *(For quokka-astro org members)* I have manually triggered the GPU
tests with the magic comment `/azp run`.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 5655af2 commit 4093d68
28 files changed
Lines changed: 602 additions & 1560 deletions
File tree
- .github/workflows
- inputs
- regression
- src/problems
- AlfvenWaveLinearConvergence
- AlfvenWaveLinear
- EntropyWaveConvergence
- FastWaveConvergence
- FastWave
- HydroWaveConvergence
- HydroWave
- SlowWaveConvergence
- SlowWave
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
This file was deleted.
0 commit comments