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 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, 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. 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.
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
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(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.

Detailed Description

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

Function/Subroutine Documentation

◆ f_probe_owned()

logical function m_data_output::f_probe_owned ( real(wp), intent(in) v,
real(wp), intent(in) lo,
real(wp), intent(in) hi,
integer, intent(in) dir )
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 2614 of file m_data_output.fpp.f90.

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

◆ 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 1886 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 2556 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 2533 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 2599 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 2567 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 1834 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 485 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 434 of file m_data_output.fpp.f90.

◆ s_report_icfl_violation()

impure subroutine m_data_output::s_report_icfl_violation ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf)
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 757 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_centroid_offsets()

impure subroutine m_data_output::s_write_centroid_offsets ( integer, intent(in) step)
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 1931 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_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 416 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 1577 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 1761 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. Called on every rank.

Definition at line 1903 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 1270 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 1504 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 1603 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 1964 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 517 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 907 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 1475 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 1708 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 394 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 411 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 409 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 408 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 410 of file m_data_output.fpp.f90.

◆ icfl_max

real(wp) m_data_output::icfl_max
private

ICFL criterion maximum.

Definition at line 392 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 399 of file m_data_output.fpp.f90.

◆ rc_min

real(wp) m_data_output::rc_min
private

Rc criterion maximum.

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

◆ tcfl_max

real(wp) m_data_output::tcfl_max
private

TCFL criterion maximum.

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

◆ vcfl_max

real(wp) m_data_output::vcfl_max
private

VCFL criterion maximum.

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