MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_amr_restart.fpp.f90 File Reference

Contains module m_amr_restart. More...

Go to the source code of this file.

Modules

module  m_amr_restart
 AMR fine-level restart I/O: writes/reads the fine-level restart file alongside the level-0 restart (serial per-rank unformatted files, or one shared MPI-IO file under parallel_io).

Functions/Subroutines

impure subroutine m_amr_restart::s_amr_restart_write_serial (t_step)
 Serial: one unformatted file per rank in the level-0 step directory just created by the serial write.
impure subroutine m_amr_restart::s_amr_restart_write_parallel (t_step)
 Parallel: one shared MPI-IO file.
impure subroutine, public m_amr_restart::s_write_amr_restart (t_step)
 Write the fine-level restart file for save step t_step alongside the level-0 restart: the writing rank count, the active block count, and per block its box + level and each rank's fine conservative state. Serial: one unformatted file per rank in its level-0 step directory. Parallel: one shared MPI-IO file (header [-np, nboxes, sys_size, ratio, max level, word bytes], then per block a box+level header, a 4-int ownership record [owner+1, m, n, p], then the ranks' blocks concatenated in rank order). At the same rank count the ownership record must match on read; a different rank count repartitions.
impure subroutine m_amr_restart::s_amr_write_level_sums (t_step)
 Write D/amr_levels.<t_step>.dat: per refined level, its fine cell count and the mean of |q| over its cells for each equation. Puts fine-level data under the golden comparison; the level-0 output only sees it restricted.
impure subroutine, public m_amr_restart::s_read_amr_restart (restored)
 Restore the fine level from the AMR restart file at t_step_start (n_start under cfl_dt), if one exists: rebuild each saved block via s_set_amr_fine_geometry and read the fine state (exact stp round-trip). parallel_io repartitions across rank counts; serial needs the writing rank count. restored = false on a fresh start (the caller prolongs from coarse); a missing file aborts. Collective.
impure subroutine m_amr_restart::s_amr_restart_install_blocks (own)
 Install the restored block set: owners from the regions (or the recorded table), this run's owned slots (freeing stale init slots), then each block's geometry.
impure subroutine m_amr_restart::s_amr_restart_read_serial (file_loc)
 Serial (per-rank files) read: every block's region, level and, where this rank owned it at write (rm >= 0), its fine state. The presence flag is verified against this run's ownership once the owners are rebuilt.
impure subroutine m_amr_restart::s_amr_restart_read_parallel (file_loc)
 Parallel (MPI-IO) read. The writer's rank count sets only the file layout: each block's data is one contiguous chunk, so any rank count can read it; owners are re-assigned and each new owner reads its blocks. At the writer's rank count the file's ownership record must reproduce this run's decomposition.
impure subroutine m_amr_restart::s_amr_restart_check_blocks (nblk)
 The file's block count must fit this run's metadata.
impure subroutine m_amr_restart::s_amr_restart_check_record (k, reg, lvl)
 Corrupt/foreign-file guard for block k's record (box outside the domain, level outside 1..amr_max_level, extent over the block cap). Stores the accepted region and level, which the owner assignment and geometry build key off.

Detailed Description

Contains module m_amr_restart.

Definition in file m_amr_restart.fpp.f90.