Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/simulation/p_main.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ program p_main

implicit none

integer :: t_step !< Iterator for the time-stepping loop
integer :: t_step !< Iterator for the time-stepping loop
real(wp) :: time_avg, time_final
real(wp) :: io_time_avg, io_time_final
real(wp), allocatable, dimension(:) :: proc_time
real(wp), allocatable, dimension(:) :: io_proc_time
logical :: file_exists
real(wp) :: start, finish
integer :: nt
integer :: last_save !< Index of the last CFL-mode save

call system_clock(COUNT=cpu_start, COUNT_RATE=cpu_rate)

Expand Down Expand Up @@ -47,6 +48,7 @@ program p_main
t_step = 0
t_step_start = 0
mytime = t_save*n_start
last_save = n_start
else
t_step = t_step_start
if (t_step == 0) then
Expand Down Expand Up @@ -78,8 +80,10 @@ program p_main
call s_perform_time_step(t_step, time_avg)

if (cfl_dt) then
if (abs(mod(mytime, t_save)) < dt .or. mytime >= t_stop) then
! Save once per index; a mod(mytime, t_save) < dt test can refire on a restart and overwrite n_start
if (int(mytime/t_save) > last_save .or. mytime >= t_stop) then
call s_save_data(t_step, start, finish, io_time_avg, nt)
last_save = int(mytime/t_save)
end if
else
if (mod(t_step - t_step_start, t_step_save) == 0 .or. t_step == t_step_stop) then
Expand Down
191 changes: 191 additions & 0 deletions tests/25EB3D1F/golden-metadata.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading