MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_data_output Module Reference

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, 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, bc_type, 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_force_history (t_step)
 Record every immersed body's force, torque and kinematics for this step.
impure subroutine s_open_ib_force_history
 Open the shared history file. Done once for the run.
impure subroutine, public s_close_ib_force_history
 Close the history file. 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. Must be called only on rank 0.
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.

Variables

type(scalar_field), dimension(:), allocatable q_cons_temp_ds
character(len= *), parameter ib_rec_fmt = '(I10,19(1X,ES17.9E3))'
 One fixed-width text record per immersed body per recorded step, in D/ib_forces.dat.
integer, parameter ib_rec_body = 10 + 19*18
 characters the format emits
integer, parameter ib_rec_len = IB_REC_BODY + 1
 plus the newline
integer ib_hist_file = -1
 held open for the run; -1 until first write
ICFL, VCFL, CCFL, TCFL, and Rc stability criteria extrema over all the time-steps
real(wpicfl_max
 ICFL criterion maximum.
real(wpvcfl_max
 VCFL criterion maximum.
real(wpccfl_max
 CCFL criterion maximum.
real(wptcfl_max
 TCFL criterion maximum.
real(wprc_min
 Rc criterion maximum.

Detailed Description

Writes solution data, run-time stability diagnostics (ICFL, VCFL, CCFL, Rc), and probe/center-of-mass files.

Function/Subroutine Documentation

◆ s_close_ib_force_history()

impure subroutine, public m_data_output::s_close_ib_force_history

Close the history file. Nothing is buffered, so there is nothing to flush first.

Definition at line 1684 of file m_data_output.fpp.f90.

◆ s_close_probe_files()

impure subroutine, public m_data_output::s_close_probe_files

Closes probe files.

Definition at line 2272 of file m_data_output.fpp.f90.

◆ s_close_run_time_information_file()

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 2249 of file m_data_output.fpp.f90.

◆ s_finalize_data_output_module()

impure subroutine, public m_data_output::s_finalize_data_output_module

Module deallocation and/or disassociation procedures.

Definition at line 2315 of file m_data_output.fpp.f90.

◆ s_initialize_data_output_module()

impure subroutine, public m_data_output::s_initialize_data_output_module

Initialize the data output module.

Definition at line 2283 of file m_data_output.fpp.f90.

Here is the caller graph for this function:

◆ s_open_ib_force_history()

impure subroutine m_data_output::s_open_ib_force_history
private

Open the shared history file. Done once for the run.

Definition at line 1633 of file m_data_output.fpp.f90.

Here is the caller graph for this function:

◆ s_open_probe_files()

impure subroutine, public m_data_output::s_open_probe_files

Open flow probe data files for writing.

Definition at line 464 of file m_data_output.fpp.f90.

◆ s_open_run_time_information_file()

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 413 of file m_data_output.fpp.f90.

◆ s_write_data_files()

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:1), intent(in) bc_type,
type(scalar_field), intent(inout), optional beta )

Write data files. Dispatch subroutine that replaces procedure pointer.

Definition at line 395 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_ib_data_file()

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 1379 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_ib_force_history()

impure subroutine, public m_data_output::s_write_ib_force_history ( integer, intent(in) t_step)

Record every immersed body's force, torque and kinematics for this step.

One shared text file, D/ib_forces.dat, 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)*IB_REC_LEN. The file carries 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 1561 of file m_data_output.fpp.f90.

Here is the call graph for this function:

◆ s_write_ib_state_file()

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. Must be called only on rank 0.

Definition at line 1701 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_parallel_data_files()

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(integer_field), dimension(1:num_dims,-1:1), intent(in) bc_type,
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 1078 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_parallel_ib_data()

subroutine m_data_output::s_write_parallel_ib_data ( integer, intent(in) time_step)
private

Write immersed boundary marker data in parallel using MPI I/O.

Definition at line 1309 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_parallel_ib_state()

subroutine m_data_output::s_write_parallel_ib_state ( integer, intent(in) t_step)
private

Writes the IB state information out to file.

Definition at line 1404 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_probe_files()

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 1726 of file m_data_output.fpp.f90.

Here is the call graph for this function:

◆ s_write_run_time_information()

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.

Definition at line 496 of file m_data_output.fpp.f90.

Here is the call graph for this function:

◆ s_write_serial_data_files()

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:1), intent(in) bc_type,
type(scalar_field), intent(inout), optional beta )

Write grid and conservative variable data files in serial format.

Definition at line 716 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_write_serial_ib_data()

subroutine m_data_output::s_write_serial_ib_data ( integer, intent(in) time_step)
private

Write immersed boundary marker data to a serial (per-processor) unformatted file.

Definition at line 1281 of file m_data_output.fpp.f90.

Here is the caller graph for this function:

◆ s_write_serial_ib_state()

subroutine m_data_output::s_write_serial_ib_state ( integer, intent(in) t_step)
private

Write IB state data to a per-timestep serial (unformatted) file.

Definition at line 1508 of file m_data_output.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ccfl_max

real(wp) m_data_output::ccfl_max
private

CCFL criterion maximum.

Definition at line 373 of file m_data_output.fpp.f90.

◆ ib_hist_file

integer m_data_output::ib_hist_file = -1
private

held open for the run; -1 until first write

Definition at line 390 of file m_data_output.fpp.f90.

◆ ib_rec_body

integer, parameter m_data_output::ib_rec_body = 10 + 19*18
private

characters the format emits

Definition at line 388 of file m_data_output.fpp.f90.

◆ ib_rec_fmt

character(len=*), parameter m_data_output::ib_rec_fmt = '(I10,19(1X,ES17.9E3))'
private

One fixed-width text record per immersed body per recorded step, in D/ib_forces.dat.

IB_REC_FMT 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 IB_REC_BODY characters. That is what lets a rank compute a byte offset for (step, body) and write there directly, giving one shared text file with no gather and no per-rank shards. The two must be edited together: widening the format without IB_REC_LEN shears the file.

Definition at line 387 of file m_data_output.fpp.f90.

◆ ib_rec_len

integer, parameter m_data_output::ib_rec_len = IB_REC_BODY + 1
private

plus the newline

Definition at line 389 of file m_data_output.fpp.f90.

◆ icfl_max

real(wp) m_data_output::icfl_max
private

ICFL criterion maximum.

Definition at line 371 of file m_data_output.fpp.f90.

◆ q_cons_temp_ds

type(scalar_field), dimension(:), allocatable m_data_output::q_cons_temp_ds
private

Definition at line 378 of file m_data_output.fpp.f90.

◆ rc_min

real(wp) m_data_output::rc_min
private

Rc criterion maximum.

Definition at line 375 of file m_data_output.fpp.f90.

◆ tcfl_max

real(wp) m_data_output::tcfl_max
private

TCFL criterion maximum.

Definition at line 374 of file m_data_output.fpp.f90.

◆ vcfl_max

real(wp) m_data_output::vcfl_max
private

VCFL criterion maximum.

Definition at line 372 of file m_data_output.fpp.f90.