diff options
Diffstat (limited to 'src/EHFinder_ReadData.F90')
-rw-r--r-- | src/EHFinder_ReadData.F90 | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/EHFinder_ReadData.F90 b/src/EHFinder_ReadData.F90 index 23357d7..89067d5 100644 --- a/src/EHFinder_ReadData.F90 +++ b/src/EHFinder_ReadData.F90 @@ -26,8 +26,9 @@ subroutine EHFinder_Read_Metric(CCTK_ARGUMENTS) ! last_iteration_number (the last iteration in the numerical evolution ! producing the metric) and saved_iteration_every (how often was the metric ! saved) and the current iteration and save it in a string variable. - write(iteration_string,'(i10)') last_iteration_number - & - saved_iteration_every * cctk_iteration + i = min ( last_iteration_number - saved_iteration_every * cctk_iteration, & + last_iteration_number ) + write(iteration_string,'(i10)') i ! Trim the string variable. iteration_string = adjustl(iteration_string) @@ -76,14 +77,15 @@ subroutine EHFinder_Read_Lapse(CCTK_ARGUMENTS) character(len=128) :: in_files, in_vars character(len=10) :: iteration_string - CCTK_INT :: nc, res + CCTK_INT :: i, nc, res ! Figure out which iteration number to read, based on the parameters ! last_iteration_number (the last iteration in the numerical evolution ! producing the metric) and saved_iteration_every (how often was the lapse ! saved) and the current iteration and save it in a string variable. - write(iteration_string,'(i10)') last_iteration_number - & - saved_iteration_every * cctk_iteration + i = min ( last_iteration_number - saved_iteration_every * cctk_iteration, & + last_iteration_number ) + write(iteration_string,'(i10)') i ! Trim the string variable. iteration_string = adjustl(iteration_string) @@ -125,8 +127,10 @@ subroutine EHFinder_Read_Shift(CCTK_ARGUMENTS) ! last_iteration_number (the last iteration in the numerical evolution ! producing the metric) and saved_iteration_every (how often was the metric ! saved) and the current iteration and save it in a string variable. - write(iteration_string,'(i10)') last_iteration_number - & - saved_iteration_every * cctk_iteration + i = min ( last_iteration_number - saved_iteration_every * cctk_iteration, & + last_iteration_number ) + write(iteration_string,'(i10)') i + ! Trim the string variable. iteration_string = adjustl(iteration_string) nc = len_trim(iteration_string) @@ -171,7 +175,7 @@ subroutine EHFinder_Read_Conformal(CCTK_ARGUMENTS) character(len=128) :: in_files, in_vars character(len=10) :: iteration_string - CCTK_INT :: nc, res + CCTK_INT :: i, nc, res ! Figure out which iteration number to read, based on the parameters ! last_iteration_number (the last iteration in the numerical evolution @@ -182,8 +186,9 @@ subroutine EHFinder_Read_Conformal(CCTK_ARGUMENTS) if ( read_conformal_factor_once .gt. 0 ) then write(iteration_string,'(i10)') 0 else - write(iteration_string,'(i10)') last_iteration_number - & - saved_iteration_every * cctk_iteration + i = min ( last_iteration_number - saved_iteration_every * cctk_iteration, & + last_iteration_number ) + write(iteration_string,'(i10)') i end if ! Trim the string variable. @@ -219,14 +224,15 @@ subroutine EHFinder_Read_Mask(CCTK_ARGUMENTS) character(len=128) :: in_files, in_vars character(len=10) :: iteration_string - CCTK_INT :: nc, res + CCTK_INT :: i, nc, res ! Figure out which iteration number to read, based on the parameters ! last_iteration_number (the last iteration in the numerical evolution ! producing the metric) and saved_iteration_every (how often was the metric ! saved) and the current iteration and save it in a string variable. - write(iteration_string,'(i10)') last_iteration_number - & - saved_iteration_every * cctk_iteration + i = min ( last_iteration_number - saved_iteration_every * cctk_iteration, & + last_iteration_number ) + write(iteration_string,'(i10)') i ! Trim the string variable. iteration_string = adjustl(iteration_string) |