tem_load_pmlLayer Subroutine

public subroutine tem_load_pmlLayer(conf, thandle, me)

Load definition of the PML damping term.

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

type(tem_pmlLayer_type), intent(out) :: me

Global pmlLayer data type


Calls

proc~~tem_load_pmllayer~~CallsGraph proc~tem_load_pmllayer tem_load_pmlLayer aot_get_val aot_get_val proc~tem_load_pmllayer->aot_get_val aot_table_close aot_table_close proc~tem_load_pmllayer->aot_table_close aot_table_length aot_table_length proc~tem_load_pmllayer->aot_table_length aot_table_open aot_table_open proc~tem_load_pmllayer->aot_table_open

Called by

proc~~tem_load_pmllayer~~CalledByGraph proc~tem_load_pmllayer tem_load_pmlLayer proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->proc~tem_load_pmllayer 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 tem_load_pmlLayer(conf, thandle, me)
    ! ---------------------------------------------------------------------------
    !> lua state type
    type(flu_State) :: conf
    !> aotus parent handle
    integer, intent(in) :: thandle
    !> Global pmlLayer data type
    type(tem_pmlLayer_type), intent(out) :: me
    ! ---------------------------------------------------------------------------
    integer :: cent_handle
    integer :: i
    integer :: iError
    ! ---------------------------------------------------------------------------
    ! Plane_origin
    call aot_table_open( L       = conf,                                       &
      &                  parent  = thandle,                                    &
      &                  thandle = cent_handle,                                &
      &                  key     = 'plane_origin' )
    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%plane_origin(i),                        &
          &               ErrCode = iError )
      end do
    else
      write(*,*) 'ERROR while reading Plane origin of PML Layer,'
      write(*,*) 'should have 3 entries for each coordinate!'
      STOP
    end if
    call aot_table_close(conf, cent_handle)
    write(logUnit(1),*) ' * plane_origin =', me%plane_origin



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

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

    !damp_exponent
    call aot_get_val( L       = conf,                                          &
      &               thandle = thandle,                                       &
      &               key     = 'damp_exponent',                               &
      &               val     = me%dampExponent,                               &
      &               ErrCode = iError )
    if (iError .ne. 0) then
      me%dampExponent = 1
    endif

    write(logUnit(1),*) ' * Damping_exponent =', me%dampExponent

  end subroutine tem_load_pmlLayer