DRIVER, EQUATIONS: Reset eqsys and eos for restarted jobs.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2019-01-28 20:21:38 -02:00
parent fc5db6dd29
commit 26bf99d4c1
2 changed files with 15 additions and 8 deletions

View File

@ -90,6 +90,8 @@ program amun
! default parameters
!
character(len=32) :: eqsys = "hydrodynamic"
character(len=32) :: eos = "adiabatic"
integer :: toplev = 1
integer :: nmax = huge(1), ndat = 1
real(kind=8) :: tmax = 0.0d+00, trun = 9.999d+03, tsav = 3.0d+01
@ -279,8 +281,12 @@ program amun
! the restart snapshot, otherwise, read them from the parameter file
!
if (job_restart) then
call read_snapshot_parameter("eqsys" , eqsys , iret)
call read_snapshot_parameter("eos" , eos , iret)
call read_snapshot_parameter("maxlev", toplev, iret)
else
call get_parameter_string("equation_system" , eqsys)
call get_parameter_string("equation_of_state", eos )
call get_parameter_integer("maxlev", toplev)
end if
@ -345,7 +351,7 @@ program amun
! initialize module EQUATIONS
!
call initialize_equations(master, iret)
call initialize_equations(eqsys, eos, master, iret)
! jump to the end if the equations could not be initialized
!

View File

@ -254,7 +254,7 @@ module equations
!
!===============================================================================
!
subroutine initialize_equations(verbose, iret)
subroutine initialize_equations(teqs, teos, verbose, iret)
! include external procedures and variables
!
@ -267,8 +267,9 @@ module equations
! subroutine arguments
!
logical, intent(in) :: verbose
integer, intent(inout) :: iret
character(len=32), intent(in) :: teqs, teos
logical , intent(in) :: verbose
integer , intent(inout) :: iret
! local variables
!
@ -296,13 +297,13 @@ module equations
call start_timer(imi)
#endif /* PROFILE */
! get the system of equations
! set the system of equations
!
call get_parameter_string("equation_system" , eqsys)
eqsys = teqs
! get the equation of state
! set the equation of state
!
call get_parameter_string("equation_of_state" , eos )
eos = teos
! get the primitive variable solver
!