SF_OPTIMIZE Module


Uses

  • module~~sf_optimize~~UsesGraph module~sf_optimize SF_OPTIMIZE module~broyden_routines BROYDEN_ROUTINES module~sf_optimize->module~broyden_routines module~cgfit_routines CGFIT_ROUTINES module~sf_optimize->module~cgfit_routines module~sf_constants SF_CONSTANTS module~sf_optimize->module~sf_constants module~sf_linalg SF_LINALG module~sf_optimize->module~sf_linalg module~broyden_func_interface BROYDEN_FUNC_INTERFACE module~broyden_routines->module~broyden_func_interface module~sf_blacs SF_BLACS module~sf_linalg->module~sf_blacs

Used by

  • module~~sf_optimize~~UsedByGraph module~sf_optimize SF_OPTIMIZE module~scifor SCIFOR module~scifor->module~sf_optimize

Interfaces

public interface fmin_cg

  • private subroutine fmin_cg_df(p, f, df, iter, fret, ftol, itmax, istop, iverbose, err)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: p
    procedure(cgfit_func) :: f
    procedure(cgfit_fjac) :: df
    integer, intent(out) :: iter
    real(kind=8), intent(out) :: fret
    real(kind=8), optional :: ftol
    integer, optional :: itmax
    integer, optional :: istop
    logical, optional :: iverbose
    real(kind=8), optional, dimension(2) :: err
  • private subroutine fmin_cg_f(p, f, iter, fret, ftol, itmax, istop, deps, iverbose)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: p
    procedure(cgfit_func) :: f
    integer, intent(out) :: iter
    real(kind=8), intent(out) :: fret
    real(kind=8), optional :: ftol
    integer, optional :: itmax
    integer, optional :: istop
    real(kind=8), optional :: deps
    logical, optional :: iverbose

public interface fmin_cgplus

  • private subroutine fmin_cgplus_df(p, func, fjac, iter, fret, ftol, itmax, imethod, iverb1, iverb2)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: p
    private function func(a)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    Return Value real(kind=8)
    private function fjac(a)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    Return Value real(kind=8), dimension(size(a))
    integer, intent(out) :: iter
    real(kind=8) :: fret
    real(kind=8), optional :: ftol
    integer, optional :: itmax
    integer, optional :: imethod
    integer, optional :: iverb1
    integer, optional :: iverb2
  • private subroutine fmin_cgplus_f(p, fcn, iter, fret, ftol, itmax, imethod, deps, iverb1, iverb2)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: p
    procedure(cgfit_func) :: fcn
    integer, intent(out) :: iter
    real(kind=8) :: fret
    real(kind=8), optional :: ftol
    integer, optional :: itmax
    integer, optional :: imethod
    real(kind=8), optional :: deps
    integer, optional :: iverb1
    integer, optional :: iverb2

public interface fmin_cgminimize

  • private subroutine fmin_cgminimize_func(p, fcn, iter, fret, ftol, itmax, iverbose, mode, new_version, hh_par)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: p
    procedure(cgfit_func) :: fcn
    integer :: iter
    real(kind=8) :: fret
    real(kind=8), optional :: ftol
    integer, optional :: itmax
    logical, optional :: iverbose
    integer, optional :: mode
    logical, optional :: new_version
    real(kind=8), optional :: hh_par
  • private subroutine fmin_cgminimize_sub(p, fcn, iter, fret, ftol, itmax, iverbose, mode, new_version, hh_par)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: p
    private subroutine fcn(n, x_, f_)
    Arguments
    Type IntentOptional Attributes Name
    integer :: n
    real(kind=8), dimension(n) :: x_
    real(kind=8) :: f_
    integer :: iter
    real(kind=8) :: fret
    real(kind=8), optional :: ftol
    integer, optional :: itmax
    logical, optional :: iverbose
    integer, optional :: mode
    logical, optional :: new_version
    real(kind=8), optional :: hh_par

public interface leastsq

  • private subroutine leastsq_lmdif_func(func, a, m, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private function func(a, m)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    integer :: m
    Return Value real(kind=8), dimension(m)
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), optional :: tol
    integer, optional :: info
  • private subroutine leastsq_lmdif_sub(func, a, m, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private subroutine func(a, m, f)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), dimension(m) :: f
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), optional :: tol
    integer, optional :: info
  • private subroutine leastsq_lmder_func(func, dfunc, a, m, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private function func(a, m)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    integer :: m
    Return Value real(kind=8), dimension(m)
    private function dfunc(a, m)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    integer :: m
    Return Value real(kind=8), dimension(m,size(a))
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), optional :: tol
    integer, optional :: info
  • private subroutine leastsq_lmder_sub(func, dfunc, a, m, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private subroutine func(a, m, f)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), dimension(m) :: f
    private subroutine dfunc(a, m, df)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), dimension(m,size(a)) :: df
    real(kind=8), dimension(:) :: a
    integer :: m
    real(kind=8), optional :: tol
    integer, optional :: info

public interface curvefit

  • private subroutine curvefit_lmdif_func(model_func, a, xdata, ydata, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private function model_func(x, a)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    real(kind=8), dimension(:) :: a
    Return Value real(kind=8), dimension(size(x))
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(:) :: xdata
    real(kind=8), dimension(size(xdata)) :: ydata
    real(kind=8), optional :: tol
    integer, optional :: info
  • private subroutine curvefit_lmdif_sub(model_func, a, xdata, ydata, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private subroutine model_func(x, a, f)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(size(x)) :: f
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(:) :: xdata
    real(kind=8), dimension(size(xdata)) :: ydata
    real(kind=8), optional :: tol
    integer, optional :: info
  • private subroutine curvefit_lmder_func(model_func, model_dfunc, a, xdata, ydata, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private function model_func(x, a)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    real(kind=8), dimension(:) :: a
    Return Value real(kind=8), dimension(size(x))
    private function model_dfunc(x, a)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    real(kind=8), dimension(:) :: a
    Return Value real(kind=8), dimension(size(x),size(a))
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(:) :: xdata
    real(kind=8), dimension(size(xdata)) :: ydata
    real(kind=8), optional :: tol
    integer, optional :: info
  • private subroutine curvefit_lmder_sub(model_func, model_dfunc, a, xdata, ydata, tol, info)

    Arguments

    Type IntentOptional Attributes Name
    private subroutine model_func(x, a, f)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(size(x)) :: f
    private subroutine model_dfunc(x, a, df)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(size(x),size(a)) :: df
    real(kind=8), dimension(:) :: a
    real(kind=8), dimension(:) :: xdata
    real(kind=8), dimension(size(xdata)) :: ydata
    real(kind=8), optional :: tol
    integer, optional :: info

public interface dbrent

  • private subroutine dbrent_wgrad(func, dfunc, xmin, brack, tol, niter)

    Arguments

    Type IntentOptional Attributes Name
    private function func(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8) :: x
    Return Value real(kind=8)
    private function dfunc(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8) :: x
    Return Value real(kind=8)
    real(kind=8), intent(inout) :: xmin
    real(kind=8), optional, dimension(:) :: brack
    real(kind=8), optional :: tol
    integer, optional :: niter
  • private subroutine dbrent_nograd(func, xmin, brack, tol, niter)

    Arguments

    Type IntentOptional Attributes Name
    private function func(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8) :: x
    Return Value real(kind=8)
    real(kind=8), intent(inout) :: xmin
    real(kind=8), optional, dimension(:) :: brack
    real(kind=8), optional :: tol
    integer, optional :: niter

public interface fmin_bfgs

  • private subroutine bfgs_with_grad(func, grad, x, l, u, nbd, factr, pgtol, iprint, nloop)

    Arguments

    Type IntentOptional Attributes Name
    private function func(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    Return Value real(kind=8)
    private function grad(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    Return Value real(kind=8), dimension(size(x))
    real(kind=8), dimension(:), allocatable :: x
    real(kind=8), optional, dimension(:), allocatable :: l
    real(kind=8), optional, dimension(:), allocatable :: u
    integer, optional, dimension(:), allocatable :: nbd
    real(kind=8), optional :: factr
    real(kind=8), optional :: pgtol
    integer, optional :: iprint
    integer, optional :: nloop
  • private subroutine bfgs_no_grad(func, x, l, u, nbd, factr, pgtol, iprint, nloop)

    Arguments

    Type IntentOptional Attributes Name
    private function func(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), dimension(:) :: x
    Return Value real(kind=8)
    real(kind=8), dimension(:), allocatable :: x
    real(kind=8), optional, dimension(:), allocatable :: l
    real(kind=8), optional, dimension(:), allocatable :: u
    integer, optional, dimension(:), allocatable :: nbd
    real(kind=8), optional :: factr
    real(kind=8), optional :: pgtol
    integer, optional :: iprint
    integer, optional :: nloop

public interface linear_mix

  • private subroutine d_linear_mix_1(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: x
    real(kind=8), intent(in), dimension(size(x)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine d_linear_mix_2(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:) :: x
    real(kind=8), intent(in), dimension(size(x,1),size(x,2)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine d_linear_mix_3(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:,:) :: x
    real(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine d_linear_mix_4(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:,:,:) :: x
    real(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine d_linear_mix_5(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:,:,:,:) :: x
    real(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4),size(x,5)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine d_linear_mix_6(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:,:,:,:,:) :: x
    real(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine d_linear_mix_7(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:,:,:,:,:,:,:) :: x
    real(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6),size(x,7)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_1(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: x
    complex(kind=8), intent(in), dimension(size(x)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_2(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:) :: x
    complex(kind=8), intent(in), dimension(size(x,1),size(x,2)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_3(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:,:) :: x
    complex(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_4(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:,:,:) :: x
    complex(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_5(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:,:,:,:) :: x
    complex(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4),size(x,5)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_6(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:,:,:,:,:) :: x
    complex(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6)) :: Fx
    real(kind=8), intent(in) :: alpha
  • private subroutine c_linear_mix_7(x, Fx, alpha)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:,:,:,:,:,:,:) :: x
    complex(kind=8), intent(in), dimension(size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6),size(x,7)) :: Fx
    real(kind=8), intent(in) :: alpha

public interface adaptive_mix

  • private subroutine d_adaptive_mix(x, Fx, alpha, iter)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: x
    real(kind=8), intent(in), dimension(size(x)) :: Fx
    real(kind=8), intent(in) :: alpha
    integer, intent(in) :: iter
  • private subroutine c_adaptive_mix(z, Fz, alpha, iter)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: z
    complex(kind=8), intent(in), dimension(size(z)) :: Fz
    real(kind=8), intent(in) :: alpha
    integer, intent(in) :: iter

public interface broyden_mix

  • private subroutine d_broyden_mix(x, Fx, alpha, M, iter, w0)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(inout), dimension(:) :: x
    real(kind=8), intent(in), dimension(size(x)) :: Fx
    real(kind=8), intent(in) :: alpha
    integer, intent(in) :: M
    integer, intent(in) :: iter
    real(kind=8), optional :: w0
  • private subroutine c_broyden_mix(x, Fx, alpha, M, iter, w0)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=8), intent(inout), dimension(:) :: x
    complex(kind=8), intent(in), dimension(size(x)) :: Fx
    real(kind=8), intent(in) :: alpha
    integer, intent(in) :: M
    integer, intent(in) :: iter
    real(kind=8), optional :: w0

public interface fsolve

  • private subroutine fsolve_hybrd_func(func, x, tol, info, check, maxfev)

    Arguments

    Type IntentOptional Attributes Name
    private function func(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: x
    Return Value real(kind=8), dimension(size(x))
    real(kind=8), dimension(:) :: x
    real(kind=8), optional :: tol
    integer, optional :: info
    logical, optional :: check
    integer, optional :: maxfev
  • private subroutine fsolve_hybrd_sub(func, x, tol, info, check, maxfev)

    Arguments

    Type IntentOptional Attributes Name
    private subroutine func(x, ff)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: x
    real(kind=8), dimension(size(x)) :: ff
    real(kind=8), dimension(:) :: x
    real(kind=8), optional :: tol
    integer, optional :: info
    logical, optional :: check
    integer, optional :: maxfev
  • private subroutine fsolve_hybrj_func(func, dfunc, x, tol, info, check)

    Arguments

    Type IntentOptional Attributes Name
    private function func(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: x
    Return Value real(kind=8), dimension(size(x))
    private function dfunc(x)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: x
    Return Value real(kind=8), dimension(size(x),size(x))
    real(kind=8), dimension(:) :: x
    real(kind=8), optional :: tol
    integer, optional :: info
    logical, optional :: check
  • private subroutine fsolve_hybrj_sub(func, dfunc, x, tol, info, check)

    Arguments

    Type IntentOptional Attributes Name
    private subroutine func(x, f)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: x
    real(kind=8), dimension(size(x)) :: f
    private subroutine dfunc(x, df)
    Arguments
    Type IntentOptional Attributes Name
    real(kind=8), intent(in), dimension(:) :: x
    real(kind=8), dimension(size(x),size(x)) :: df
    real(kind=8), dimension(:) :: x
    real(kind=8), optional :: tol
    integer, optional :: info
    logical, optional :: check

Functions

public function brentq(func, a, b, tol) result(fzero)

Arguments

Type IntentOptional Attributes Name
private function func(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x
Return Value real(kind=8)
real(kind=8), intent(in) :: a
real(kind=8), intent(in) :: b
real(kind=8), optional :: tol

Return Value real(kind=8)


Subroutines

public subroutine brent(func, xmin, brack, tol, niter)

Arguments

Type IntentOptional Attributes Name
private function func(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8) :: x
Return Value real(kind=8)
real(kind=8), intent(inout) :: xmin
real(kind=8), optional, dimension(:) :: brack
real(kind=8), optional :: tol
integer, optional :: niter

public subroutine bracket(ax, bx, cx, fa, fb, fc, func)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(inout) :: ax
real(kind=8), intent(inout) :: bx
real(kind=8), intent(out) :: cx
real(kind=8), intent(out) :: fa
real(kind=8), intent(out) :: fb
real(kind=8), intent(out) :: fc
private function func(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8) :: x
Return Value real(kind=8)

public subroutine fmin(fn, start, lambda, tol, conv_check, max_fun_calls, fun_calls, num_restart, ierr)

Arguments

Type IntentOptional Attributes Name
private function fn(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8), dimension(:) :: x
Return Value real(kind=8)
real(kind=8) :: start(:)
real(kind=8), optional :: lambda(size(start))
real(kind=8), optional :: tol
integer, optional :: conv_check
integer, optional :: max_fun_calls
integer, optional :: fun_calls
integer, optional :: num_restart
integer, optional :: ierr

public subroutine broyden1(ff, x, check, maxits, tol, tol1, tolmin, stpmx, noexit)

Arguments

Type IntentOptional Attributes Name
procedure(broydn_func) :: ff
real(kind=8), intent(inout), dimension(:) :: x
logical, optional :: check
integer, optional :: maxits
real(kind=8), optional :: tol
real(kind=8), optional :: tol1
real(kind=8), optional :: tolmin
real(kind=8), optional :: stpmx
logical, optional :: noexit

public subroutine bisect(f, x1, x2, eps, Niter, flag)

Arguments

Type IntentOptional Attributes Name
private function f(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8) :: x
Return Value real(kind=8)
real(kind=8) :: x1
real(kind=8) :: x2
real(kind=8), optional :: eps
integer, optional :: Niter
integer, optional :: flag

public subroutine fzero(f, b, c, iflag, rguess, tol_rel, tol_abs)

Arguments

Type IntentOptional Attributes Name
private function f(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x
Return Value real(kind=8)
real(kind=8) :: b
real(kind=8) :: c
integer :: iflag
real(kind=8), optional :: rguess
real(kind=8), optional :: tol_rel
real(kind=8), optional :: tol_abs

public subroutine newton(f, xinit, eps, Niter)

Arguments

Type IntentOptional Attributes Name
private function f(x)
Arguments
Type IntentOptional Attributes Name
real(kind=8) :: x
Return Value real(kind=8)
real(kind=8), intent(inout) :: xinit
real(kind=8), optional :: eps
integer, optional :: Niter