Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed system dump to save the current time instead of the simulation …
Browse files Browse the repository at this point in the history
…start time
  • Loading branch information
daminton committed Jul 21, 2021
1 parent 821a16f commit 3ab3514
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down

0 comments on commit 3ab3514

Please sign in to comment.