1 subroutine colloc(aleft,aright,lbegin,iorder,ntimes,addbrk,relerr)
50 integer iorder,lbegin,ntimes, i,iflag,ii,integs(3,npiece),iside
51 & ,iter,itermx,j,k,kmax,kpm,l,lenblk,lnew,m,n,nbloks
52 & ,ndim,ncoef,nncoef,nt
53 parameter(ndim=200,kmax=20,ncoef=npiece*kmax,lenblk=ncoef)
54 double precision addbrk,aleft,aright,relerr,
55 & a(ndim),amax,asave(ndim)
56 & ,b(ndim),bloks(lenblk),break,coef,dx,err,rho,t(ndim)
57 & ,templ(lenblk),temps(ndim),xside
58 equivalence(bloks,templ)
59 common /approx/ break(npiece), coef(ncoef), l,kpm
60 common /side/ m, iside, xside(10)
61 common /other/ itermx,k,rho(kmax-1)
64 if (lbegin*kpm .gt. ncoef)
go to 999
68 call difequ (1, temps(1), temps )
74 dx = (aright - aleft)/dble(lbegin)
77 4 temps(i) = temps(i-1) + dx
78 temps(lbegin+1) = aright
80 call knots ( temps, lbegin, kpm, t, n )
86 10
call eqblok(t,n,kpm,temps,a,bloks,lenblk,integs,nbloks,b)
87 call slvblk(bloks,integs,nbloks,b,temps,a,iflag)
89 if (itermx .le. 1)
go to 30
94 20
call bsplpp(t,a,n,kpm,templ,break,coef,l)
97 call eqblok(t,n,kpm,temps,a,bloks,lenblk,integs,nbloks,b)
98 call slvblk(bloks,integs,nbloks,b,temps,a,iflag)
102 amax = dmax1(amax,dabs(a(i)))
103 26 err = dmax1(err,dabs(a(i)-asave(i)))
104 if (err .le. relerr*amax)
go to 30
106 if (iter .lt. itermx)
go to 20
109 30 print 630,kpm,l,n,(break(i),i=2,l)
110 630
format(47h approximation from a space of splines of order,i3
111 & ,4h on ,i3,11h intervals,/13h of dimension,i4
112 & ,16h. breakpoints -/(5e20.10))
113 if (itermx .gt. 0) print 635,iter,itermx
114 635
format(6h after,i3,3h of,i3,20h allowed iterations,)
115 call bsplpp(t,a,n,kpm,templ,break,coef,l)
117 637
format(46h the pp representation of the approximation is)
120 38 print 638, break(i),(coef(ii+j),j=1,kpm)
121 638
format(f9.3,e13.6,10e11.3)
125 call difequ ( 4, temps(1), temps )
127 if (nt .gt. ntimes)
return 131 lnew = lbegin + int(dble(nt)*addbrk)
132 if (lnew*kpm .gt. ncoef)
go to 999
133 call newnot(break,coef,l,kpm,temps,lnew,templ)
134 call knots(temps,lnew,kpm,t,n)
139 699
format(11h **********/23h the assigned dimension,i5
140 & ,25h for coef is too small.)
subroutine bsplpp(t, bcoef, n, k, scrtch, break, coef, l)
subroutine colpnt(k, rho)
subroutine newnot(break, coef, l, k, brknew, lnew, coefg)
subroutine slvblk(bloks, integs, nbloks, b, ipivot, x, iflag)
subroutine colloc(aleft, aright, lbegin, iorder, ntimes, addbrk, relerr)
subroutine eqblok(t, n, kpm, work1, work2, bloks, lenblk, integs, nbloks, b)
subroutine knots(break, l, kpm, t, n)
subroutine difequ(mode, xx, v)