From 3ab35145e0e7b576001e44e90184eedf9ba7d6dc Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 21 Jul 2021 15:01:43 -0400 Subject: [PATCH] Fixed system dump to save the current time instead of the simulation start time --- src/io/io.f90 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/io/io.f90 b/src/io/io.f90 index fc63456be..31ceba280 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -429,14 +429,14 @@ module subroutine io_dump_system(self, param, msg) !! so that if a dump file gets corrupted during writing, the user can restart from the older one. implicit none ! Arguments - class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - character(*), optional, intent(in) :: msg !! Message to display with dump operation + class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters + character(*), optional, intent(in) :: msg !! Message to display with dump operation ! Internals - class(swiftest_parameters), allocatable :: dump_param !! Local parameters variable used to parameters change input file names - !! to dump file-specific values without changing the user-defined values - integer(I4B), save :: idx = 1 !! Index of current dump file. Output flips between 2 files for extra security - !! in case the program halts during writing + class(swiftest_parameters), allocatable :: dump_param !! Local parameters variable used to parameters change input file names + !! to dump file-specific values without changing the user-defined values + integer(I4B), save :: idx = 1 !! Index of current dump file. Output flips between 2 files for extra security + !! in case the program halts during writing character(len=:), allocatable :: param_file_name real(DP) :: tfrac @@ -447,6 +447,7 @@ module subroutine io_dump_system(self, param, msg) dump_param%intpfile = trim(adjustl(DUMP_TP_FILE(idx))) dump_param%out_form = XV dump_param%out_stat = 'APPEND' + dump_param%T0 = param%t call dump_param%dump(param_file_name) call self%cb%dump(dump_param)