Load definition of the PML damping term.
Type | Intent | Optional | 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 |
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