load gauss pulse variables to set initial condition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | conf |
lua state type |
|||
integer, | intent(in) | :: | thandle |
aotus parent handle |
||
type(ic_tgv_type), | intent(out) | :: | me |
TGV data type |
subroutine load_ic_tgv(conf, thandle, me) ! --------------------------------------------------------------------------- !> lua state type type(flu_State) :: conf !> aotus parent handle integer, intent(in) :: thandle !> TGV data type type(ic_tgv_type), intent(out) :: me ! --------------------------------------------------------------------------- integer :: cent_handle integer :: i integer :: iError ! --------------------------------------------------------------------------- ! Load x0 call aot_table_open( L = conf, & & parent = thandle, & & thandle = cent_handle, & & key = 'x0' ) if (aot_table_length(L=conf, thandle=cent_handle) == 3) then do i=1,3 call aot_get_val( L = conf, & & thandle = cent_handle, & & pos = i, & & val = me%x0(i), & & ErrCode = iError ) end do else me%x0 = [0.0_rk, 0.0_rk, 0.0_rk] end if call aot_table_close(conf, cent_handle) ! Load x0 call aot_table_open( L = conf, & & parent = thandle, & & thandle = cent_handle, & & key = 'u0' ) if (aot_table_length(L=conf, thandle=cent_handle) == 2) then do i=1,2 call aot_get_val( L = conf, & & thandle = cent_handle, & & pos = i, & & val = me%u0(i), & & ErrCode = iError ) end do else me%u0 = [1.0_rk, 1.0_rk] end if call aot_table_close(conf, cent_handle) ! Load p0 call aot_get_val( L = conf, & & thandle = thandle, & & key = 'p0', & & val = me%p0, & & ErrCode = iError, & & default = 0._rk ) ! Load Re call aot_get_val( L = conf, & & thandle = thandle, & & key = 'Re', & & val = me%Re, & & ErrCode = iError, & & default = 25._rk ) me%tD = me%Re * 0.5_rk write(logUnit(5),"(A,3F8.4)") ' x0 = ', me%x0 write(logUnit(5),"(A,2F8.4)") ' u0 = ', me%u0 write(logUnit(5),"(A,1F8.4)") ' p0 = ', me%p0 write(logUnit(5),"(A,1F8.4)") ' Re = ', me%Re write(logUnit(5),"(A,1F8.4)") ' tD = ', me%tD end subroutine load_ic_tgv