write_snapshot Subroutine

private subroutine write_snapshot(ctx)

Write a live snapshot of the current solution to snapshot_file. The file is overwritten on each call. A header comment records the current iteration and time; subsequent rows are (x, ρ, u, p) in '(4ES20.12)' format. Open/write failures are logged as warnings rather than fatal errors so that a snapshot glitch does not abort the run. This file path is retained for compatibility with legacy file-watching tooling; new integrations should prefer the polling session/API surface.

Arguments

Type IntentOptional Attributes Name
class(solver_run_context_t), intent(inout) :: ctx

Solver context (gather_buf is updated; all other fields are read-only).