load_ic_tgv Subroutine

public subroutine load_ic_tgv(conf, thandle, me)

load gauss pulse variables to set initial condition

Arguments

Type IntentOptional 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


Calls

proc~~load_ic_tgv~~CallsGraph proc~load_ic_tgv load_ic_tgv aot_get_val aot_get_val proc~load_ic_tgv->aot_get_val aot_table_close aot_table_close proc~load_ic_tgv->aot_table_close aot_table_length aot_table_length proc~load_ic_tgv->aot_table_length aot_table_open aot_table_open proc~load_ic_tgv->aot_table_open

Called by

proc~~load_ic_tgv~~CalledByGraph proc~load_ic_tgv load_ic_tgv proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->proc~load_ic_tgv proc~tem_load_spatial tem_load_spatial proc~tem_load_spatial->proc~load_spatial_predefined proc~load_spacetime_predefined load_spacetime_predefined proc~load_spacetime_predefined->proc~tem_load_spatial proc~tem_load_ic tem_load_ic proc~tem_load_ic->proc~tem_load_spatial proc~tem_load_spacetime_single tem_load_spacetime_single proc~tem_load_spacetime_single->proc~load_spacetime_predefined

Source Code

  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