读取时间积分参数
time_integration_configuration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_integration_configuration), | intent(inout) | :: | self |
subroutine tic_read(self)
class(time_integration_configuration), intent(inout) :: self
integer :: iunit
real(rk) :: cfl !! CFL 数
real(rk) :: stop_time !! 停止计算时间
real(rk) :: dt !! 输出时间间隔
namelist /time_integration/ cfl, stop_time, dt
! 默认值
cfl = 0.3_rk
stop_time = 1.0_rk
dt = 0.5_rk
open (newunit=iunit, file=cli_obj%working_directory.join.cli_obj%file, &
status='old', action='read')
read (iunit, nml=time_integration)
close (iunit)
self%cfl = cfl
self%stop_time = stop_time
self%dt = dt
if (cli_obj%debug_mode) call self%print()
end subroutine tic_read