load_ic_gausspulse Subroutine

public subroutine load_ic_gausspulse(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_gausspulse_type), intent(out) :: me

Global gauss pulse data type


Calls

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

Called by

proc~~load_ic_gausspulse~~CalledByGraph proc~load_ic_gausspulse load_ic_gausspulse proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->proc~load_ic_gausspulse 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_gausspulse(conf, thandle, me)
    ! ---------------------------------------------------------------------------
    !> lua state type
    type(flu_State) :: conf
    !> aotus parent handle
    integer, intent(in) :: thandle
    !> Global gauss pulse data type
    type(ic_gausspulse_type), intent(out) :: me
    ! ---------------------------------------------------------------------------
    integer :: cent_handle
    integer :: i
    integer :: iError
    ! ---------------------------------------------------------------------------

    !center
    call aot_table_open( L       = conf,                                       &
      &                  parent  = thandle,                                    &
      &                  thandle = cent_handle,                                &
      &                  key     = 'center' )
    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%center(i),                              &
          &               ErrCode = iError )
      end do
    else
      write(*,*) 'ERROR while reading the center of a gauss pulse,'
      write(*,*) 'should have 3 entries for each coordinate!'
      STOP
    end if
    call aot_table_close(conf, cent_handle)
    write(logUnit(1),*) ' * center =', me%center

    !halfwidth
    call aot_get_val( L       = conf,                                          &
      &               thandle = thandle,                                       &
      &               key     = 'halfwidth',                                   &
      &               val     = me%halfwidth,                                  &
      &               ErrCode = iError )
    write(logUnit(1),*) ' * halfwidth =', me%halfwidth

    !amplitude
    call aot_get_val( L       = conf,                                          &
      &               thandle = thandle,                                       &
      &               key     = 'amplitude',                                   &
      &               val     = me%amplitude,                                  &
      &               ErrCode = iError )
    write(logUnit(1),*) ' * amplitude =', me%amplitude

    !backgroud
    call aot_get_val( L       = conf,                                          &
      &               thandle = thandle,                                       &
      &               key     = 'background',                                  &
      &               val     = me%background,                                 &
      &               ErrCode = iError )
    write(logUnit(1),*) ' * background=', me%background

  end subroutine load_ic_gausspulse