Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | pchunk | |||
real(kind=rp), | intent(in) | :: | a | Distance to plasma edge as measured from the magnetic axis. |
||
real(kind=rp), | intent(in) | :: | R0 | Distance to plasma edge as measured from the magnetic axis. |
||
real(kind=rp), | intent(in), | DIMENSION(pchunk) | :: | Xcyl_R | ||
real(kind=rp), | intent(in), | DIMENSION(pchunk) | :: | Xcyl_Z | ||
integer(kind=is), | intent(inout), | DIMENSION(pchunk) | :: | flag |
subroutine cyl_check_if_confined_p(pchunk,a,R0,Xcyl_R,Xcyl_Z,flag)
implicit none
INTEGER, INTENT(IN) :: pchunk
REAL(rp),DIMENSION(pchunk), INTENT(IN) :: Xcyl_R
REAL(rp),DIMENSION(pchunk), INTENT(IN) :: Xcyl_Z
INTEGER(is),DIMENSION(pchunk),INTENT(INOUT) :: flag
REAL(rp), INTENT(IN) :: a,R0
!! Distance to plasma edge as measured from the magnetic axis.
INTEGER :: cc
!$OMP SIMD
! !$OMP& aligned(Xcyl_R,Xcyl_Z,flag)
do cc=1_idef,pchunk
if (sqrt((Xcyl_R(cc)-R0)**2+Xcyl_Z(cc)**2) .gt. a) flag(cc)=0_is
end do
!$OMP END SIMD
end subroutine cyl_check_if_confined_p