next up previous contents index
Next: Interface test_gradient Up: Module minimization_module Previous: Module variables   Contents   Index

Interface minim


\begin{boxedminipage}{\textwidth}
\begin{verbatim}m1 = minim(x_in,func,dfunc...
..._interval,eps_guess,always_do_test_gradient])\end{verbatim}
\end{boxedminipage}

Gradient descent minimizer, using either the conjugate gradients or steepest descent methods. The objective function is func(x) and its gradient is dfunc(x). There is an additional hook interface which is called at the beginning of each gradient descent step.

x_in -- real(dp), intent(inout), dimension(:)

Starting position

method -- character(*), intent(in)

cg for conjugate gradients or sd for steepest descent

convergence_tol -- real(dp), intent(in)

Minimisation is treated as converged once $\vert\mathbf{\nabla}f\vert^2 <$ convergence_tol.

max_steps -- integer, intent(in)

Maximum number of cg or sd steps

linminroutine -- character(*), intent(in), optional

Name of the line minisation routine to use. This should be one of NR_LINMIN, FAST_LINMIN and LINMIN_DERIV. If FAST_LINMIN is used and problems with the line minisation are detected, minim automatically switches to the more reliable NR_LINMIN, and then switches back once no more problems have occurred for some time. the default is NR_LINMIN

hook_print_interval -- integer, intent(in), optional

eps_guess -- real(dp), intent(in), optional

always_do_test_gradient -- logical, intent(in), optional

Function func(x) -- real(dp)

x -- real(dp), dimension(:)

Function dfunc(x) -- real(dp), dimension(size(x))

x -- real(dp), dimension(:)

Subroutine hook(x,dx,E,done,do_print)

x -- real(dp), dimension(:)

dx -- real(dp), dimension(:)

E -- real(dp)

done -- logical

do_print -- logical, optional

Return value -- integer
Returns number of gradient descent steps taken during minimisation
test_gradient interface
next up previous contents index
Next: Interface test_gradient Up: Module minimization_module Previous: Module variables   Contents   Index
gabor 2009-06-30