SF_OPTIMIZE

Description

SciFortran module for minimization and root finding

Quick access

Routines:

fmin_cg(), fmin_cgplus(), fmin_cgminimize(), leastsq(), curvefit(), dbrent(), fmin_bfgs(), linear_mix(), adaptive_mix(), broyden_mix(), fsolve(), brent(), bracket(), fmin(), broyden1(), brentq(), bisect(), fzero(), newton()

Used modules

  • cgfit_routines

  • broyden_routines

  • sf_constants: SciFortran module for physical and mathematical constants

  • sf_linalg: SciFortran module for linear algebra

Subroutines and functions

interface  sf_optimize/fmin_cg(p, f, df, iter, fret[, ftol, itmax, istop, iverbose, err, deps])
Parameters:
  • p (•) [real, inout]

  • f [real]

  • df [real]

  • iter [integer, out]

  • fret [real, out]

Options:
  • ftol [real]

  • itmax [integer]

  • istop [integer]

  • iverbose [logical]

  • err (2) [real]

  • deps [real]

interface  sf_optimize/fmin_cgplus(p, func, fjac, iter, fret, fcn[, ftol, itmax, imethod, iverb1, iverb2, deps])
Parameters:
  • p (•) [real, inout]

  • func [external]

  • fjac [external]

  • iter [integer, out]

  • fret [real]

  • fcn [real]

Options:
  • ftol [real]

  • itmax [integer]

  • imethod [integer]

  • iverb1 [integer]

  • iverb2 [integer]

  • deps [real]

interface  sf_optimize/fmin_cgminimize(p, fcn, iter, fret[, ftol, itmax, iverbose, mode, new_version, hh_par])
Parameters:
  • p (•) [real, inout]

  • fcn [real]

  • iter [integer]

  • fret [real]

Options:
  • ftol [real]

  • itmax [integer]

  • iverbose [logical]

  • mode [integer]

  • new_version [logical]

  • hh_par [real]

interface  sf_optimize/leastsq(func, a, m, dfunc[, tol, info])
Parameters:
  • func [external]

  • a (•) [real]

  • m [integer]

  • dfunc [external]

Options:
  • tol [real]

  • info [integer]

interface  sf_optimize/curvefit(model_func, a, xdata, ydata, model_dfunc[, tol, info])
Parameters:
  • model_func [external]

  • a (•) [real]

  • xdata (•) [real, in,required]

  • ydata (size(xdata)) [real]

  • model_dfunc [external]

Options:
  • tol [real]

  • info [integer]

interface  sf_optimize/dbrent(func, dfunc, xmin[, brack, tol, niter])
Parameters:
  • func [external]

  • dfunc [external]

  • xmin [real, inout]

Options:
  • brack (•) [real]

  • tol [real]

  • niter [integer]

interface  sf_optimize/fmin_bfgs(func, grad, x[, l, u, nbd, factr, pgtol, iprint, nloop])
Parameters:
  • func [external]

  • grad [external]

  • x (•) [real, allocatable]

Options:
  • l (•) [real, allocatable]

  • u (•) [real, allocatable]

  • nbd (•) [integer, allocatable]

  • factr [real]

  • pgtol [real]

  • iprint [integer]

  • nloop [integer]

interface  sf_optimize/linear_mix(x, fx, alpha)
Parameters:
  • x (various shapes) [real, complex, inout/in,required]

  • fx (various shapes) [real, complex, in]

  • alpha [real, in]

interface  sf_optimize/adaptive_mix(x, fx, alpha, iter, z, fz)
Parameters:
  • x (•) [real, inout/in,required] – x_in

  • fx (size(x)) [real, in] – store Fx_prev for future calls

  • alpha [real, in] – reset to input mixing α

  • iter [integer, in]

  • z (•) [complex, inout/in,required] – z_in

  • fz (size(z)) [complex, in] – store Fz_prev for future calls

interface  sf_optimize/broyden_mix(x, fx, alpha, m, iter[, w0])
Parameters:
  • x (•) [real, complex, inout/in,required]

  • fx (size(x)) [real, complex, in] – (Fx-X)

  • alpha [real, in]

  • m [integer, in]

  • iter [integer, in]

Options:

w0 [real]

interface  sf_optimize/fsolve(func, x, dfunc[, tol, info, icheck, maxfev])
Parameters:
  • func [external]

  • x (•) [real]

  • dfunc [external]

Options:
  • tol [real]

  • info [integer]

  • icheck [logical]

  • maxfev [integer]

subroutine  sf_optimize/brent(func, xmin[, brack, tol, niter])
Parameters:
  • func [external]

  • xmin [real, inout]

Options:
  • brack (•) [real]

  • tol [real]

  • niter [integer]

subroutine  sf_optimize/bracket(ax, bx, cx, fa, fb, fc, func)
Parameters:
  • ax [real, inout]

  • bx [real, inout]

  • cx [real, out]

  • fa [real, out]

  • fb [real, out]

  • fc [real, out]

  • func [external]

subroutine  sf_optimize/fmin(fn, start[, lambda, tol, conv_check, max_fun_calls, fun_calls, num_restart, ierr])
Parameters:
  • fn [external]

  • start (•) [real, in,required]

Options:
  • lambda (size(start)) [real]

  • tol [real]

  • conv_check [integer]

  • max_fun_calls [integer]

  • fun_calls [integer]

  • num_restart [integer]

  • ierr [integer]

subroutine  sf_optimize/broyden1(ff, x[, icheck, maxits, tol, tol1, tolmin, stpmx, noexit])
Parameters:
  • ff [real]

  • x (•) [real, inout]

Options:
  • icheck [logical]

  • maxits [integer]

  • tol [real]

  • tol1 [real]

  • tolmin [real]

  • stpmx [real]

  • noexit [logical]

function  sf_optimize/brentq(func, a, b[, tol])
Parameters:
  • func [external]

  • a [real, in]

  • b [real, in]

Options:

tol [real]

Return:

fzero [real]

subroutine  sf_optimize/bisect(f, x1, x2[, eps, niter, flag])
Parameters:
  • f [external]

  • x1 [real]

  • x2 [real]

Options:
  • eps [real]

  • niter [integer]

  • flag [integer]

subroutine  sf_optimize/fzero(f, b, c, iflag[, rguess, tol_rel, tol_abs])
Parameters:
  • f [external]

  • b [real]

  • c [real]

  • iflag [integer]

Options:
  • rguess [real]

  • tol_rel [real]

  • tol_abs [real]

subroutine  sf_optimize/newton(f, xinit[, eps, niter])
Parameters:
  • f [external]

  • xinit [real, inout]

Options:
  • eps [real]

  • niter [integer]