Read a checkpoint file and restore solver state.
Validates the magic number, version, grid size, and equation count against the current state to catch mismatches early.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state |
Solver state with ub already allocated (from setup_solver). |
||
| character(len=*), | intent(in) | :: | fname |
Path to the checkpoint file (or 'latest_checkpoint'). |
||
| real(kind=wp), | intent(out) | :: | t |
Restored simulation time [s]. |
||
| integer, | intent(out) | :: | iter |
Restored iteration count. |
||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |