|
MFC
Exascale flow solver
|
Writes solution data, run-time stability diagnostics (ICFL, VCFL, CCFL, Rc), and probe/center-of-mass files. More...
Functions/Subroutines | |
| impure subroutine, public | s_write_data_files (q_cons_vf, q_t_sf, q_prim_vf, t_step, bc_type, beta) |
| Write data files. Dispatch subroutine that replaces procedure pointer. | |
| impure subroutine, public | s_open_run_time_information_file |
| Open the run-time information file and write the stability criteria table header. | |
| impure subroutine, public | s_open_probe_files |
| Open flow probe data files for writing. | |
| impure subroutine, public | s_write_run_time_information (q_prim_vf, t_step) |
| Write stability criteria extrema to the run-time information file at the given time step. | |
| impure subroutine | s_report_icfl_violation (q_prim_vf) |
| Locate the grid cell responsible for an ICFL violation on this rank and report its state plus the nearest immersed-boundary particles, to aid debugging stability failures in particle-laden high-Mach cases. | |
| impure subroutine, public | s_write_serial_data_files (q_cons_vf, q_t_sf, q_prim_vf, t_step, bc_type, beta) |
| Write grid and conservative variable data files in serial format. | |
| impure subroutine, public | s_write_parallel_data_files (q_cons_vf, t_step, beta, q_t_sf) |
| Write grid and conservative variable data files in parallel via MPI I/O. | |
| subroutine | s_write_serial_ib_data (time_step) |
| Write immersed boundary marker data to a serial (per-processor) unformatted file. | |
| subroutine | s_write_parallel_ib_data (time_step) |
| Write immersed boundary marker data in parallel using MPI I/O. | |
| subroutine, public | s_write_ib_data_file (time_step) |
| Dispatch immersed boundary data output to the serial or parallel writer. | |
| subroutine | s_write_parallel_ib_state (t_step) |
| Writes the IB state information out to file. | |
| subroutine | s_write_serial_ib_state (t_step) |
| Write IB state data to a per-timestep serial (unformatted) file. | |
| impure subroutine, public | s_write_ib_history (t_step) |
| Record every immersed body's force, torque and kinematics (D/ib_forces.dat, ib_force_wrt with ib_state_wrt) and its mass and heat exchange (D/ib_heat.dat, ib_heat_wrt) for this step. | |
| impure subroutine | s_write_ib_record (unit, row, gid, fields) |
| Write body gid's record in the given row. The format is fixed width by construction: every ES descriptor right-justifies in its field, including for negatives, three-digit exponents, NaN and Inf, so a record is always 10 + 18*size(fields) characters plus its newline. That is what lets a rank write at a computed byte offset, with no gather and no per-rank shards. | |
| pure character(len=32) function | f_ib_rec_fmt (nf) |
| Record format for nf reals after the body id. | |
| impure subroutine | s_open_ib_history (unit, stem, nf) |
| Open the shared history file D/<stem>.dat of nf-real records. Done once for the run. | |
| impure subroutine, public | s_close_ib_history |
| Close the history files. Nothing is buffered, so there is nothing to flush first. | |
| impure subroutine, public | s_write_ib_state_file (time_step) |
| Writes IB state records to restart_data/ib_state.dat. Called on every rank. | |
| impure subroutine | s_write_centroid_offsets (step) |
| Write each global patch's centroid_offset to restart_data/ib_offset_<step>.dat, so a restart continues about the same centre of mass instead of re-measuring it from the body voxelised at the restart attitude. Collective. | |
| impure subroutine, public | s_write_probe_files (t_step, q_cons_vf, accel_mag) |
| Write flow probe data at the current time step. | |
| impure subroutine, public | s_close_run_time_information_file |
| Write footer with stability criteria extrema and run-time to the information file, then close it. | |
| impure subroutine, public | s_close_probe_files |
| Closes probe files. | |
| impure subroutine, public | s_initialize_data_output_module |
| Initialize the data output module. | |
| impure subroutine, public | s_finalize_data_output_module |
| Module deallocation and/or disassociation procedures. | |
| impure subroutine, public | s_initialize_lag_output (save_count, qtime) |
| Create D/, open the Lagrangian output files, and write the initial output, from the restart point (save_count, qtime). | |
| impure subroutine, public | s_write_lag_particle_evol_if_due (stage) |
| Append to the particle evolution file before an RK stage: at the first stage of t = 0, and at the last stage once mytime reaches the next t_save multiple. | |
| impure subroutine, public | s_write_lag_step_output () |
| Append the per-step Lagrangian output after the last RK stage commits the step. | |
| impure subroutine, public | s_write_lag_save_data (save_count) |
| Write the Lagrangian restart file, and the bubble statistics, for save save_count. The caller syncs the state to the host. | |
| impure subroutine | s_close_lag_output () |
| Close the Lagrangian output files. | |
| impure subroutine, public | s_create_d_dir () |
| Create case_dir/D on rank 0 if it does not exist. | |
| impure subroutine | s_open_lag_evol (lag_kind, width, headers) |
| Open this rank's evolution file D/lag_<lag_kind>evol<rank>.dat: on a fresh start replace it and write the column headers (first header width 14, the others width), on a restart append to it. | |
| impure subroutine | s_open_void_evol |
| Open D/voidfraction.dat on rank 0, appending if it exists. | |
| impure subroutine | s_write_void_evol (qtime, alpha_f, charwidth) |
| Append the cloud's average and maximum Lagrangian volume fraction 1 - alpha_f and its total volume at qtime to D/voidfraction.dat. The average is over the cells the cloud occupies only. | |
| impure subroutine | s_write_lag_particle_evol (qtime) |
| Append each local particle's position, velocity, force, radius and fluid state at the particle to the evolution file. | |
| impure subroutine | s_write_lag_bubble_evol (qtime) |
| Write on each time step the changes of the lagrangian bubbles. | |
| impure subroutine | s_open_lag_bubble_stats () |
| Open this rank's bubble statistics file D/stats_lag_bubbles_<rank>.dat, appending if it exists. | |
| impure subroutine | s_write_lag_bubble_stats () |
| Write the maximum and minimum radius of each bubble. | |
| impure subroutine | s_write_restart_lag_particles (t_step) |
| Write the particles in this rank's physical domain to restart_data/lustre_lag_particles_<t_step>.dat, in the bubble column layout so post_process reads both. | |
| impure subroutine | s_write_restart_lag_bubbles (t_step) |
| Write the bubbles in this rank's physical domain to restart_data/lag_bubbles_<t_step>.dat (parallel I/O only). | |
| impure subroutine | s_write_lag_restart (lag_kind, t_step, io_data, n_loc) |
| Write restart_data/lag_<lag_kind>_<t_step>.dat: a header (total count, time, dt, number of ranks, per-rank counts) followed by the lag_io_vars columns of every rank's entities, which the caller packs into io_data(1:n_loc, :). | |
| logical function | f_probe_owned (v, lo, hi, dir) |
| Half-open ownership lo < v <= hi, so a probe on a rank face is sampled once, by the rank holding the cell the serial code samples (left of the face); the first rank in a direction also owns its lower face. | |
Variables | |
| type(scalar_field), dimension(:), allocatable | q_cons_temp_ds |
| integer, parameter | ib_force_nf = 19 |
| Per-body history files, one fixed-width text record per body per recorded step (s_write_ib_record): reals per record, and the units held open for the run (-1 until the first write). | |
| integer, parameter | ib_heat_nf = 5 |
| integer | ib_hist_file = -1 |
| D/ib_forces.dat. | |
| integer | ib_heat_file = -1 |
| D/ib_heat.dat. | |
| integer, parameter | lag_evol_id = 11 |
| Per-rank Lagrangian evolution files. | |
| integer, parameter | lag_stats_id = 12 |
| Per-rank bubble statistics files. | |
| integer, parameter | lag_void_id = 13 |
| D/voidfraction.dat. | |
| real(wp), parameter | void_stat_min = 5.e-11_wp |
| Volume fraction above which a cell counts in the void statistics. | |
| real(wp) | next_write_time |
| Time of the next particle evolution write. | |
ICFL, VCFL, CCFL, TCFL, and Rc stability criteria extrema over all the time-steps | |
| real(wp) | icfl_max |
| ICFL criterion maximum. | |
| real(wp) | vcfl_max |
| VCFL criterion maximum. | |
| real(wp) | ccfl_max |
| CCFL criterion maximum. | |
| real(wp) | tcfl_max |
| TCFL criterion maximum. | |
| real(wp) | rc_min |
| Rc criterion maximum. | |
Writes solution data, run-time stability diagnostics (ICFL, VCFL, CCFL, Rc), and probe/center-of-mass files.
|
private |
Record format for nf reals after the body id.
Definition at line 1844 of file m_data_output.fpp.f90.
|
private |
Half-open ownership lo < v <= hi, so a probe on a rank face is sampled once, by the rank holding the cell the serial code samples (left of the face); the first rank in a direction also owns its lower face.
Definition at line 3177 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_close_ib_history |
Close the history files. Nothing is buffered, so there is nothing to flush first.
Definition at line 1916 of file m_data_output.fpp.f90.
|
private |
Close the Lagrangian output files.
Definition at line 2739 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_close_probe_files |
Closes probe files.
Definition at line 2598 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_close_run_time_information_file |
Write footer with stability criteria extrema and run-time to the information file, then close it.
Definition at line 2575 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_create_d_dir |
Create case_dir/D on rank 0 if it does not exist.
Definition at line 2752 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_finalize_data_output_module |
Module deallocation and/or disassociation procedures.
Definition at line 2641 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_initialize_data_output_module |
Initialize the data output module.
Definition at line 2609 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_initialize_lag_output | ( | integer, intent(in) | save_count, |
| real(wp), intent(in) | qtime ) |
Create D/, open the Lagrangian output files, and write the initial output, from the restart point (save_count, qtime).
Definition at line 2657 of file m_data_output.fpp.f90.
|
private |
Open the shared history file D/<stem>.dat of nf-real records. Done once for the run.
Definition at line 1854 of file m_data_output.fpp.f90.
|
private |
Open this rank's bubble statistics file D/stats_lag_bubbles_<rank>.dat, appending if it exists.
Definition at line 2963 of file m_data_output.fpp.f90.
|
private |
Open this rank's evolution file D/lag_<lag_kind>evol<rank>.dat: on a fresh start replace it and write the column headers (first header width 14, the others width), on a restart append to it.
Definition at line 2768 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_open_probe_files |
Open flow probe data files for writing.
Definition at line 505 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_open_run_time_information_file |
Open the run-time information file and write the stability criteria table header.
Definition at line 454 of file m_data_output.fpp.f90.
|
private |
Open D/voidfraction.dat on rank 0, appending if it exists.
Definition at line 2793 of file m_data_output.fpp.f90.
|
private |
Locate the grid cell responsible for an ICFL violation on this rank and report its state plus the nearest immersed-boundary particles, to aid debugging stability failures in particle-laden high-Mach cases.
Definition at line 784 of file m_data_output.fpp.f90.
|
private |
Write each global patch's centroid_offset to restart_data/ib_offset_<step>.dat, so a restart continues about the same centre of mass instead of re-measuring it from the body voxelised at the restart attitude. Collective.
Definition at line 1973 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_data_files | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf, |
| type(scalar_field), intent(inout) | q_t_sf, | ||
| type(scalar_field), dimension(sys_size), intent(inout) | q_prim_vf, | ||
| integer, intent(in) | t_step, | ||
| type(integer_field), dimension(1:num_dims,1:2), intent(in) | bc_type, | ||
| type(scalar_field), intent(inout), optional | beta ) |
Write data files. Dispatch subroutine that replaces procedure pointer.
Definition at line 436 of file m_data_output.fpp.f90.
| subroutine, public m_data_output::s_write_ib_data_file | ( | integer, intent(in) | time_step | ) |
Dispatch immersed boundary data output to the serial or parallel writer.
Definition at line 1607 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_ib_history | ( | integer, intent(in) | t_step | ) |
Record every immersed body's force, torque and kinematics (D/ib_forces.dat, ib_force_wrt with ib_state_wrt) and its mass and heat exchange (D/ib_heat.dat, ib_heat_wrt) for this step.
One shared text file per quantity, opened once for the run. Each rank writes only the bodies it owns, at a byte offset computed from the step and the global body id, so the file is byte-identical however the domain is decomposed and needs no merge step. Writing a file per body instead costs an inquire, open and close per body per rank per step, which is 3e5 filesystem metadata operations per step at 1000 ranks holding 100 bodies each.
Layout: row r holds all num_gbl_ibs bodies in global id order, so body g occupies bytes ((r*num_gbl_ibs) + g - 1)*record length. The files carry no header line, which would shift every offset after it; the columns are listed in docs/documentation/case.md.
Rows are numbered from the first step this run records, not from t_step, so that row 0 is always written. Nothing pre-fills the file – both open paths create it empty and every write lands at a computed offset – so a row no rank ever writes stays a hole, and a hole reads back as NUL bytes rather than blanks. Counting from t_step would leave exactly such a hole wherever the run starts: the skip below means step t_step_start is never written, and on a restart every row beneath it would be missing as well.
Definition at line 1763 of file m_data_output.fpp.f90.
|
private |
Write body gid's record in the given row. The format is fixed width by construction: every ES descriptor right-justifies in its field, including for negatives, three-digit exponents, NaN and Inf, so a record is always 10 + 18*size(fields) characters plus its newline. That is what lets a rank write at a computed byte offset, with no gather and no per-rank shards.
Definition at line 1820 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_ib_state_file | ( | integer, intent(in) | time_step | ) |
Writes IB state records to restart_data/ib_state.dat. Called on every rank.
Definition at line 1944 of file m_data_output.fpp.f90.
|
private |
Write on each time step the changes of the lagrangian bubbles.
Definition at line 2929 of file m_data_output.fpp.f90.
|
private |
Write the maximum and minimum radius of each bubble.
Definition at line 2982 of file m_data_output.fpp.f90.
|
private |
Append each local particle's position, velocity, force, radius and fluid state at the particle to the evolution file.
Definition at line 2893 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_lag_particle_evol_if_due | ( | integer, intent(in) | stage | ) |
Append to the particle evolution file before an RK stage: at the first stage of t = 0, and at the last stage once mytime reaches the next t_save multiple.
Definition at line 2696 of file m_data_output.fpp.f90.
|
private |
Write restart_data/lag_<lag_kind>_<t_step>.dat: a header (total count, time, dt, number of ranks, per-rank counts) followed by the lag_io_vars columns of every rank's entities, which the caller packs into io_data(1:n_loc, :).
Definition at line 3095 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_lag_save_data | ( | integer, intent(in) | save_count | ) |
Write the Lagrangian restart file, and the bubble statistics, for save save_count. The caller syncs the state to the host.
Definition at line 2725 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_lag_step_output |
Append the per-step Lagrangian output after the last RK stage commits the step.
Definition at line 2713 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_parallel_data_files | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf, |
| integer, intent(in) | t_step, | ||
| type(scalar_field), intent(inout), optional | beta, | ||
| type(scalar_field), intent(inout), optional | q_t_sf ) |
Write grid and conservative variable data files in parallel via MPI I/O.
Definition at line 1303 of file m_data_output.fpp.f90.
|
private |
Write immersed boundary marker data in parallel using MPI I/O.
Definition at line 1534 of file m_data_output.fpp.f90.
|
private |
Writes the IB state information out to file.
Definition at line 1633 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_probe_files | ( | integer, intent(in) | t_step, |
| type(scalar_field), dimension(sys_size), intent(in) | q_cons_vf, | ||
| real(wp), dimension(0:m,0:n,0:p), intent(in) | accel_mag ) |
Write flow probe data at the current time step.
Definition at line 2006 of file m_data_output.fpp.f90.
|
private |
Write the bubbles in this rank's physical domain to restart_data/lag_bubbles_<t_step>.dat (parallel I/O only).
Definition at line 3056 of file m_data_output.fpp.f90.
|
private |
Write the particles in this rank's physical domain to restart_data/lustre_lag_particles_<t_step>.dat, in the bubble column layout so post_process reads both.
Definition at line 3016 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_run_time_information | ( | type(scalar_field), dimension(sys_size), intent(in) | q_prim_vf, |
| integer, intent(in) | t_step ) |
Write stability criteria extrema to the run-time information file at the given time step.
Host copies; amdflang reads Re_size stale cross-TU
Definition at line 537 of file m_data_output.fpp.f90.
| impure subroutine, public m_data_output::s_write_serial_data_files | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf, |
| type(scalar_field), intent(inout) | q_t_sf, | ||
| type(scalar_field), dimension(sys_size), intent(inout) | q_prim_vf, | ||
| integer, intent(in) | t_step, | ||
| type(integer_field), dimension(1:num_dims,1:2), intent(in) | bc_type, | ||
| type(scalar_field), intent(inout), optional | beta ) |
Write grid and conservative variable data files in serial format.
Definition at line 938 of file m_data_output.fpp.f90.
|
private |
Write immersed boundary marker data to a serial (per-processor) unformatted file.
Definition at line 1505 of file m_data_output.fpp.f90.
|
private |
Write IB state data to a per-timestep serial (unformatted) file.
Definition at line 1719 of file m_data_output.fpp.f90.
|
private |
Append the cloud's average and maximum Lagrangian volume fraction 1 - alpha_f and its total volume at qtime to D/voidfraction.dat. The average is over the cells the cloud occupies only.
Definition at line 2812 of file m_data_output.fpp.f90.
|
private |
CCFL criterion maximum.
Definition at line 415 of file m_data_output.fpp.f90.
|
private |
Per-body history files, one fixed-width text record per body per recorded step (s_write_ib_record): reals per record, and the units held open for the run (-1 until the first write).
Definition at line 424 of file m_data_output.fpp.f90.
|
private |
D/ib_heat.dat.
Definition at line 426 of file m_data_output.fpp.f90.
|
private |
Definition at line 424 of file m_data_output.fpp.f90.
|
private |
D/ib_forces.dat.
Definition at line 425 of file m_data_output.fpp.f90.
|
private |
ICFL criterion maximum.
Definition at line 413 of file m_data_output.fpp.f90.
|
private |
Per-rank Lagrangian evolution files.
Definition at line 427 of file m_data_output.fpp.f90.
|
private |
Per-rank bubble statistics files.
Definition at line 428 of file m_data_output.fpp.f90.
|
private |
D/voidfraction.dat.
Definition at line 429 of file m_data_output.fpp.f90.
|
private |
Time of the next particle evolution write.
Definition at line 431 of file m_data_output.fpp.f90.
|
private |
Definition at line 420 of file m_data_output.fpp.f90.
|
private |
Rc criterion maximum.
Definition at line 417 of file m_data_output.fpp.f90.
|
private |
TCFL criterion maximum.
Definition at line 416 of file m_data_output.fpp.f90.
|
private |
VCFL criterion maximum.
Definition at line 414 of file m_data_output.fpp.f90.
|
private |
Volume fraction above which a cell counts in the void statistics.
Definition at line 430 of file m_data_output.fpp.f90.