This function invokes the type of the boundary such as constant, lua or predefined Fortran function.
If temporal block is not defined than it returns value = 1.0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_temporal_type) | :: | temporal |
boundary state |
|||
type(tem_time_type), | intent(in) | :: | time |
timer object incl. the current time information |
return value of a function
function tem_temporal_for( temporal, time ) result( res )
! --------------------------------------------------------------------------
!> boundary state
type( tem_temporal_type ) :: temporal
!> timer object incl. the current time information
type(tem_time_type), intent( in ) :: time
!> return value of a function
real(kind=rk) :: res
! --------------------------------------------------------------------------
res = 0.0_rk
select case( trim(adjustl(temporal%kind)) )
case( 'none' )
res = temporal%const
case( 'const' )
res = temporal%const
case( 'lua_fun' )
res = temporal_lua_for( fun_ref = temporal%lua_fun_ref, &
& time = time, &
& conf = temporal%conf )
case( 'linear' )
res = temporal_linear_for( temporal%linear, time%sim )
case( 'smooth' )
res = temporal_smooth_for( temporal%linear, time%sim )
case( 'datafile' )
if ( temporal%from_file%periodic )then
res = temporal_from_file_periodic_for( me = temporal%from_file, &
& time = time )
else
write(logUnit(1),*)'Only Periodic datasets are currently implemented!'
write(logUnit(1),*)'STOPPING'
call tem_abort()
end if
case( 'cos' )
res = cos( 2.0_rk * PI * temporal%freq * time%sim + temporal%phi ) &
& + temporal%offset
end select
end function tem_temporal_for