1# 1 "/home/runner/work/MFC/MFC/src/simulation/p_main.fpp"
18 real(wp) :: time_avg, time_final
19 real(wp) :: io_time_avg, io_time_final
20 real(wp),
allocatable,
dimension(:) :: proc_time
21 real(wp),
allocatable,
dimension(:) :: io_proc_time
22 logical :: file_exists
23 real(wp) :: start, finish
62 if (particles_lagrange .and. merge(n_start, t_step_start,
cfl_dt) == 0)
then
64 call s_save_data(t_step, start, finish, io_time_avg, nt)
78 if (t_step == t_step_stop)
then
89 if (int(
mytime/t_save) > last_save .or.
mytime >= t_stop)
then
90 call s_save_data(t_step, start, finish, io_time_avg, nt)
91 last_save = int(
mytime/t_save)
94 if (mod(t_step - t_step_start, t_step_save) == 0 .or. t_step == t_step_stop)
then
95 call s_save_data(t_step, start, finish, io_time_avg, nt)
107 deallocate (proc_time, io_proc_time)
Writes solution data, run-time stability diagnostics (ICFL, VCFL, CCFL, Rc), and probe/center-of-mass...
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) and its mas...
Global parameters for the computational domain, fluid properties, and simulation algorithm configurat...
real(wp) mytime
Current simulation time.
integer num_procs
Number of processors.
NVIDIA NVTX profiling API bindings for GPU performance instrumentation.
subroutine nvtxstartrange(name, id)
Push a named NVTX range for GPU profiling, optionally with a color based on the given identifier.
subroutine nvtxendrange
Pop the current NVTX range to end the GPU profiling region.
Reads input files, loads initial conditions and grid data, and orchestrates solver initialization and...
impure subroutine, public s_initialize_modules
Initialize all simulation sub-modules in the required dependency order.
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.
subroutine, public s_initialize_gpu_vars
Transfer initial conservative variable and model parameter data to the GPU device.
impure subroutine, public s_initialize_mpi_domain
Set up the MPI execution environment, bind GPUs, and decompose the computational domain.
impure subroutine, public s_amr_start_fresh_blocks
Fresh AMR run, before the first save: put the initial condition patches on the blocks and,...
impure subroutine, public s_finalize_modules
Finalize and deallocate all simulation sub-modules in reverse initialization order.
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.
Total-variation-diminishing (TVD) Runge–Kutta time integrators (1st-, 2nd-, and 3rd-order SSP).
program p_main
Quasi-conservative, shock- and interface- capturing finite-volume scheme for the multicomponent Navie...