You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: refactor convergence module to match toolchain style
Apply the toolchain conventions (BenchCase pattern, MFCException, typing.List)
to convergence.py and trim newcomer-hostile bits:
- Replace dict-based spec with @dataclasses.dataclass ConvergenceSpec —
fields and types are visible at the top of the module instead of scattered
across .get(default) calls inside each runner.
- Drop the _RUNNERS string registry; spec.runner is now a Callable, so
cases.py just stores the function reference directly (run_h_sweep,
run_dt_sweep, run_sod_l1).
- Drop io.StringIO + redirect_stdout; runners build a list of lines and
'\n'.join it. No stdlib magic.
- Rename runners to verb-noun (run_h_sweep / run_dt_sweep / run_sod_l1).
- Use common.MFCException for run failures (matches the rest of toolchain).
- Add a module docstring that names the three flavours up front.
- Rename time_mode='cell_shift' string flag → cell_shift int (0=period).
- Rename temporal-spec field 'N' → 'fixed_N' for clarity.
- Collapse cases.py registration into one loop driven by a small table of
(schemes, dim_label, case_path, ndim, cons_vars, cell_shift, ppn) tuples.
Same numerical results pre/post (verified 1D suite + Sod WENO1 + Temporal RK1).
0 commit comments