ic_tgv_Sxz_for Function

public pure function ic_tgv_Sxz_for(me, coord, n) result(s)

Arguments

Type IntentOptional Attributes Name
type(ic_tgv_type), intent(in) :: me

global gauss pulse data

real(kind=rk), intent(in) :: coord(n,3)

coordinate of an element

integer, intent(in) :: n

number of return values

Return Value real(kind=rk), (n)

return value which is sent to state variable


Source Code

  pure function ic_tgv_Sxz_for( me, coord, n ) result( s )
    ! ---------------------------------------------------------------------------
    !> global gauss pulse data
    type(ic_tgv_type), intent(in) :: me
    !> number of return values
    integer, intent(in) :: n
    !> coordinate of an element
    real(kind=rk), intent(in) :: coord(n, 3)
    !> return value which is sent to state variable
    real(kind=rk) :: s(n)
    ! ---------------------------------------------------------------------------
    integer :: iElem
    ! ---------------------------------------------------------------------------

    do iElem = 1, n
      s(iElem) = -me%u0(1) * ( sin(coord(iElem,1)-me%x0(1)) &
        &                    * cos(coord(iElem,2)-me%x0(2)) &
        &                    * sin(coord(iElem,3)-me%x0(3)) ) * 0.5_rk
    end do
  end function ic_tgv_Sxz_for