Load from file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | self | Time object. |
||
| type(file_ini), | intent(in) | :: | fini | Simulation parameters ini file handler. |
||
| logical, | intent(in), | optional | :: | go_on_fail | Go on if load fails. |
subroutine load_from_file(self, fini, go_on_fail)
!< Load from file.
class(time_object), intent(inout) :: self !< Time object.
type(file_ini), intent(in) :: fini !< Simulation parameters ini file handler.
logical, intent(in), optional :: go_on_fail !< Go on if load fails.
logical :: go_on_fail_ !< Go on if load fails, local variable.
go_on_fail_ = .true. ; if (present(go_on_fail)) go_on_fail_ = go_on_fail
call fini%get(section_name=INI_SECTION_NAME, option_name='is_unsteady', val=self%is_unsteady, error=self%error%status)
if (.not.go_on_fail_) &
call self%error%check(message='failed to load ['//INI_SECTION_NAME//'].(is_unsteady)', is_severe=.not.go_on_fail_)
call fini%get(section_name=INI_SECTION_NAME, option_name='n_max', val=self%n_max, error=self%error%status)
if (.not.go_on_fail_)call self%error%check(message='failed to load ['//INI_SECTION_NAME//'].(n_max)', is_severe=.not.go_on_fail_)
call fini%get(section_name=INI_SECTION_NAME, option_name='t_max', val=self%t_max, error=self%error%status)
if (.not.go_on_fail_)call self%error%check(message='failed to load ['//INI_SECTION_NAME//'].(t_max)', is_severe=.not.go_on_fail_)
call fini%get(section_name=INI_SECTION_NAME, option_name='cfl', val=self%CFL, error=self%error%status)
if (.not.go_on_fail_) call self%error%check(message='failed to load ['//INI_SECTION_NAME//'].(cfl)', is_severe=.not.go_on_fail_)
endsubroutine load_from_file