|
MFC
Exascale flow solver
|
Reads input files, loads initial conditions and grid data, and orchestrates solver initialization and finalization. More...
Functions/Subroutines | |
| impure subroutine, public | s_read_data_files (q_cons_vf) |
| Read data files. Dispatch subroutine that replaces procedure pointer. | |
| impure subroutine, public | s_read_input_file |
| Verify the input file exists and read it. | |
| impure subroutine, public | s_check_input_file |
| Validate that all user-provided inputs form a consistent simulation configuration. | |
| impure subroutine, public | s_read_serial_data_files (q_cons_vf) |
| Read serial initial condition and grid data files and compute cell-width distributions. | |
| impure subroutine, public | s_read_parallel_data_files (q_cons_vf) |
| Read parallel initial condition and grid data files via MPI I/O. | |
| impure subroutine | s_check_restart_file_size (ifile, file_loc, expected_bytes) |
| Abort if an open restart file holds fewer bytes than are about to be read from it, as a job killed while writing it leaves. MPI reads past the end return short without an error, so the missing tail would come back as garbage. | |
| subroutine, public | s_initialize_internal_energy_equations (v_vf) |
| Initialize internal-energy equations from phase mass, mixture momentum, and total energy. | |
| impure subroutine, public | s_perform_time_step (t_step, time_avg) |
| Advance the simulation by one time step, handling CFL-based dt and time-stepper dispatch. | |
| impure subroutine, public | s_save_performance_metrics (time_avg, time_final, io_time_avg, io_time_final, proc_time, io_proc_time, file_exists) |
| Collect per-process wall-clock times and write aggregate performance metrics to file. | |
| impure subroutine, public | s_save_data (t_step, start, finish, io_time_avg, nt) |
| Save conservative variable data to disk at the current time step. | |
| impure subroutine, public | s_initialize_modules |
| Initialize all simulation sub-modules in the required dependency order. | |
| impure subroutine, public | s_initialize_mpi_domain |
| Set up the MPI execution environment, bind GPUs, and decompose the computational domain. | |
| subroutine, public | s_initialize_gpu_vars |
| Transfer initial conservative variable and model parameter data to the GPU device. | |
| impure subroutine, public | s_finalize_modules |
| Finalize and deallocate all simulation sub-modules in reverse initialization order. | |
| subroutine | s_assign_particle_cloud_ib_defaults (cloud_ib_idx, ib_patch) |
| Fills the properties of a generated particle-cloud IB that the IB state file does not carry (geometry, mass, moving_ibm, inert surface, identity rotation matrix, zeroed step state). This is the only place they are set - pre_process (s_add_cloud_particle) generates only position, kinematics and radius. cloud_ib_idx is the global patch id minus the number of namelist patches; pre_process numbers particles cloud by cloud. | |
| impure subroutine | s_read_ib_restart_data (t_step) |
| Loads the IBs this rank owns from the IB state file for t_step into patch_ib(1:num_ibs), all of which are local. Under file_per_process the rank reads only its own restart_data/lustre_<t_step>/ib_state_<t_step>_<rank>.dat, which holds exactly its IBs; otherwise every rank reads every record of restart_data/ib_state_<t_step>.dat and keeps the ones f_local_rank_owns_location assigns it. Records carry kinematics, position and radius; every other property comes from the namelist patch (global id <= num_ibs) or the particle cloud the IB was generated from. Written by pre_process at t_step = 0 (src/pre_process/m_data_output.fpp:s_write_ib_state_0_file) and by s_write_ib_state_file on later steps. | |
| subroutine | s_build_ib_neighborhood () |
| Completes this rank's IB neighborhood once s_read_ib_restart_data has loaded only the IBs it owns: every rank sends its own IBs to, and receives the owned IBs of, each distinct rank in ib_neighbor_ranks, appending them to patch_ib after its own. | |
| subroutine | s_compute_ib_neighbor_ranks () |
| Build ib_neighbor_ranks(-1:1,-1:1,-1:1): MPI ranks of all neighbor domains. Uses two rounds of MPI_SENDRECV cascades - face neighbors are known from bc_*, edge neighbors are obtained in round 1, and (3D) corner neighbors in round 2. | |
| subroutine | s_get_neighbor_bounds () |
Variables | |
| type(scalar_field), dimension(:), allocatable | q_cons_temp |
| real(wp) | dt_init |
Reads input files, loads initial conditions and grid data, and orchestrates solver initialization and finalization.
| subroutine m_start_up::s_assign_particle_cloud_ib_defaults | ( | integer, intent(in) | cloud_ib_idx, |
| type(ib_patch_parameters), intent(inout) | ib_patch ) |
Fills the properties of a generated particle-cloud IB that the IB state file does not carry (geometry, mass, moving_ibm, inert surface, identity rotation matrix, zeroed step state). This is the only place they are set - pre_process (s_add_cloud_particle) generates only position, kinematics and radius. cloud_ib_idx is the global patch id minus the number of namelist patches; pre_process numbers particles cloud by cloud.
Definition at line 2083 of file m_start_up.fpp.f90.
| subroutine m_start_up::s_build_ib_neighborhood |
Completes this rank's IB neighborhood once s_read_ib_restart_data has loaded only the IBs it owns: every rank sends its own IBs to, and receives the owned IBs of, each distinct rank in ib_neighbor_ranks, appending them to patch_ib after its own.
Definition at line 2213 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_check_input_file |
Validate that all user-provided inputs form a consistent simulation configuration.
Definition at line 525 of file m_start_up.fpp.f90.
| impure subroutine m_start_up::s_check_restart_file_size | ( | integer, intent(in) | ifile, |
| character(len=*), intent(in) | file_loc, | ||
| integer(kind=mpi_offset_kind), intent(in) | expected_bytes ) |
Abort if an open restart file holds fewer bytes than are about to be read from it, as a job killed while writing it leaves. MPI reads past the end return short without an error, so the missing tail would come back as garbage.
Definition at line 915 of file m_start_up.fpp.f90.
| subroutine m_start_up::s_compute_ib_neighbor_ranks |
Build ib_neighbor_ranks(-1:1,-1:1,-1:1): MPI ranks of all neighbor domains. Uses two rounds of MPI_SENDRECV cascades - face neighbors are known from bc_*, edge neighbors are obtained in round 1, and (3D) corner neighbors in round 2.
Definition at line 2283 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_finalize_modules |
Finalize and deallocate all simulation sub-modules in reverse initialization order.
Definition at line 2034 of file m_start_up.fpp.f90.
| subroutine m_start_up::s_get_neighbor_bounds |
| subroutine, public m_start_up::s_initialize_gpu_vars |
Transfer initial conservative variable and model parameter data to the GPU device.
Definition at line 1609 of file m_start_up.fpp.f90.
| subroutine, public m_start_up::s_initialize_internal_energy_equations | ( | type(scalar_field), dimension(sys_size), intent(inout) | v_vf | ) |
Initialize internal-energy equations from phase mass, mixture momentum, and total energy.
Definition at line 936 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_initialize_modules |
Initialize all simulation sub-modules in the required dependency order.
Definition at line 1379 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_initialize_mpi_domain |
Set up the MPI execution environment, bind GPUs, and decompose the computational domain.
Definition at line 1534 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_perform_time_step | ( | integer, intent(inout) | t_step, |
| real(wp), intent(inout) | time_avg ) |
Advance the simulation by one time step, handling CFL-based dt and time-stepper dispatch.
Definition at line 996 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_read_data_files | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf | ) |
Read data files. Dispatch subroutine that replaces procedure pointer.
Definition at line 436 of file m_start_up.fpp.f90.
| impure subroutine m_start_up::s_read_ib_restart_data | ( | integer, intent(in) | t_step | ) |
Loads the IBs this rank owns from the IB state file for t_step into patch_ib(1:num_ibs), all of which are local. Under file_per_process the rank reads only its own restart_data/lustre_<t_step>/ib_state_<t_step>_<rank>.dat, which holds exactly its IBs; otherwise every rank reads every record of restart_data/ib_state_<t_step>.dat and keeps the ones f_local_rank_owns_location assigns it. Records carry kinematics, position and radius; every other property comes from the namelist patch (global id <= num_ibs) or the particle cloud the IB was generated from. Written by pre_process at t_step = 0 (src/pre_process/m_data_output.fpp:s_write_ib_state_0_file) and by s_write_ib_state_file on later steps.
Definition at line 2134 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_read_input_file |
Verify the input file exists and read it.
Definition at line 449 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_read_parallel_data_files | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf | ) |
Read parallel initial condition and grid data files via MPI I/O.
Definition at line 661 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_read_serial_data_files | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf | ) |
Read serial initial condition and grid data files and compute cell-width distributions.
Definition at line 544 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_save_data | ( | integer, intent(inout) | t_step, |
| real(wp), intent(inout) | start, | ||
| real(wp), intent(inout) | finish, | ||
| real(wp), intent(inout) | io_time_avg, | ||
| integer, intent(inout) | nt ) |
Save conservative variable data to disk at the current time step.
Definition at line 1185 of file m_start_up.fpp.f90.
| impure subroutine, public m_start_up::s_save_performance_metrics | ( | real(wp), intent(inout) | time_avg, |
| real(wp), intent(inout) | time_final, | ||
| real(wp), intent(inout) | io_time_avg, | ||
| real(wp), intent(inout) | io_time_final, | ||
| real(wp), dimension(:), intent(inout) | proc_time, | ||
| real(wp), dimension(:), intent(inout) | io_proc_time, | ||
| logical, intent(inout) | file_exists ) |
Collect per-process wall-clock times and write aggregate performance metrics to file.
Definition at line 1123 of file m_start_up.fpp.f90.
| real(wp) m_start_up::dt_init |
Definition at line 431 of file m_start_up.fpp.f90.
| type(scalar_field), dimension(:), allocatable m_start_up::q_cons_temp |
Definition at line 430 of file m_start_up.fpp.f90.