Merge branch 'master' into reconnection
This commit is contained in:
commit
df4a9db539
@ -48,7 +48,7 @@ program amun
|
||||
use equations , only : nv, nf
|
||||
use evolution , only : initialize_evolution, finalize_evolution
|
||||
use evolution , only : print_evolution
|
||||
use evolution , only : advance, new_time_step
|
||||
use evolution , only : advance, initialize_time_step, new_time_step
|
||||
use evolution , only : registers, step, time, dt, dtp, errtol
|
||||
use forcing , only : initialize_forcing, finalize_forcing
|
||||
use forcing , only : print_forcing
|
||||
@ -62,7 +62,7 @@ program amun
|
||||
use io , only : restart_snapshot_number, restart_from_snapshot
|
||||
use io , only : read_snapshot_parameter
|
||||
use io , only : read_restart_snapshot, write_restart_snapshot
|
||||
use io , only : write_snapshot, next_tout, precise_snapshots
|
||||
use io , only : write_snapshot, update_dtp
|
||||
use mesh , only : initialize_mesh, finalize_mesh
|
||||
use mesh , only : generate_mesh, store_mesh_stats
|
||||
use mpitools , only : initialize_mpitools, finalize_mpitools
|
||||
@ -326,10 +326,6 @@ program amun
|
||||
!
|
||||
trun = trun - tsav / 6.0d+01
|
||||
|
||||
! initialize dtp
|
||||
!
|
||||
dtp = 2.0d+00 * tmax
|
||||
|
||||
! get integral calculation interval
|
||||
!
|
||||
call get_parameter("ndat", ndat)
|
||||
@ -553,9 +549,9 @@ program amun
|
||||
!
|
||||
call boundary_variables(0.0d+00, 0.0d+00)
|
||||
|
||||
! calculate new timestep
|
||||
! estimate the initial timestep
|
||||
!
|
||||
call new_time_step()
|
||||
call initialize_time_step()
|
||||
|
||||
end if
|
||||
|
||||
@ -621,10 +617,6 @@ program amun
|
||||
!
|
||||
do while((nsteps <= nmax) .and. (time < tmax) .and. proceed)
|
||||
|
||||
! get the next snapshot time
|
||||
!
|
||||
if (precise_snapshots) dtp = next_tout() - time
|
||||
|
||||
! performe one step evolution
|
||||
!
|
||||
call advance(status)
|
||||
@ -643,6 +635,14 @@ program amun
|
||||
step = step + 1
|
||||
nsteps = nsteps + 1
|
||||
|
||||
! update time step for precise snapshots
|
||||
!
|
||||
call update_dtp()
|
||||
|
||||
! estimate the next time step
|
||||
!
|
||||
call new_time_step()
|
||||
|
||||
! get current time in seconds
|
||||
!
|
||||
tm_curr = get_timer_total()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -438,7 +438,7 @@ module integrals
|
||||
use equations , only : ien, imx, imy, imz
|
||||
use equations , only : magnetized, adiabatic_index, csnd
|
||||
use equations , only : errors
|
||||
use evolution , only : step, time, dtn, dth, dte
|
||||
use evolution , only : step, time, dt, dth, dte
|
||||
use forcing , only : einj, rinj, arms
|
||||
use helpers , only : flush_and_sync
|
||||
#ifdef MPI
|
||||
@ -1268,7 +1268,7 @@ module integrals
|
||||
! write down the integrals and statistics to appropriate files
|
||||
!
|
||||
if (stored) then
|
||||
write(funit,"(i9,13(1x,1es18.8e3))") step, time, dtn, inarr(1:10), arms
|
||||
write(funit,"(i9,13(1x,1es18.8e3))") step, time, dt, inarr(1:10), arms
|
||||
write(sunit,"(i9,23(1x,1es18.8e3))") step, time &
|
||||
, avarr(1), mnarr(1), mxarr(1) &
|
||||
, avarr(2), mnarr(2), mxarr(2) &
|
||||
|
@ -213,7 +213,7 @@ module io
|
||||
public :: restart_snapshot_number, restart_from_snapshot
|
||||
public :: read_snapshot_parameter
|
||||
public :: read_restart_snapshot, write_restart_snapshot, write_snapshot
|
||||
public :: next_tout, precise_snapshots
|
||||
public :: update_dtp
|
||||
|
||||
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
!
|
||||
@ -916,31 +916,32 @@ module io
|
||||
!
|
||||
!===============================================================================
|
||||
!
|
||||
! function NEXT_TOUT:
|
||||
! ------------------
|
||||
!
|
||||
! Function returns the next data snapshot time.
|
||||
! subroutine UPDATE_DTP:
|
||||
! ---------------------
|
||||
!
|
||||
! Subroutine updates dtp from module EVOLUTION.
|
||||
!
|
||||
!===============================================================================
|
||||
!
|
||||
real(kind=8) function next_tout()
|
||||
subroutine update_dtp()
|
||||
|
||||
use evolution, only : time, dtp
|
||||
|
||||
! local variables are not implicit by default
|
||||
!
|
||||
implicit none
|
||||
!
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
if (hsnap > 0.0d+00) then
|
||||
next_tout = tsnap
|
||||
else
|
||||
next_tout = huge(hsnap)
|
||||
if (precise_snapshots) then
|
||||
if (tsnap > time) then
|
||||
dtp = tsnap - time
|
||||
else
|
||||
dtp = hsnap
|
||||
endif
|
||||
end if
|
||||
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
end function next_tout
|
||||
end subroutine update_dtp
|
||||
!
|
||||
!===============================================================================
|
||||
!!
|
||||
@ -1260,7 +1261,7 @@ module io
|
||||
use blocks , only : change_blocks_process
|
||||
use coordinates , only : nn => bcells, ncells, nghosts
|
||||
use coordinates , only : xmin, xmax, ymin, ymax, zmin, zmax
|
||||
use evolution , only : step, time, dt, dtn, dte
|
||||
use evolution , only : step, time, dt, dth, dte
|
||||
use evolution , only : niterations, nrejections, errs
|
||||
use forcing , only : nmodes, fcoefs, einj
|
||||
use hash , only : xxh64
|
||||
@ -1415,8 +1416,8 @@ module io
|
||||
read(svalue, fmt = *) time
|
||||
case('dt')
|
||||
read(svalue, fmt = *) dt
|
||||
case('dtn')
|
||||
read(svalue, fmt = *) dtn
|
||||
case('dth')
|
||||
read(svalue, fmt = *) dth
|
||||
case('dte')
|
||||
read(svalue, fmt = *) dte
|
||||
case('niterations')
|
||||
@ -2248,7 +2249,7 @@ module io
|
||||
#endif /* NDIMS == 3 */
|
||||
use coordinates , only : bdims => domain_base_dims
|
||||
use equations , only : eqsys, eos, nv
|
||||
use evolution , only : step, time, dt, dtn, dte, cfl, glm_alpha, errs
|
||||
use evolution , only : step, time, dt, dth, dte, cfl, glm_alpha, errs
|
||||
use evolution , only : atol, rtol, mrej, niterations, nrejections
|
||||
use forcing , only : nmodes, fcoefs, einj
|
||||
use iso_fortran_env, only : error_unit
|
||||
@ -2396,7 +2397,7 @@ module io
|
||||
call write_attribute_xml(lun, "step" , step)
|
||||
call write_attribute_xml(lun, "time" , time)
|
||||
call write_attribute_xml(lun, "dt" , dt)
|
||||
call write_attribute_xml(lun, "dtn" , dtn)
|
||||
call write_attribute_xml(lun, "dth" , dth)
|
||||
call write_attribute_xml(lun, "dte" , dte)
|
||||
call write_attribute_xml(lun, "cfl" , cfl)
|
||||
call write_attribute_xml(lun, "glm_alpha", glm_alpha)
|
||||
@ -4184,7 +4185,7 @@ module io
|
||||
use coordinates , only : xmin, xmax, ymin, ymax, zmin, zmax
|
||||
use coordinates , only : periodic
|
||||
use equations , only : eqsys, eos, adiabatic_index, csnd
|
||||
use evolution , only : step, time, dt, dtn, dte, cfl, glm_alpha, errs
|
||||
use evolution , only : step, time, dt, dth, dte, cfl, glm_alpha, errs
|
||||
use evolution , only : atol, rtol, mrej, niterations, nrejections
|
||||
use forcing , only : nmodes, einj, fcoefs
|
||||
use hdf5 , only : hid_t
|
||||
@ -4287,7 +4288,7 @@ module io
|
||||
call write_attribute(gid, 'zmax', zmax)
|
||||
call write_attribute(gid, 'time', time)
|
||||
call write_attribute(gid, 'dt' , dt )
|
||||
call write_attribute(gid, 'dtn' , dtn )
|
||||
call write_attribute(gid, 'dth' , dth )
|
||||
call write_attribute(gid, 'dte' , dte )
|
||||
call write_attribute(gid, 'cfl' , cfl )
|
||||
call write_attribute(gid, 'glm_alpha', glm_alpha)
|
||||
@ -4385,7 +4386,7 @@ module io
|
||||
use blocks , only : get_mblocks, get_dblocks, get_nleafs
|
||||
use coordinates , only : ncells
|
||||
use coordinates , only : xmin, xmax, ymin, ymax, zmin, zmax
|
||||
use evolution , only : step, time, dt, dtn, dte
|
||||
use evolution , only : step, time, dt, dth, dte
|
||||
use evolution , only : niterations, nrejections, errs
|
||||
use forcing , only : nmodes, fcoefs
|
||||
use hdf5 , only : hid_t
|
||||
@ -4460,7 +4461,7 @@ module io
|
||||
call read_attribute(gid, 'zmax', zmax)
|
||||
call read_attribute(gid, 'time', time)
|
||||
call read_attribute(gid, 'dt' , dt )
|
||||
call read_attribute(gid, 'dtn' , dtn )
|
||||
call read_attribute(gid, 'dth' , dth )
|
||||
call read_attribute(gid, 'dte' , dte )
|
||||
call read_attribute(gid, 'errs(1)', errs(1))
|
||||
call read_attribute(gid, 'errs(2)', errs(2))
|
||||
|
Loading…
x
Reference in New Issue
Block a user