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) via write_cell_row. 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
type(solver_run_context_t), intent(in) :: ctx

Solver context (read-only).