20 integer(kind=intType) :: idom, jdom
23 integer(kind=intType) :: nInterpol, elemID, nalloc, intInfo(3), intInfo2(3)
24 integer(kind=intType) :: i, ii, jj, kk, j, nn, myI, myJ, myK
25 integer(kind=intTYpe) :: iii, jjj, kkk, n, myind, nx, ny, nz, myindex
26 logical :: invalid, failed
27 real(kind=realtype) :: uu, vv, ww, err1, err2
28 real(kind=realtype) :: uvw(5), uvw2(5), xx(4), pt(3), xcheck(3)
29 real(kind=realtype),
dimension(:, :),
allocatable :: offset
30 real(kind=realtype) :: oneminusu, oneminusv, oneminusw, weight(8)
32 integer(kind=intType),
dimension(:),
pointer :: BB
34 integer(kind=intType),
dimension(:),
pointer :: frontLeaves
35 integer(kind=intType),
dimension(:),
pointer :: frontLeavesNew
41 allocate (bb(20), bb2(20), frontleaves(25), frontleavesnew(25),
stack(100))
44 n =
size(ofringe%x, 2)
47 allocate (offset(3, n))
58 xx(1:3) = ofringe%x(:, i) + offset(:, i)
61 oblock%qualDonor, ninterpol, bb, frontleaves, frontleavesnew, failed)
63 if (intinfo(1) >= 0)
then
67 xcheck = xcheck + weight(j) * oblock%xADT(:, oblock%hexaConn(j, intinfo(3)))
75 if (intinfo(1) >= 0 .and. failed)
then
79 oblock%qualDonor, ninterpol, bb2, frontleaves, frontleavesnew)
85 xcheck = xcheck + weight(j) * oblock%xADT(:, oblock%hexaConn(j, intinfo(3)))
102 elemfound:
if (intinfo(1) >= 0)
then
105 elemid = intinfo(3) - 1
106 ii = mod(elemid, oblock%il) + 1
107 jj = mod(elemid / oblock%il, oblock%jl) + 1
108 kk = elemid / (oblock%il * oblock%jl) + 1
111 fringe%donorProc = oblock%proc
112 fringe%donorBlock = oblock%block
113 fringe%dIndex =
windindex(ii, jj, kk, oblock%il, oblock%jl, oblock%kl)
114 fringe%donorFrac = uvw(1:3)
115 fringe%quality = uvw(4)
119 fringe%myBlock = ofringe%block
121 myi = mod((i - 1), ofringe%nx) + 2
122 myj = mod((i - 1) / ofringe%nx, ofringe%ny) + 2
123 myk = (i - 1) / (ofringe%nx * ofringe%ny) + 2
124 fringe%myIndex =
windindex(myi, myj, myk, ofringe%il, ofringe%jl, ofringe%kl)
131 if (oblock%invalidDonor(ii + iii, jj + jjj, kk + kkk) .ne. 0)
then
138 if (.not. invalid)
then
140 ofringe%nDonor, fringe)
147 if ((ofringe%isWall(i) > 0) .and. .not. (oblock%nearWall(ii, jj, kk) == 1))
then
152 if (uvw(1) >=
half)
then
156 if (uvw(2) >=
half)
then
160 if (uvw(3) >=
half)
then
165 fringe%dIndex =
windindex(ii, jj, kk, oblock%il, oblock%jl, oblock%kl)
171 deallocate (offset, bb, bb2, frontleaves, frontleavesnew,
stack)
subroutine fringesearch(oBlock, oFringe)
subroutine containmenttreesearchsinglepoint(ADT, coor, intInfo, uvw, arrDonor, nInterpol, BB, frontLeaves, frontLeavesNew, failed)
subroutine mindistancetreesearchsinglepoint(ADT, coor, intInfo, uvw, arrDonor, nInterpol, BB, frontLeaves, frontLeavesNew)
integer(kind=inttype), dimension(:), pointer stack
integer(kind=inttype), parameter idonorsearch
real(kind=realtype), parameter zero
real(kind=realtype), parameter half
real(kind=realtype), parameter large
integer(kind=inttype), parameter isurfacecorrection
type(fringetype), dimension(:), pointer localwallfringes
integer(kind=inttype) nlocalwallfringe
type(fringetype), dimension(:), pointer tmpfringeptr
subroutine addtofringelist(fringeList, n, fringe)
subroutine addtofringebuffer(intBuffer, realBuffer, n, fringe)
subroutine fractoweights2(frac, weights)
integer(kind=inttype) function windindex(i, j, k, il, jl, kl)
real(kind=realtype) function mynorm2(x)
subroutine surfacecorrection(oBlock, oFringe, offset, n)