Type | Intent | Optional | 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 which is sent to state variable
pure function ic_tgv_pressure_for( me, coord, n ) result( pressure ) ! --------------------------------------------------------------------------- !> 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) :: pressure(n) ! --------------------------------------------------------------------------- integer :: iElem real(kind=rk) :: xc, yc, p1, p2 !, zc ! --------------------------------------------------------------------------- do iElem = 1, n xc = 2._rk * ( coord(iElem,1) - me%x0(1) ) yc = 2._rk * ( coord(iElem,2) - me%x0(2) ) !zc = 2._rk * ( coord(iElem,3) - me%x0(3) ) ! p1 = cos(xc) * cos(zc) + 2._rk * cos(yc) ! p2 = cos(yc) * cos(zc) + 2._rk * cos(xc) p1 = cos(xc) p2 = cos(yc) pressure(iElem) = me%p0 - (p1+p2) * 0.25_rk end do end function ic_tgv_pressure_for