IO: Rebuild the leaf and datablock lists in read_restart_snapshot().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2022-01-18 15:23:19 -03:00
parent 2b21d29da7
commit ce1280d00c
2 changed files with 12 additions and 7 deletions

View File

@ -600,12 +600,16 @@ module io
!
subroutine read_restart_snapshot(status)
use blocks , only : build_leaf_list, build_datablock_list
use evolution, only : time
use helpers , only : print_message
implicit none
integer, intent(out) :: status
character(len=*), parameter :: loc = 'IO::read_restart_snapshot()'
!-------------------------------------------------------------------------------
!
call start_timer(iio)
@ -621,6 +625,14 @@ module io
call read_restart_snapshot_xml(status)
end select
call build_leaf_list(status)
if (status /= 0) &
call print_message(loc, "Could not build the list of leafs!")
call build_datablock_list(status)
if (status /= 0) &
call print_message(loc, "Could not build the list of data blocks!")
! calculate the shift of the snapshot counter, and the next snapshot time
!
ishift = int(time / hsnap) - isnap + 1

View File

@ -348,7 +348,6 @@ module system
!
subroutine prepare_system(status)
use blocks , only : build_leaf_list
use boundaries, only : boundary_variables
use evolution , only : initialize_time_step, time
use helpers , only : print_message
@ -373,12 +372,6 @@ module system
return
end if
call build_leaf_list(status)
if (status /= 0) then
call print_message(loc, "Could not build the list of leafs!")
return
end if
call boundary_variables(time, 0.0d+00, status)
if (status /= 0) then
call print_message(loc, "Could not update variable boundaries!")