50 ijknr,ijknri,ijknrj,ijknrk, &
62 TYPE(t_region
) :: region
64 INTEGER ,
INTENT(IN) :: ijknr,ijknri,ijknrj,ijknrk
65 INTEGER,
DIMENSION(4),
INTENT(IN) :: indexsearch
66 INTEGER,
DIMENSION(4),
INTENT(OUT) :: indexnew
68 LOGICAL,
INTENT(OUT) :: celllocate
70 REAL(RFREAL),
DIMENSION(3),
INTENT(IN) :: posplag
76 CHARACTER(CHRLEN) :: rcsidentstring
78 INTEGER :: ilev, nbound
80 REAL(RFREAL),
PARAMETER :: epsdegentol = -1.0e-10_rfreal
81 REAL(RFREAL) :: dpface
82 REAL(RFREAL),
DIMENSION(3) :: diffpos, facecentroid, sface
84 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: psnormal
85 REAL(RFREAL),
POINTER,
DIMENSION(:,:,:) :: pfc
91 rcsidentstring =
'$RCSfile: PLAG_InCellTest.F90,v $ $Revision: 1.3 $'
93 global => region%global
96 'PLAG_InCellTest.F90' )
100 ilev = region%currLevel
107 pfc => region%levels(ilev)%plag%fc
111 DO lbound = 1, nbound
118 sface(1:3) = -region%levels(ilev)%plag%si(xcoord:zcoord,ijknr)
119 facecentroid(1:3) = pfc(xcoord:zcoord,icoord,ijknr)
122 sface(1:3) = region%levels(ilev)%plag%si(xcoord:zcoord,ijknri)
123 facecentroid(1:3) = pfc(xcoord:zcoord,icoord,ijknri)
128 sface(1:3) = -region%levels(ilev)%plag%sj(xcoord:zcoord,ijknr)
129 facecentroid(1:3) = pfc(xcoord:zcoord,jcoord,ijknr)
132 sface(1:3) = region%levels(ilev)%plag%sj(xcoord:zcoord,ijknrj)
133 facecentroid(1:3) = pfc(xcoord:zcoord,jcoord,ijknrj)
138 sface(1:3) = -region%levels(ilev)%plag%sk(xcoord:zcoord,ijknr)
139 facecentroid(1:3) = pfc(xcoord:zcoord,kcoord,ijknr)
142 sface(1:3) = region%levels(ilev)%plag%sk(xcoord:zcoord,ijknrk)
143 facecentroid(1:3) = pfc(xcoord:zcoord,kcoord,ijknrk)
151 diffpos(1:3) = posplag(1:3)-facecentroid(1:3)
156 IF ( dpface < epsdegentol ) goto 999
163 indexnew(1:4) = indexsearch(1:4)
subroutine registerfunction(global, funName, fileName)
subroutine plag_incelltest(region, posPlag, indexSearch, ijkNR, ijkNRI, ijkNRJ, ijkNRK, indexNew, cellLocate)
long double dot_product(pnt vec1, pnt vec2)
subroutine deregisterfunction(global)