19 common /nekmpi/ nidd,npp,nekcomm,nekgroup,nekreal
21 common /intp_h/ ih_intp(2,intp_hmax)
28 common /cbxmi/ xmi(lx1*ly1*lz1*lelt),
29 $ ymi(lx1*ly1*lz1*lelt),
30 $ zmi(lx1*ly1*lz1*lelt)
34 tol = max(5e-13,tolin)
39 $
write(6,*)
'call intp_setup ',
'tol=', tol
41 if (nmsh.ge.1 .and. nmsh.lt.lx1-1)
then
42 if (nio.eq.0)
write(6,*)
'Nmsh for findpts:',nmsh
48 call map_m_to_n(xmi((ie-1)*nxi*nyi*nzi + 1),nxi,xm1(1,1,1,ie)
49 $ ,lx1,if3d,w,
size(w))
50 call map_m_to_n(ymi((ie-1)*nxi*nyi*nzi + 1),nyi,ym1(1,1,1,ie)
51 $ ,ly1,if3d,w,
size(w))
53 $
call map_m_to_n(zmi((ie-1)*nxi*nyi*nzi + 1),nzi,zm1(1,1,1,ie)
54 $ ,lz1,if3d,w,
size(w))
58 call fgslib_findpts_setup(ih_intp1,nekcomm,npp,ldim,
59 & xm1,ym1,zm1,nx1,ny1,nz1,
60 & nelm,nx1,ny1,nz1,bb_t,nelm+2,nelm+2,
63 call fgslib_findpts_setup(ih_intp2,nekcomm,npp,ldim,
64 $ xmi,ymi,zmi,nxi,nyi,nzi,
65 $ nelm,2*nxi,2*nyi,2*nzi,bb_t,n,n,
69 call fgslib_findpts_setup(ih_intp1,nekcomm,npp,ldim,
70 & xm1,ym1,zm1,nx1,ny1,nz1,
71 & nelm,2*nx1,2*ny1,2*nz1,bb_t,n,n,
76 ihcounter = ihcounter + 1
78 if (ih .gt. intp_hmax)
79 $
call exitti(
'Maximum number of handles exceeded!$',intp_hmax)
80 ih_intp(1,ih) = ih_intp1
81 ih_intp(2,ih) = ih_intp2
86 subroutine interp_nfld(out,fld,nfld,xp,yp,zp,n,iwk,rwk,nmax,
106 common /intp_h/ ih_intp(2,intp_hmax)
109 real xp(*),yp(*),zp(*)
119 if (ih.lt.1 .or. ih.gt.intp_hmax)
120 $
call exitti(
'invalid intp handle!$',ih)
122 ih_intp1 = ih_intp(1,ih)
123 ih_intp2 = ih_intp(2,ih)
127 if (nio.eq.0 .and. loglevel.gt.2)
128 $
write(6,*)
'call intp_nfld', ih, ih_intp1, ih_intp2
132 &
'ABORT: n>nmax in intp_nfld', n, nmax
139 if(nio.eq.0 .and. loglevel.gt.2)
write(6,*)
'call findpts'
140 call fgslib_findpts(ih_intp2,
151 if(iwk(in,1).eq.1)
then
152 if(rwk(in,1).gt.10*tol)
then
154 if (nfail.le.5)
write(6,
'(a,1p4e15.7)')
155 &
' WARNING: point on boundary or outside the mesh xy[z]d^2: ',
156 & xp(in),yp(in),zp(in),rwk(in,1)
158 elseif(iwk(in,1).eq.2)
then
160 if (nfail.le.5)
write(6,
'(a,1p3e15.7)')
161 &
' WARNING: point not within mesh xy[z]: !',
162 & xp(in),yp(in),zp(in)
168 ltot = lelt*lx1*ly1*lz1
170 iin = (ifld-1)*ltot + 1
171 iout = (ifld-1)*n + 1
177 call fgslib_findpts_eval(ih_intp1,out(iout),is_out,
188 if(nn(2).gt.0 .or. loglevel.gt.2)
write(6,1) nn(1),nn(2)
189 1
format(
' total number of points = ',i12,/,
' failed = '
190 & ,i12,/,
' done :: intp_nfld')
198 common /intp_h/ ih_intp(2,intp_hmax)
200 ih_intp1 = ih_intp(1,ih)
201 ih_intp2 = ih_intp(2,ih)
203 call fgslib_findpts_free(ih_intp1)
204 call fgslib_findpts_free(ih_intp2)
211 call exitti(
'intp_setup is deprecated, see release notes!!$',1)
216 subroutine intp_do(fldout,fldin,nfld,xp,yp,zp,n,iwk,rwk,nmax,iflp)
218 call exitti(
'intp_do is deprecated, see release notes!!$',1)
225 call exitti(
'intp_free is deprecated, see release notes!!$',1)
subroutine exitti(stringi, idata)
subroutine interp_setup(ih, tolin, nmsh, nelm)
subroutine interp_free(ih)
subroutine intp_do(fldout, fldin, nfld, xp, yp, zp, n, iwk, rwk, nmax, iflp)
subroutine intp_setup(tolin)
subroutine interp_nfld(out, fld, nfld, xp, yp, zp, n, iwk, rwk, nmax, iflp, ih)
subroutine map_m_to_n(a, na, b, nb, if3d, w, ldw)