Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | freq |
temporal predefined fun type |
||
real(kind=rk), | intent(inout) | :: | phi |
temporal predefined fun type |
||
real(kind=rk), | intent(inout) | :: | offset |
temporal predefined fun type |
||
type(flu_State) | :: | conf |
lua state type |
|||
integer, | intent(in) | :: | thandle |
aotus parent handle |
subroutine load_temporal_cos( freq, phi, offset, conf, thandle )
! ---------------------------------------------------------------------------
!> temporal predefined fun type
real(kind=rk), intent(inout) :: freq, phi, offset
!> lua state type
type(flu_State) :: conf
!> aotus parent handle
integer, intent(in) :: thandle
! ---------------------------------------------------------------------------
! local variables
integer :: iError
! ---------------------------------------------------------------------------
! load angular velocity
call aot_get_val( L = conf, &
& thandle = thandle, &
& key = 'frequency', &
& val = freq, &
& ErrCode = iError, &
& default = 1.0_rk)
if (btest(iError, aoterr_Fatal)) then
write(logUnit(1),*)'FATAL Error occured, while retrieving min_factor :'
if (btest(iError, aoterr_NonExistent)) &
& write(logUnit(1),*)'Variable not existent!'
if (btest(iError, aoterr_WrongType)) &
& write(logUnit(1),*)'Variable has wrong type!'
write(logUnit(1),*)'STOPPING'
call tem_abort()
end if
! load initial phase
call aot_get_val( L = conf, &
& thandle = thandle, &
& key = 'phase', &
& val = phi, &
& ErrCode = iError, &
& default = 0.0_rk )
if (btest(iError, aoterr_Fatal)) then
write(logUnit(1),*)'FATAL Error occured, while retrieving max_factor :'
if (btest(iError, aoterr_NonExistent)) &
& write(logUnit(1),*)'Variable not existent!'
if (btest(iError, aoterr_WrongType)) &
& write(logUnit(1),*)'Variable has wrong type!'
write(logUnit(1),*)'STOPPING'
call tem_abort()
end if
! load initial phase
call aot_get_val( L = conf, &
& thandle = thandle, &
& key = 'offset', &
& val = offset, &
& ErrCode = iError, &
& default = 0.0_rk )
if (btest(iError, aoterr_Fatal)) then
write(logUnit(1),*)'FATAL Error occured, while retrieving max_factor :'
if (btest(iError, aoterr_NonExistent)) &
& write(logUnit(1),*)'Variable not existent!'
if (btest(iError, aoterr_WrongType)) &
& write(logUnit(1),*)'Variable has wrong type!'
write(logUnit(1),*)'STOPPING'
call tem_abort()
end if
write(logUnit(3), "(A, F10.5)") " frequency: ", freq
write(logUnit(3), "(A, F10.5)") " phase: ", phi
write(logUnit(3), "(A, F10.5)") " offset: ", offset
end subroutine load_temporal_cos