49 subroutine matupd(n, m, ws, wy, sy, ss, d, r, itail,
50 + iupdat, col, head, theta, rr, dr, stp, dtd)
52 integer n, m, itail, iupdat, col, head
53 double precision theta, rr, dr, stp, dtd, d(n), r(n),
54 + ws(n, m), wy(n, m), sy(m, m), ss(m, m)
76 if (iupdat .le. m)
then
78 itail = mod(head+iupdat-2,m) + 1
80 itail = mod(itail,m) + 1
81 head = mod(head,m) + 1
86 call dcopy(n,d,1,ws(1,itail),1)
87 call dcopy(n,r,1,wy(1,itail),1)
97 if (iupdat .gt. m)
then
100 call dcopy(j,ss(2,j+1),1,ss(1,j),1)
101 call dcopy(col-j,sy(j+1,j+1),1,sy(j,j),1)
108 sy(col,j) = ddot(n,d,1,wy(1,pointr),1)
109 ss(j,col) = ddot(n,ws(1,pointr),1,d,1)
110 pointr = mod(pointr,m) + 1
112 if (stp .eq. one)
then
115 ss(col,col) = stp*stp*dtd
subroutine matupd(n, m, ws, wy, sy, ss, d, r, itail, iupdat, col, head, theta, rr, dr, stp, dtd)
This subroutine updates matrices WS and WY, and forms the middle matrix in B.