Merge branch 'master' into reconnection

This commit is contained in:
Grzegorz Kowal 2020-08-19 21:37:09 -03:00
commit 320e18cce7
2 changed files with 16 additions and 10 deletions

View File

@ -64,10 +64,10 @@ module evolution
integer , save :: stages = 2
real(kind=8) , save :: cfl = 5.0d-01
! coefficient controlling the decay of scalar potential ѱ
! coefficients controlling the decay of scalar potential ѱ
!
real(kind=8) , save :: alpha = 2.0d+00
real(kind=8) , save :: decay = 1.0d+00
real(kind=8) , save :: glm_alpha = 5.0d-01
real(kind=8) , save :: decay = 7.788007830714049d-01
! time variables
!
@ -91,7 +91,7 @@ module evolution
! declare public variables
!
public :: cfl, step, time, dt, dtn
public :: step, time, dt, dtn, cfl, glm_alpha
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
@ -171,7 +171,7 @@ module evolution
call get_parameter("time_advance", integration)
call get_parameter("stages" , stages )
call get_parameter("cfl" , cfl )
call get_parameter("alpha" , alpha )
call get_parameter("glm_alpha" , glm_alpha )
! select the integration method, check the correctness of the integration
! parameters and adjust the CFL coefficient if necessary
@ -251,7 +251,7 @@ module evolution
! calculate the decay factor for magnetic field divergence scalar source term
!
decay = exp(- alpha * cfl)
decay = exp(- glm_alpha * cfl)
! allocate space for the increment array
!
@ -384,7 +384,7 @@ module evolution
call print_parameter(verbose, "time advance" , name_int)
call print_parameter(verbose, "CFL coefficient" , cfl )
if (magnetized) then
call print_parameter(verbose, "GLM alpha coefficient", alpha )
call print_parameter(verbose, "GLM alpha coefficient", glm_alpha)
end if
end if

View File

@ -2013,7 +2013,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
use evolution , only : step, time, dt, dtn, cfl, glm_alpha
use forcing , only : nmodes, fcoefs, einj
use iso_fortran_env, only : error_unit
use mpitools , only : nprocs, nproc
@ -2162,6 +2162,8 @@ module io
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, "cfl" , cfl)
call write_attribute_xml(lun, "glm_alpha", glm_alpha)
write(lun,"(a)") '</Evolution>'
write(lun,"(a)") '<Forcing>'
call write_attribute_xml(lun, "nmodes" , nmodes)
@ -2471,7 +2473,7 @@ module io
#endif /* NDIMS == 3 */
use coordinates , only : bdims => domain_base_dims
use equations , only : eqsys, eos, nv, pvars, adiabatic_index, csnd
use evolution , only : step, time, dt, dtn
use evolution , only : step, time, dt, dtn, cfl, glm_alpha
use iso_fortran_env, only : error_unit
use mpitools , only : nprocs, nproc
use parameters , only : get_parameter_file
@ -2609,6 +2611,8 @@ module io
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, "cfl" , cfl)
call write_attribute_xml(lun, "glm_alpha", glm_alpha)
write(lun,"(a)") '</Evolution>'
write(lun,"(a)") '<Snapshots>'
call write_attribute_xml(lun, "isnap" , isnap)
@ -3932,7 +3936,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
use evolution , only : step, time, dt, dtn, cfl, glm_alpha
use forcing , only : nmodes, einj, fcoefs
use hdf5 , only : hid_t
use hdf5 , only : h5gcreate_f, h5gclose_f
@ -4032,6 +4036,8 @@ module io
call write_attribute(gid, 'time', time)
call write_attribute(gid, 'dt' , dt )
call write_attribute(gid, 'dtn' , dtn )
call write_attribute(gid, 'cfl' , cfl )
call write_attribute(gid, 'glm_alpha', glm_alpha)
if (eos == 'adi') then
call write_attribute(gid, 'adiabatic_index', adiabatic_index)
end if