SABER
type_minim Module Reference

Subroutines/functions list. More...

Data Types

type  minim_type
 
interface  minfit
 
interface  swap
 
interface  svsort
 

Functions/Subroutines

subroutine minim_compute (minim, mpl, rng)
 Minimize ensuring bounds constraints. More...
 
subroutine minim_cost (minim, mpl, x, f)
 Compute cost function. More...
 
subroutine minim_cost_fit_diag (minim, mpl, x, f)
 Diagnosic fit function cost. More...
 
subroutine minim_cost_fit_lct (minim, mpl, x, f)
 LCT fit function cost. More...
 
subroutine minim_hooke (minim, mpl, guess)
 Seeks a minimizer of a scalar function of several variables. More...
 
subroutine minim_best_nearby (minim, mpl, delta, point, prevbest, funevals, minf)
 Looks for a better nearby point, one coordinate at a time. More...
 
subroutine minim_praxis (minim, mpl, rng, guess)
 Seeks a minimizer of a scalar function of several variables. More...
 
subroutine minim_flin (minim, mpl, jsearch, l, x, nf, v, q0, q1, qd0, qd1, qa, qb, qc, flin)
 Seeks a minimizer of a scalar function of one variable. More...
 
subroutine minim_quad (minim, mpl, t, h, v, q0, q1, nl, nf, dmin, ldt, fx, qf1, qa, qb, qc, qd0, qd1)
 Minimize the scalar function F along a particular curve. More...
 
subroutine minim_minny (minim, mpl, jsearch, nits, d2, x1, f1, fk, x, t, h, v, q0, q1, nl, nf, dmin, ldt, fx, qa, qb, qc, qd0, qd1)
 Minimization of a scalar function of N variables along a line. More...
 
subroutine minim_minfit (mpl, n, tol, a, q)
 Singular value decomposition of an N by N array. More...
 
subroutine minim_swap (n, a1, a2)
 Swaps the entries of two vectors. More...
 
subroutine minim_svsort (n, d, v)
 Descending sorts singular values D and adjusts V. More...
 
subroutine minim_vt_dir (minim, x)
 Direct variable transform. More...
 
subroutine minim_vt_inv (minim, mpl, x)
 Inverse variable transform. More...
 

Variables

real(kind_real), parameter machep = epsilon(one)
 Machine precision. More...
 
real(kind_real), parameter small = machep**2
 Small value. More...
 
real(kind_real), parameter vsmall = small**2
 Very small value. More...
 
real(kind_real), parameter large = one/small
 Large value. More...
 
real(kind_real), parameter vlarge = one/vsmall
 Very large value. More...
 
real(kind_real), parameter m2 = sqrt(machep)
 Machine precision square-root. More...
 
real(kind_real), parameter m4 = sqrt(m2)
 Square-root of the machine precision square-root. More...
 

Detailed Description

Subroutines/functions list.

Instrumentation functions Minimization data derived type

Function/Subroutine Documentation

◆ minim_best_nearby()

subroutine type_minim::minim_best_nearby ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(minim%nx), intent(inout)  delta,
real(kind_real), dimension(minim%nx), intent(inout)  point,
real(kind_real), intent(in)  prevbest,
integer, intent(inout)  funevals,
real(kind_real), intent(out)  minf 
)
private

Looks for a better nearby point, one coordinate at a time.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data
[in,out]deltaStep
[in]prevbestBest existing cost
[in,out]funevalsNumber of evaluations
[out]minfMinimum cost

Definition at line 513 of file type_minim.F90.

◆ minim_compute()

subroutine type_minim::minim_compute ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng 
)
private

Minimize ensuring bounds constraints.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data
[in,out]rngRandom number generator

Definition at line 136 of file type_minim.F90.

◆ minim_cost()

subroutine type_minim::minim_cost ( class(minim_type), intent(in)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(minim%nx), intent(in)  x,
real(kind_real), intent(out)  f 
)
private

Compute cost function.

Parameters
[in]minimMinimization data
[in,out]mplMPI data
[in]xControl vector
[out]fCost function value

Definition at line 188 of file type_minim.F90.

◆ minim_cost_fit_diag()

subroutine type_minim::minim_cost_fit_diag ( class(minim_type), intent(in)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(minim%nx), intent(in)  x,
real(kind_real), intent(out)  f 
)
private

Diagnosic fit function cost.

Parameters
[in]minimMinimization data
[in,out]mplMPI data
[in]xControl vector
[out]fCost function value

Definition at line 222 of file type_minim.F90.

◆ minim_cost_fit_lct()

subroutine type_minim::minim_cost_fit_lct ( class(minim_type), intent(in)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(minim%nx), intent(in)  x,
real(kind_real), intent(out)  f 
)
private

LCT fit function cost.

Parameters
[in]minimMinimization data
[in,out]mplMPI data
[in]xControl vector
[out]fCost function value

Definition at line 348 of file type_minim.F90.

◆ minim_flin()

subroutine type_minim::minim_flin ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  jsearch,
real(kind_real), intent(in)  l,
real(kind_real), dimension(minim%nx), intent(in)  x,
integer, intent(inout)  nf,
real(kind_real), dimension(minim%nx,minim%nx), intent(in)  v,
real(kind_real), dimension(minim%nx), intent(in)  q0,
real(kind_real), dimension(minim%nx), intent(in)  q1,
real(kind_real), intent(in)  qd0,
real(kind_real), intent(in)  qd1,
real(kind_real), intent(out)  qa,
real(kind_real), intent(out)  qb,
real(kind_real), intent(out)  qc,
real(kind_real), intent(out)  flin 
)
private

Seeks a minimizer of a scalar function of one variable.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data
[in]jsearchKind of search
[in]lParticular point at which the function is to be evaluated
[in]xState
[in,out]nfNumber of function evaluations
[in]vSearch directions
[in]q0First auxiliary point
[in]q1Second auxiliary point
[in]qd0First auxiliary value
[in]qd1Second auxiliary value
[out]qaFirst combination coefficient
[out]qbSecond combination coefficient
[out]qcThird combination coefficient
[out]flinValue of the function at the minimizing point

Definition at line 837 of file type_minim.F90.

◆ minim_hooke()

subroutine type_minim::minim_hooke ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(minim%nx), intent(in)  guess 
)
private

Seeks a minimizer of a scalar function of several variables.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data

Definition at line 407 of file type_minim.F90.

◆ minim_minfit()

subroutine type_minim::minim_minfit ( type(mpl_type), intent(inout)  mpl,
integer, intent(in)  n,
real(kind_real), intent(in)  tol,
real(kind_real), dimension(n,n), intent(inout)  a,
real(kind_real), dimension(n), intent(inout)  q 
)
private

Singular value decomposition of an N by N array.

Parameters
[in,out]mplMPI data
[in]nOrder of the matrix
[in]tolTolerance
[in,out]aMatrix
[in,out]qSingular values

Definition at line 1138 of file type_minim.F90.

◆ minim_minny()

subroutine type_minim::minim_minny ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
integer, intent(in)  jsearch,
integer, intent(in)  nits,
real(kind_real), intent(inout)  d2,
real(kind_real), intent(inout)  x1,
real(kind_real), intent(inout)  f1,
logical, intent(in)  fk,
real(kind_real), dimension(minim%nx), intent(inout)  x,
real(kind_real), intent(in)  t,
real(kind_real), intent(in)  h,
real(kind_real), dimension(minim%nx,minim%nx), intent(in)  v,
real(kind_real), dimension(minim%nx), intent(in)  q0,
real(kind_real), dimension(minim%nx), intent(in)  q1,
integer, intent(inout)  nl,
integer, intent(inout)  nf,
real(kind_real), intent(in)  dmin,
real(kind_real), intent(in)  ldt,
real(kind_real), intent(inout)  fx,
real(kind_real), intent(inout)  qa,
real(kind_real), intent(inout)  qb,
real(kind_real), intent(inout)  qc,
real(kind_real), intent(in)  qd0,
real(kind_real), intent(in)  qd1 
)
private

Minimization of a scalar function of N variables along a line.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data
[in]jsearchKind of search
[in]nitsMaximum number of times the interval may be halved to retry the calculation
[in,out]d2Approximation to the second derivative of the function halved
[in,out]x1Estimate of the distance from x to the minimum along v(*,j)
[in,out]f1?
[in]fkIf fk is .true., then on input f1 contains the value fline(x1)
[in,out]xState
[in]t?
[in]h?
[in]vSearch directions
[in]q0First auxiliary point
[in]q1Second auxiliary point
[in,out]nlNumber of linear searches
[in,out]nfNumber of function evaluations
[in]dminSmallest eigenvalue estimate
[in]ldtStep length
[in,out]fxFunction value
[in,out]qaFirst combination coefficient
[in,out]qbSecond combination coefficient
[in,out]qcThird combination coefficient
[in]qd0First auxiliary value
[in]qd1Second auxiliary value

Definition at line 970 of file type_minim.F90.

◆ minim_praxis()

subroutine type_minim::minim_praxis ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
real(kind_real), dimension(minim%nx), intent(in)  guess 
)
private

Seeks a minimizer of a scalar function of several variables.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data
[in,out]rngRandom number generator

Definition at line 575 of file type_minim.F90.

◆ minim_quad()

subroutine type_minim::minim_quad ( class(minim_type), intent(inout)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), intent(in)  t,
real(kind_real), intent(in)  h,
real(kind_real), dimension(minim%nx,minim%nx), intent(in)  v,
real(kind_real), dimension(minim%nx), intent(inout)  q0,
real(kind_real), dimension(minim%nx), intent(inout)  q1,
integer, intent(inout)  nl,
integer, intent(inout)  nf,
real(kind_real), intent(in)  dmin,
real(kind_real), intent(in)  ldt,
real(kind_real), intent(inout)  fx,
real(kind_real), intent(inout)  qf1,
real(kind_real), intent(inout)  qa,
real(kind_real), intent(inout)  qb,
real(kind_real), intent(inout)  qc,
real(kind_real), intent(inout)  qd0,
real(kind_real), intent(inout)  qd1 
)
private

Minimize the scalar function F along a particular curve.

Parameters
[in,out]minimMinimization data
[in,out]mplMPI data
[in]t?
[in]h?
[in]vSearch directions
[in,out]q0First auxiliary point
[in,out]q1Second auxiliary point
[in,out]nlNumber of linear searches
[in,out]nfNumber of function evaluations
[in]dminSmallest eigenvalue estimate
[in]ldtStep length
[in,out]fxFunction value
[in,out]qf1?
[in,out]qaFirst combination coefficient
[in,out]qbSecond combination coefficient
[in,out]qcThird combination coefficient
[in,out]qd0First auxiliary value
[in,out]qd1Second auxiliary value

Definition at line 894 of file type_minim.F90.

◆ minim_svsort()

subroutine type_minim::minim_svsort ( integer, intent(in)  n,
real(kind_real), dimension(n), intent(inout)  d,
real(kind_real), dimension(n,n), intent(inout)  v 
)
private

Descending sorts singular values D and adjusts V.

Parameters
[in]nVector and array size
[in,out]dVector to be sorted
[in,out]vArray to adjust as d is sorted

Definition at line 1384 of file type_minim.F90.

◆ minim_swap()

subroutine type_minim::minim_swap ( integer, intent(in)  n,
real(kind_real), dimension(n), intent(inout)  a1,
real(kind_real), dimension(n), intent(inout)  a2 
)
private

Swaps the entries of two vectors.

Parameters
[in]nVectors size
[in,out]a1First vector
[in,out]a2Second vector

Definition at line 1352 of file type_minim.F90.

◆ minim_vt_dir()

subroutine type_minim::minim_vt_dir ( class(minim_type), intent(in)  minim,
real(kind_real), dimension(minim%nx), intent(inout)  x 
)
private

Direct variable transform.

Parameters
[in]minimMinimization data
[in,out]xVector

Definition at line 1427 of file type_minim.F90.

◆ minim_vt_inv()

subroutine type_minim::minim_vt_inv ( class(minim_type), intent(in)  minim,
type(mpl_type), intent(inout)  mpl,
real(kind_real), dimension(minim%nx), intent(inout)  x 
)
private

Inverse variable transform.

Parameters
[in]minimMinimization data
[in,out]mplMPI data
[in,out]xVector

Definition at line 1453 of file type_minim.F90.

Variable Documentation

◆ large

real(kind_real), parameter type_minim::large = one/small

Large value.

Definition at line 48 of file type_minim.F90.

◆ m2

real(kind_real), parameter type_minim::m2 = sqrt(machep)

Machine precision square-root.

Definition at line 50 of file type_minim.F90.

◆ m4

real(kind_real), parameter type_minim::m4 = sqrt(m2)

Square-root of the machine precision square-root.

Definition at line 51 of file type_minim.F90.

◆ machep

real(kind_real), parameter type_minim::machep = epsilon(one)

Machine precision.

Definition at line 45 of file type_minim.F90.

◆ small

real(kind_real), parameter type_minim::small = machep**2

Small value.

Definition at line 46 of file type_minim.F90.

◆ vlarge

real(kind_real), parameter type_minim::vlarge = one/vsmall

Very large value.

Definition at line 49 of file type_minim.F90.

◆ vsmall

real(kind_real), parameter type_minim::vsmall = small**2

Very small value.

Definition at line 47 of file type_minim.F90.