Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out) | :: | mask(3) |
Time to be read from the Lua script |
||
type(flu_State), | intent(inout) | :: | conf |
Handle to the Lua script. |
||
character(len=*), | intent(in) | :: | key |
Name of the table containing the time definition. Default: 'time'. |
||
integer, | intent(in), | optional | :: | parent |
Handle to the parent table. |
subroutine load_alignmask(mask, conf, key, parent)
!> Time to be read from the Lua script
logical, intent(out) :: mask(3)
!> Handle to the Lua script.
type(flu_state), intent(inout) :: conf
!> Name of the table containing the time definition. Default: 'time'.
character(len=*), intent(in) :: key
!> Handle to the parent table.
integer, intent(in), optional :: parent
! -------------------------------------------------------------------- !
integer :: iErr
integer :: thandle
! -------------------------------------------------------------------- !
call aot_table_open(L = conf, &
& parent = parent, &
& thandle = thandle, &
& key = trim(key) )
if (thandle /= 0) then
! The mask is given as a table load its components accordingly.
call aot_get_val(L = conf, &
& thandle = thandle, &
& val = mask(sim), &
& key = 'sim', &
& default = .false., &
& ErrCode = iErr )
call aot_get_val(L = conf, &
& thandle = thandle, &
& val = mask(iter), &
& key = 'iter', &
& default = .false., &
& ErrCode = iErr )
call aot_get_val(L = conf, &
& thandle = thandle, &
& val = mask(clock), &
& key = 'clock', &
& default = .false., &
& ErrCode = iErr )
else
! The mask is not given as a table, try to interpret it as a setting for
! the simtime.
mask = .false.
call aot_get_val(L = conf, &
& thandle = parent, &
& key = trim(key), &
& val = mask(sim), &
& default = .false., &
& ErrCode = iErr )
end if
call aot_table_close(conf, thandle)
end subroutine load_alignmask