This subroutine prints out new information after a successful line search.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | n | ||||
real(kind=wp) | :: | x(n) | ||||
real(kind=wp) | :: | f | ||||
real(kind=wp) | :: | g(n) | ||||
integer | :: | Iprint | ||||
integer | :: | Itfile | ||||
integer | :: | Iter | ||||
integer | :: | Nfgv | ||||
integer | :: | Nact | ||||
real(kind=wp) | :: | Sbgnrm | ||||
integer | :: | Nseg | ||||
character(len=3), | intent(out) | :: | Word |
records the status of subspace solutions. |
||
integer | :: | Iword | ||||
integer | :: | Iback | ||||
real(kind=wp) | :: | Stp | ||||
real(kind=wp) | :: | Xstep |
subroutine prn2lb(n,x,f,g,Iprint,Itfile,Iter,Nfgv,Nact,Sbgnrm, & Nseg,Word,Iword,Iback,Stp,Xstep) implicit none character(len=3),intent(out) :: Word !! records the status of subspace solutions. integer :: n , Iprint , Itfile , Iter , Nfgv , Nact , Nseg , Iword , Iback real(wp) :: f , Sbgnrm , Stp , Xstep , x(n) , g(n) integer :: i , imod select case (Iword) case ( 0 ); Word = 'con' ! the subspace minimization converged. case ( 1 ); Word = 'bnd' ! the subspace minimization stopped at a bound. case ( 5 ); Word = 'TNT' ! the truncated Newton step has been used. case default; Word = '---' end select if ( Iprint>=99 ) then write (output_unit,*) 'LINE SEARCH' , Iback , ' times; norm of step = ' , Xstep write (output_unit,'(/,a,i5,4x,a,1p,d12.5,4x,a,1p,d12.5)') & 'At iterate', Iter , 'f= ', f , '|proj g|= ', Sbgnrm if ( Iprint>100 ) then write (output_unit,'(/,a4,1p,6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))') 'X =' , (x(i),i=1,n) write (output_unit,'(/,a4,1p,6(1x,d11.4),/,(4x,1p,6(1x,d11.4)))') 'G =' , (g(i),i=1,n) endif else if ( Iprint>0 ) then imod = mod(Iter,Iprint) if ( imod==0 ) write (output_unit,'(/,a,i5,4x,a,1p,d12.5,4x,a,1p,d12.5)') & 'At iterate', Iter , 'f= ', f , '|proj g|= ', Sbgnrm endif if ( Iprint>=1 ) write (Itfile,'(2(1x,i4),2(1x,i5),2x,a3,1x,i4,1p,2(2x,d7.1),1p,2(1x,d10.3))') & Iter , Nfgv , Nseg , Nact , Word , Iback , Stp , Xstep , Sbgnrm , f end subroutine prn2lb