Advance the 2D time loop by at most max_steps iterations.
The loop skeleton itself lives in run_step_engine (Q2c); everything
2D arrives there through the ctx2d_* type-bound hooks below: identical
dt logic (adaptive via compute_dt_2d, clipped at time_stop),
Kahan-compensated time accumulation (Q2b, matching the 1D loop's F2
block), identical checkpoint and print cadence. After every step the
global L2 residual norm is reduced into ctx % resid_glob (collective;
observation only — no state change, so the CLI output is bit-for-bit
unchanged). The final "odd" iteration log line (when iter is not a
multiple of print_freq) fires exactly once, when the run first
completes — the same output position as before.
Ordering note: within one iteration the shared engine logs the print-
cadence line BEFORE writing the checkpoint (spec §7 micro-deviation #1),
the reverse of this module's pre-Q2c order; both share the same
ctx % iter value, so this is observable only on the (rare) failure
path where a checkpoint write goes fatal after the line has printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_run_context_2d_t), | intent(inout) | :: | ctx | |||
| integer, | intent(in) | :: | max_steps | |||
| integer, | intent(out) | :: | steps_taken | |||
| logical, | intent(out) | :: | finished | |||
| integer, | intent(out) | :: | status | |||
| character(len=*), | intent(out) | :: | message |