Load from file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(free_conditions_object), | intent(inout) | :: | self | Free conditions. |
||
| 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(free_conditions_object), intent(inout) :: self !< Free conditions.
type(file_ini), intent(in) :: fini !< Simulation parameters ini file handler.
logical, intent(in), optional :: go_on_fail !< Go on if load fails.
real(R8P) :: velocity(1:3) !< Velocity loading buffer.
call fini%get(section_name=INI_SECTION_NAME, option_name='velocity', val=velocity, error=self%error%status)
if (present(go_on_fail)) then
if (.not.go_on_fail) &
call self%error%check(message='failed to load ['//INI_SECTION_NAME//'].(velocity)', is_severe=.not.go_on_fail)
endif
if (self%error%status <= 0) self%velocity = ex * velocity(1) + ey * velocity(2) + ez * velocity(3)
endsubroutine load_from_file