run_solver_steps Subroutine

public subroutine run_solver_steps(ctx, max_steps, steps_taken, finished, is_ok, message, on_progress, every_steps, every_seconds)

Advance the main time loop by at most max_steps iterations.

This polling-friendly entry point preserves checkpointing and live-snapshot behaviour while allowing adapters to inspect the state between calls. Polling is the canonical live-update path for the library ABI; the snapshot-file writes remain as a compatibility side channel. Lightweight iteration timing (iter_s, elapsed_s) is always tracked so log lines stay meaningful even when do_timing is .false.; the heavier end-of-run summary and fine-grained region timers remain opt-in. The loop skeleton itself lives in run_step_engine (Q2c); everything 1D arrives there through the ctx1d_* type-bound hooks below.

Arguments

Type IntentOptional Attributes Name
type(solver_run_context_t), intent(inout) :: ctx
integer, intent(in) :: max_steps
integer, intent(out) :: steps_taken
logical, intent(out) :: finished
logical, intent(out), optional :: is_ok
character(len=*), intent(out), optional :: message
procedure(progress_callback_i), optional :: on_progress
integer, intent(in), optional :: every_steps
real(kind=wp), intent(in), optional :: every_seconds