SABER
type_minim Module Reference

Minimization data derived type. More...

Data Types

type  minim_type
 

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 minfit (mpl, n, tol, a, q)
 Singular value decomposition of an N by N array. More...
 
subroutine swap (n, a1, a2)
 Swaps the entries of two vectors
More...
 
subroutine 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(1.0_kind_real)
 
real(kind_real), parameter small = machep**2
 
real(kind_real), parameter vsmall = small**2
 
real(kind_real), parameter large = 1.0/small
 
real(kind_real), parameter vlarge = 1.0/vsmall
 
real(kind_real), parameter m2 = sqrt(machep)
 
real(kind_real), parameter m4 = sqrt(m2)
 

Detailed Description

Minimization data derived type.

Function/Subroutine Documentation

◆ minfit()

subroutine type_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 1016 of file type_minim.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 439 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 101 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 147 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 175 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 292 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 742 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 342 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 857 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 492 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 790 of file type_minim.F90.

Here is the call graph for this function:

◆ 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 1278 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 1295 of file type_minim.F90.

Here is the call graph for this function:

◆ svsort()

subroutine type_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 1244 of file type_minim.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap()

subroutine type_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 1221 of file type_minim.F90.

Here is the caller graph for this function:

Variable Documentation

◆ large

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

Definition at line 87 of file type_minim.F90.

◆ m2

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

Definition at line 89 of file type_minim.F90.

◆ m4

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

Definition at line 90 of file type_minim.F90.

◆ machep

real(kind_real), parameter type_minim::machep = epsilon(1.0_kind_real)

Definition at line 84 of file type_minim.F90.

◆ small

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

Definition at line 85 of file type_minim.F90.

◆ vlarge

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

Definition at line 88 of file type_minim.F90.

◆ vsmall

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

Definition at line 86 of file type_minim.F90.