File indexing completed on 2018-03-02 18:36:16 UTC
view on githubraw file Latest commit f50e6c17 on 2003-11-19 19:07:02 UTC
4cee17c1be Patr*0001
0002 subroutine hessupd( nn, mupd, dd, jmin, jmax, xdiff, lphprint )
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 implicit none
0031
f50e6c1777 Patr*0032 #include "blas1.h"
4cee17c1be Patr*0033
0034
0035
0036
0037 integer nn, mupd, jmin, jmax
0038 double precision dd(nn), alpha(100), xdiff(nn)
0039 logical lphprint
0040
0041
0042
0043
ae287463fd Patr*0044 external DDOT
0045 double precision DDOT
4cee17c1be Patr*0046
0047 integer jfin, i, j, jp
0048 double precision r
0049
0050
0051
0052
0053 jfin = jmax
0054
0055 if (lphprint)
0056 & print *, 'pathei-lsopt: in hessupd; ',
0057 & 'jmin, jmax, mupd:', jmin, jmax, mupd
0058
0059 if (jfin.lt.jmin) jfin = jmax+mupd
0060
0061
0062
0063
0064 do j = jfin,jmin,-1
0065
0066 if (lphprint)
0067 & print *, 'pathei-lsopt: in hessupd; loop ',
0068 & 'j,jfin,jmin = ', j,jfin,jmin
0069
0070 jp = j
0071 if (jp.gt.mupd) jp = jp-mupd
0072 call dostore( nn, xdiff, .false., 2*jp+3 )
ae287463fd Patr*0073 r = DDOT( nn, dd, 1, xdiff,1 )
4cee17c1be Patr*0074 call dostore( nn, xdiff, .false., 2*jp+2 )
0075 alpha(jp) = r
0076 do i = 1, nn
0077 dd(i) = dd(i) - r*xdiff(i)
0078 end do
0079 end do
0080
0081
0082
0083
0084 if (mupd .ne. 0) then
0085 call dostore( nn, xdiff, .false., 3 )
0086 do i = 1, nn
0087 dd(i) = dd(i)*xdiff(i)
0088 end do
0089 end if
0090
0091
0092
0093
0094 do j = jmin,jfin
0095 jp = j
0096 if (jp .gt. mupd) jp = jp-mupd
0097 call dostore( nn, xdiff, .false., 2*jp+2 )
ae287463fd Patr*0098 r = alpha(jp) - DDOT( nn, dd,1 , xdiff, 1 )
4cee17c1be Patr*0099 call dostore( nn, xdiff, .false., 2*jp+3 )
0100 do i = 1, nn
0101 dd(i) = dd(i) + r*xdiff(i)
0102 end do
0103 end do
0104
0105 return
0106
0107 end