Merge branch 'master' into binaries
This commit is contained in:
commit
5cac79f637
@ -216,11 +216,11 @@ module gravity
|
|||||||
!
|
!
|
||||||
! t, dt - time and the time increment;
|
! t, dt - time and the time increment;
|
||||||
! x, y, z - rectangular coordinates;
|
! x, y, z - rectangular coordinates;
|
||||||
! gacc - vector of the gravitational acceleration;
|
! acc - vector of the gravitational acceleration;
|
||||||
!
|
!
|
||||||
!===============================================================================
|
!===============================================================================
|
||||||
!
|
!
|
||||||
subroutine gacc_none(t, dt, x, y, z, gacc)
|
subroutine gacc_none(t, dt, x, y, z, acc)
|
||||||
|
|
||||||
! local variables are not implicit by default
|
! local variables are not implicit by default
|
||||||
!
|
!
|
||||||
@ -230,7 +230,7 @@ module gravity
|
|||||||
!
|
!
|
||||||
real(kind=8) , intent(in) :: t, dt
|
real(kind=8) , intent(in) :: t, dt
|
||||||
real(kind=8) , intent(in) :: x, y, z
|
real(kind=8) , intent(in) :: x, y, z
|
||||||
real(kind=8), dimension(3), intent(out) :: gacc
|
real(kind=8), dimension(3), intent(out) :: acc
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -240,6 +240,10 @@ module gravity
|
|||||||
call start_timer(imc)
|
call start_timer(imc)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
|
! reset gravitational acceleration
|
||||||
|
!
|
||||||
|
acc(:) = 0.0d+00
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for the gravitational acceleration calculation
|
! stop accounting time for the gravitational acceleration calculation
|
||||||
!
|
!
|
||||||
|
40
src/io.F90
40
src/io.F90
@ -33,9 +33,7 @@ module io
|
|||||||
! import external subroutines
|
! import external subroutines
|
||||||
!
|
!
|
||||||
use blocks, only : pointer_meta
|
use blocks, only : pointer_meta
|
||||||
#ifdef PROFILE
|
|
||||||
use timers, only : set_timer, start_timer, stop_timer
|
use timers, only : set_timer, start_timer, stop_timer
|
||||||
#endif /* PROFILE */
|
|
||||||
|
|
||||||
! module variables are not implicit by default
|
! module variables are not implicit by default
|
||||||
!
|
!
|
||||||
@ -89,9 +87,10 @@ module io
|
|||||||
#endif /* HDF5 */
|
#endif /* HDF5 */
|
||||||
end interface
|
end interface
|
||||||
|
|
||||||
#ifdef PROFILE
|
|
||||||
! timer indices
|
! timer indices
|
||||||
!
|
!
|
||||||
|
integer , save :: iio
|
||||||
|
#ifdef PROFILE
|
||||||
integer , save :: ioi, iow, ios
|
integer , save :: ioi, iow, ios
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
@ -204,9 +203,10 @@ module io
|
|||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
#ifdef PROFILE
|
|
||||||
! set timer descriptions
|
! set timer descriptions
|
||||||
!
|
!
|
||||||
|
call set_timer('SNAPSHOTS I/O' , iio)
|
||||||
|
#ifdef PROFILE
|
||||||
call set_timer('io:: initialization' , ioi)
|
call set_timer('io:: initialization' , ioi)
|
||||||
call set_timer('io:: snapshot writing', iow)
|
call set_timer('io:: snapshot writing', iow)
|
||||||
call set_timer('io:: snapshot reading', ios)
|
call set_timer('io:: snapshot reading', ios)
|
||||||
@ -360,12 +360,24 @@ module io
|
|||||||
call start_timer(ios)
|
call start_timer(ios)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
|
! reset the return flag
|
||||||
|
!
|
||||||
|
iret = 0
|
||||||
|
|
||||||
|
! start accounting time for I/O
|
||||||
|
!
|
||||||
|
call start_timer(iio)
|
||||||
|
|
||||||
#ifdef HDF5
|
#ifdef HDF5
|
||||||
! read HDF5 restart file and rebuild the meta and data block structures
|
! read HDF5 restart file and rebuild the meta and data block structures
|
||||||
!
|
!
|
||||||
call read_restart_snapshot_h5(iret)
|
call read_restart_snapshot_h5(iret)
|
||||||
#endif /* HDF5 */
|
#endif /* HDF5 */
|
||||||
|
|
||||||
|
! stop accounting time for I/O
|
||||||
|
!
|
||||||
|
call stop_timer(iio)
|
||||||
|
|
||||||
! calculate the shift of the snapshot counter, and the next snapshot time
|
! calculate the shift of the snapshot counter, and the next snapshot time
|
||||||
!
|
!
|
||||||
ishift = int(time / hsnap) - isnap + 1
|
ishift = int(time / hsnap) - isnap + 1
|
||||||
@ -411,6 +423,10 @@ module io
|
|||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
|
! reset the return flag
|
||||||
|
!
|
||||||
|
iret = 0
|
||||||
|
|
||||||
! check if conditions for storing the restart snapshot have been met
|
! check if conditions for storing the restart snapshot have been met
|
||||||
!
|
!
|
||||||
if (hrest < 5.0d-02 .or. thrs < irest * hrest) return
|
if (hrest < 5.0d-02 .or. thrs < irest * hrest) return
|
||||||
@ -421,12 +437,20 @@ module io
|
|||||||
call start_timer(iow)
|
call start_timer(iow)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
|
! start accounting time for I/O
|
||||||
|
!
|
||||||
|
call start_timer(iio)
|
||||||
|
|
||||||
#ifdef HDF5
|
#ifdef HDF5
|
||||||
! store restart file
|
! store restart file
|
||||||
!
|
!
|
||||||
call write_restart_snapshot_h5(nrun, iret)
|
call write_restart_snapshot_h5(nrun, iret)
|
||||||
#endif /* HDF5 */
|
#endif /* HDF5 */
|
||||||
|
|
||||||
|
! stop accounting time for I/O
|
||||||
|
!
|
||||||
|
call stop_timer(iio)
|
||||||
|
|
||||||
! increase the restart snapshot counter
|
! increase the restart snapshot counter
|
||||||
!
|
!
|
||||||
irest = irest + 1
|
irest = irest + 1
|
||||||
@ -476,6 +500,10 @@ module io
|
|||||||
call start_timer(iow)
|
call start_timer(iow)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
|
! start accounting time for I/O
|
||||||
|
!
|
||||||
|
call start_timer(iio)
|
||||||
|
|
||||||
#ifdef HDF5
|
#ifdef HDF5
|
||||||
! store variable snapshot file
|
! store variable snapshot file
|
||||||
!
|
!
|
||||||
@ -486,6 +514,10 @@ module io
|
|||||||
end if
|
end if
|
||||||
#endif /* HDF5 */
|
#endif /* HDF5 */
|
||||||
|
|
||||||
|
! stop accounting time for I/O
|
||||||
|
!
|
||||||
|
call stop_timer(iio)
|
||||||
|
|
||||||
! increase the snapshot counter and calculate the next snapshot time
|
! increase the snapshot counter and calculate the next snapshot time
|
||||||
!
|
!
|
||||||
isnap = isnap + 1
|
isnap = isnap + 1
|
||||||
|
@ -831,6 +831,10 @@ module user_problem
|
|||||||
call start_timer(img)
|
call start_timer(img)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
|
! reset gravitational acceleration
|
||||||
|
!
|
||||||
|
acc(:) = 0.0d+00
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for the gravitational acceleration calculation
|
! stop accounting time for the gravitational acceleration calculation
|
||||||
!
|
!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user