Millepede-II  V04-00-00_preview
 All Classes Files Functions Variables Enumerator Pages
Data Types | Functions/Subroutines
linesrch.f90 File Reference

Line search. More...

Go to the source code of this file.

Data Types

module  linesrch
 Line search data. More...

Functions/Subroutines

subroutine ptline (n, x, f, g, s, step, info)
 Perform linesearch.
subroutine ptldef (gtole, stmax, minfe, maxfe)
 Initialize line search.
subroutine ptlopt (nf, m, slopes, steps)
 Get details.
subroutine ptlprt (lunp)
 Print line search data.

Detailed Description

Line search.

Line search routine with sufficient decrease of slope.

In many minimization problems the objective function is close to quadratic, except far from the solution. Close to the minimum the behaviour may be almost quadratic or, due to round-off errors, it may have a non-smooth behaviour, which often complicates any further progress and the recognition of convergence. Round-off errors affect the function value, which may be large and small parameter changes result in small relative changes of the function value. Close to the minimum the gradient becomes small and the behaviour is not so much affected by Round-off errors.

     CALL PTLDEF(0.0,0.0, 0,0) ! init line search
     N=...
     X(.)=...
     D(.)=...
     ALPHA=1.0D0
10   F(X)=...
     G(X)=...
     IF(.) S(X)=..
     CALL PTLINE(N,X,F,G,D,ALPHA,INFO)
     IF(INFO.LT.0) GOTO 10

Definition in file linesrch.f90.


Function/Subroutine Documentation

subroutine ptldef ( real, intent(in)  gtole,
real, intent(in)  stmax,
integer, intent(in)  minfe,
integer, intent(in)  maxfe 
)

Initialize line search.

Parameters:
[in]gtoleslope ratio
[in]stmaxtotal step limit
[in]minfeminimum number of evaluations
[in]maxfemaximum number of evaluations
                   — range —-       default
slope ratio        1.0E-4 ... 0.9         0.9
min. F-calls       1 ... 2                 1
max. F-calls       2 ... 10                5

Definition at line 211 of file linesrch.f90.

Referenced by xloopn().

subroutine ptline ( integer, intent(in)  n,
double precision, dimension(n), intent(inout)  x,
double precision, intent(inout)  f,
double precision, dimension(n), intent(inout)  g,
double precision, dimension(n), intent(inout)  s,
double precision, intent(out)  step,
integer, intent(out)  info 
)

Perform linesearch.

Parameters:
[in]Ndimension of problem
[in,out]Xcurrent iterate
[in,out]Fassociated function value
[in,out]Gassociated gradient
[in,out]Ssearch vector
[out]STEPstep factor (initially = 1.0)
[out]INFOinformation
 = -1  repeat function evaluation
 =  0  input error (e.g. gradient not negative)
 =  1  convergence reached
 =  2  convergence assumed, but round-off errors
 =  3  too many function calls
 =  4  step factor ALPHA to small (ALPHA <= TOL)

Definition at line 68 of file linesrch.f90.

Referenced by xloopn().

subroutine ptlopt ( integer, intent(out)  nf,
integer, intent(out)  m,
real, dimension(3), intent(out)  slopes,
real, dimension(3), intent(out)  steps 
)

Get details.

Parameters:
[out]NFnumber of function values
[out]Mindex of function value with smallest slope
[out]SLOPESinitial, current, smallest slope
[out]STEPSinitial position, current, smallest step

Definition at line 237 of file linesrch.f90.

Referenced by ploopb(), and ploopc().

subroutine ptlprt ( integer, intent(in)  lunp)

Print line search data.

Parameters:
[in]lunpunit number

Definition at line 273 of file linesrch.f90.

Referenced by xloopn().