4 subroutine bcspeval(xget,yget,iselect,fval,
5 > x,nx,y,ny,ilinx,iliny,f,inf3,ier)
8 integer ilinx,iliny,nx,ny,inf3,ier
12 real x(nx),y(ny),f(4,4,inf3,ny)
112 call bcspevxy(xget,yget,x,nx,y,ny,ilinx,iliny,
113 > i(1),j(1),dx(1),dy(1),ier)
116 call bcspevfn(iselect,1,1,fval,i,j,dx,dy,f,inf3,ny)
126 subroutine bcspevxy(xget,yget,x,nx,y,ny,ilinx,iliny,
154 if((xget.lt.x(1)).or.(xget.gt.x(nx)))
then
155 zxtol=4.0e-7*max(abs(x(1)),abs(x(nx)))
156 if((xget.lt.x(1)-zxtol).or.(xget.gt.x(nx)+zxtol))
then
158 write(6,1001) xget,x(1),x(nx)
159 1001
format(
' ?bcspeval: xget=',1pe11.4,
' out of range ',
160 > 1pe11.4,
' to ',1pe11.4)
162 if((xget.lt.x(1)-0.5*zxtol).or.
163 > (xget.gt.x(nx)+0.5*zxtol))
164 >
write(6,1011) xget,x(1),x(nx)
165 1011
format(
' %bcspeval: xget=',1pe15.8,
' beyond range ',
166 > 1pe15.8,
' to ',1pe15.8,
' (fixup applied)')
167 if(xget.lt.x(1))
then
174 if((yget.lt.y(1)).or.(yget.gt.y(ny)))
then
175 zytol=4.0e-7*max(abs(y(1)),abs(y(ny)))
176 if((yget.lt.y(1)-zytol).or.(yget.gt.y(ny)+zytol))
then
178 write(6,1002) yget,y(1),y(ny)
179 1002
format(
' ?bcspeval: yget=',1pe11.4,
' out of range ',
180 > 1pe11.4,
' to ',1pe11.4)
182 if((yget.lt.y(1)-0.5*zytol).or.(yget.gt.y(ny)+0.5*zytol))
183 >
write(6,1012) yget,y(1),y(ny)
184 1012
format(
' %bcspeval: yget=',1pe15.8,
' beyond range ',
185 > 1pe15.8,
' to ',1pe15.8,
' (fixup applied)')
186 if(yget.lt.y(1))
then
201 ii=1+nxm*(zxget-x(1))/(x(nx)-x(1))
203 if(zxget.lt.x(i))
then
205 else if(zxget.gt.x(i+1))
then
209 if((1.le.i).and.(i.lt.nxm))
then
210 if((x(i).le.zxget).and.(zxget.le.x(i+1)))
then
213 call zonfind(x,nx,zxget,i)
217 call zonfind(x,nx,zxget,i)
222 jj=1+nym*(zyget-y(1))/(y(ny)-y(1))
224 if(zyget.lt.y(j))
then
226 else if(zyget.gt.y(j+1))
then
230 if((1.le.j).and.(j.lt.nym))
then
231 if((y(j).le.zyget).and.(zyget.le.y(j+1)))
then
234 call zonfind(y,ny,zyget,j)
238 call zonfind(y,ny,zyget,j)
250 subroutine bcspevfn(ict,ivec,ivd,fval,iv,jv,dxv,dyv,f,inf3,ny)
299 integer iv(ivec),jv(ivec)
300 real dxv(ivec),dyv(ivec)
344 if((ict(1).gt.0).or.(ict(1).eq.-1))
then
353 > f(1,1,i,j)+dy*(f(1,2,i,j)+dy*(f(1,3,i,j)+dy*f(1,4,i,j)))
354 > +dx*(f(2,1,i,j)+dy*(f(2,2,i,j)+dy*(f(2,3,i,j)+dy*f(2,4,i,j)))
355 > +dx*(f(3,1,i,j)+dy*(f(3,2,i,j)+dy*(f(3,3,i,j)+dy*f(3,4,i,j)))
356 > +dx*(f(4,1,i,j)+dy*(f(4,2,i,j)+dy*(f(4,3,i,j)+dy*f(4,4,i,j))))))
360 if((ict(2).gt.0).and.(ict(1).ne.-1))
then
369 > f(2,1,i,j)+dy*(f(2,2,i,j)+dy*(f(2,3,i,j)+dy*f(2,4,i,j)))
371 > f(3,1,i,j)+dy*(f(3,2,i,j)+dy*(f(3,3,i,j)+dy*f(3,4,i,j)))
373 > f(4,1,i,j)+dy*(f(4,2,i,j)+dy*(f(4,3,i,j)+dy*f(4,4,i,j)))
378 if((ict(3).gt.0).and.(ict(1).ne.-1))
then
387 > f(1,2,i,j)+dy*(2.0*f(1,3,i,j)+dy*3.0*f(1,4,i,j))
388 > +dx*(f(2,2,i,j)+dy*(2.0*f(2,3,i,j)+dy*3.0*f(2,4,i,j))
389 > +dx*(f(3,2,i,j)+dy*(2.0*f(3,3,i,j)+dy*3.0*f(3,4,i,j))
390 > +dx*(f(4,2,i,j)+dy*(2.0*f(4,3,i,j)+dy*3.0*f(4,4,i,j))
395 if((ict(4).gt.0).or.(ict(1).eq.-1))
then
405 > f(3,1,i,j)+dy*(f(3,2,i,j)+dy*(f(3,3,i,j)+dy*f(3,4,i,j))))
407 > f(4,1,i,j)+dy*(f(4,2,i,j)+dy*(f(4,3,i,j)+dy*f(4,4,i,j))))
411 if((ict(5).gt.0).or.(ict(1).eq.-1))
then
420 > 2.0*f(1,3,i,j)+6.0*dy*f(1,4,i,j)
421 > +dx*(2.0*f(2,3,i,j)+6.0*dy*f(2,4,i,j)
422 > +dx*(2.0*f(3,3,i,j)+6.0*dy*f(3,4,i,j)
423 > +dx*(2.0*f(4,3,i,j)+6.0*dy*f(4,4,i,j))))
427 if((ict(6).gt.0).and.(ict(1).ne.-1))
then
436 > f(2,2,i,j)+dy*(2.0*f(2,3,i,j)+dy*3.0*f(2,4,i,j))
437 > +2.*dx*(f(3,2,i,j)+dy*(2.0*f(3,3,i,j)+dy*3.0*f(3,4,i,j))
438 >+1.5*dx*(f(4,2,i,j)+dy*(2.0*f(4,3,i,j)+dy*3.0*f(4,4,i,j))
443 if(ict(1).eq.-1)
then
451 > 4.0*f(3,3,i,j)+12.0*dy*f(3,4,i,j)
452 > +dx*(12.0*f(4,3,i,j)+36.0*dy*f(4,4,i,j))
459 else if(ict(1).eq.3)
then
469 > f(4,1,i,j)+dy*(f(4,2,i,j)+dy*(f(4,3,i,j)+dy*f(4,4,i,j))))
483 > f(3,2,i,j)+dy*(2.0*f(3,3,i,j)+dy*3.0*f(3,4,i,j)))
485 > f(4,2,i,j)+dy*(2.0*f(4,3,i,j)+dy*3.0*f(4,4,i,j)))
498 > (2.0*f(2,3,i,j)+6.0*dy*f(2,4,i,j)
499 > +2.0*dx*(2.0*f(3,3,i,j)+6.0*dy*f(3,4,i,j)
500 > +1.5*dx*(2.0*f(4,3,i,j)+6.0*dy*f(4,4,i,j))
512 fval(v,iaval)=6.0*(f(1,4,i,j)+
513 > dx*(f(2,4,i,j)+dx*(f(3,4,i,j)+dx*f(4,4,i,j))))
520 else if(ict(1).eq.4)
then
530 > f(4,2,i,j)+dy*2.0*(f(4,3,i,j)+dy*1.5*f(4,4,i,j)))
543 > 4.0*f(3,3,i,j)+12.0*dy*f(3,4,i,j)
544 > +dx*(12.0*f(4,3,i,j)+36.0*dy*f(4,4,i,j))
557 > +2.0*dx*(f(3,4,i,j)+1.5*dx*f(4,4,i,j)))
564 else if(ict(1).eq.5)
then
573 > +12.0*(f(4,3,i,j)+dy*3.0*f(4,4,i,j))
585 > 12.0*(f(3,4,i,j)+dx*3.0*f(4,4,i,j))
592 else if(ict(1).eq.6)
then