1 subroutine fpsurf(iopt,m,x,y,z,w,xb,xe,yb,ye,kxx,kyy,s,nxest,
2 * nyest,eta,tol,maxit,nmax,km1,km2,ib1,ib3,nc,intest,nrest,
3 * nx0,tx,ny0,ty,c,fp,fp0,fpint,coord,f,ff,a,q,bx,by,spx,spy,h,
4 * index,nummer,wrk,lwrk,ier)
8 real*8 xb,xe,yb,ye,s,eta,tol,fp,fp0
9 integer iopt,m,kxx,kyy,nxest,nyest,maxit,nmax,km1,km2,ib1,ib3,
10 * nc,intest,nrest,nx0,ny0,lwrk,ier
12 real*8 x(m),y(m),z(m),w(m),tx(nmax),ty(nmax),c(nc),fpint(intest),
13 * coord(intest),f(nc),ff(nc),a(nc,ib1),q(nc,ib3),bx(nmax,km2),
14 * by(nmax,km2),spx(m,km1),spy(m,km1),h(ib3),wrk(lwrk)
15 integer index(nrest),nummer(m)
17 real*8 acc,arg,cos,dmax,fac1,fac2,fpmax,fpms,f1,f2,f3,hxi,
p,pinv,
18 * piv,p1,p2,p3,sigma,sin,sq,store,wi,x0,x1,y0,y1,zi,eps,
19 * rn,one,con1,con9,con4,half,ten
20 integer i,iband,iband1,iband3,iband4,ibb,ichang,ich1,ich3,ii,
21 * in,irot,iter,i1,i2,i3,j,jrot,jxy,j1,kx,kx1,kx2,ky,ky1,ky2,l,
22 * la,lf,lh,lwest,lx,ly,l1,l2,n,ncof,nk1x,nk1y,nminx,nminy,nreg,
23 * nrint,num,num1,nx,nxe,nxx,ny,nye,nyy,n1,rank
75 if(iopt.lt.0) go to 20
78 if(iopt.eq.0) go to 10
116 iband1 = kx*(ny-ky1)+ky
118 if(iband1.le.l) go to 130
163 call
fporde(x,y,m,kx,ky,tx,nx,ty,ny,nummer,index,nreg)
190 150
if(in.eq.0) go to 250
195 call
fpbspl(tx,nx,kx,x(in),l1,hx)
197 call
fpbspl(ty,ny,ky,y(in),l2,hy)
226 if(piv.eq.0.0d0) go to 220
228 call
fpgivs(piv,a(irot,1),cos,sin)
230 call
fprota(cos,sin,zi,f(irot))
231 if(i.eq.iband) go to 230
237 call
fprota(cos,sin,h(j),a(irot,i2))
251 if(a(i,1).le.dmax) go to 260
257 if(a(i,1).le.sigma) go to 280
260 call
fpback(a,f,ncof,iband,c,nc)
268 280 lwest = ncof*iband+ncof+iband
269 if(lwrk.lt.lwest) go to 780
278 call
fprank(q,ff,ncof,iband,nc,sigma,c,sq,rank,wrk(la),
286 300
if(ier.eq.(-2)) fp0 = fp
288 if(iopt.lt.0) go to 820
290 if(abs(fpms).le.acc)
if(fp) 815,815,820
292 if(fpms.lt.0.) go to 430
294 if(ncof.gt.m) go to 790
313 330
if(in.eq.0) go to 360
321 store = store+hxi*spy(in,j)*c(j1)
325 store = (w(in)*(z(in)-store))**2
326 fpint(l1) = fpint(l1)+store
327 coord(l1) = coord(l1)+store*x(in)
328 fpint(l2) = fpint(l2)+store
329 coord(l2) = coord(l2)+store*y(in)
339 if(nx.eq.nxe) l1 = nxx+1
340 if(ny.eq.nye) l2 = nxx
341 if(l1.gt.l2) go to 810
343 if(fpmax.ge.fpint(i)) go to 380
350 arg = coord(l)/fpint(l)
352 if(l.gt.nxx) go to 400
358 if(fac1.gt.(ten*fac2) .or. fac2.gt.(ten*fac1)) go to 370
372 if(fac1.gt.(ten*fac2) .or. fac2.gt.(ten*fac1)) go to 370
384 430
if(ier.eq.(-2)) go to 830
407 if(nk1x.eq.kx1) go to 440
410 call
fpdisc(tx,nx,kx2,bx,nmax)
413 if(nk1y.eq.ky1) go to 450
416 call
fpdisc(ty,ny,ky2,by,nmax)
446 if(nk1y.eq.ky1) go to 560
465 do 540 irot=jrot,ncof
467 i2 = min0(iband1,ncof-irot)
468 if(piv.eq.0.)
if(i2) 550,550,520
470 call
fpgivs(piv,q(irot,1),cos,sin)
472 call
fprota(cos,sin,zi,ff(irot))
473 if(i2.eq.0) go to 550
477 call
fprota(cos,sin,h(l1),q(irot,l1))
485 560
if(nk1x.eq.kx1) go to 640
499 h(j1) = bx(ii,l)*pinv
503 jrot = (i-kx2)*nk1y+j
505 do 620 irot=jrot,ncof
507 i2 = min0(iband3,ncof-irot)
508 if(piv.eq.0.)
if(i2) 630,630,600
510 call
fpgivs(piv,q(irot,1),cos,sin)
512 call
fprota(cos,sin,zi,ff(irot))
513 if(i2.eq.0) go to 630
517 call
fprota(cos,sin,h(l1),q(irot,l1))
529 if(q(i,1).le.dmax) go to 650
535 if(q(i,1).le.sigma) go to 670
538 call
fpback(q,ff,ncof,iband4,c,nc)
542 670 lwest = ncof*iband4+ncof+iband4
543 if(lwrk.lt.lwest) go to 780
547 call
fprank(q,ff,ncof,iband4,nc,sigma,c,sq,rank,wrk(la),
560 690
if(in.eq.0) go to 720
568 store = store+hxi*spy(in,j)*c(j1)
572 fp = fp+(w(in)*(z(in)-store))**2
578 if(abs(fpms).le.acc) go to 820
581 if(iter.eq.maxit) go to 795
585 if(ich3.ne.0) go to 740
586 if((f2-f3).gt.acc) go to 730
591 if(
p.le.p1)
p = p1*con9 + p2*con1
593 730
if(f2.lt.0.) ich3 = 1
594 740
if(ich1.ne.0) go to 760
595 if((f1-f2).gt.acc) go to 750
600 if(p3.lt.0.) go to 770
601 if(
p.ge.p3)
p = p2*con1 + p3*con9
603 750
if(f2.gt.0.) ich1 = 1
606 760
if(f2.ge.f1 .or. f2.le.f3) go to 800
625 820
if(ncof.ne.rank) ier = -rank
627 830
if(ichang.lt.0) go to 930
652 if(nx-ny) 880,920,900
663 930
if(iopt.lt.0) go to 940
subroutine fpdisc(t, n, k2, b, nest)
subroutine fpsurf(iopt, m, x, y, z, w, xb, xe, yb, ye, kxx, kyy, s, nxest, nyest, eta, tol, maxit, nmax, km1, km2, ib1, ib3, nc, intest, nrest, nx0, tx, ny0, ty, c, fp, fp0, fpint, coord, f, ff, a, q, bx, by, spx, spy, h, index, nummer, wrk, lwrk, ier)
subroutine fprota(cos, sin, a, b)
real(r8) function p(a, x, xr, xs, yr, ys, psi, psir, F_dia)
subroutine fpback(a, z, n, k, c, nest)
subroutine fporde(x, y, m, kx, ky, tx, nx, ty, ny, nummer, index, nreg)
subroutine fprank(a, f, n, m, na, tol, c, sq, rank, aa, ff, h)
subroutine fpgivs(piv, ww, cos, sin)
real *8 function fprati(p1, f1, p2, f2, p3, f3)
subroutine fpbspl(t, n, k, x, l, h)