Documentation for module linesearch

A generic framework to calculate step lengths for 1D line search

source: linesearch.F
Loading...

public Types:

linesearch_type
...

public Subroutines/Functions:

Declare the line search input section.
Finzalize line search machinery
Initialize linesearch from given input section
SUBROUTINE
linesearch_reset (this)
Reset line search to initial state
Calculate step length of next line search step.

public Types:

TYPE :: linesearch_type

...


REAL(dp),
PUBLIC :: step_size = 0.0_DP ...
LOGICAL,
PUBLIC :: starts = .FALSE. ...
POINTER :: state_adapt => NULL() ...
POINTER :: state_2pnt => NULL() ...
POINTER :: state_3pnt => NULL() ...
POINTER :: state_gold => NULL() ...
INTEGER
:: iw = -1 ...
INTEGER
:: method = -1 ...
CHARACTER(10)
:: label = "" ...
REAL(dp)
:: init_step_size = 0.0_DP ...
REAL(dp)
:: eps_step_size = 0.0_DP ...
REAL(dp)
:: max_step_size = 0.0_DP ...
REAL(dp)
:: tiny_step_size = 0.0_DP ...

SUBROUTINElinesearch_create_section(section)

Declare the line search input section.

Arguments:
POINTER
:: section ...

SUBROUTINElinesearch_finalize(this)

Finzalize line search machinery

Arguments:
INTENT(inout)
:: this ...

SUBROUTINElinesearch_init(this, section, label)

Initialize linesearch from given input section

Arguments:
INTENT(inout)
:: this ...
POINTER
:: section ...
CHARACTER(*)
:: label ...

SUBROUTINElinesearch_reset(this)

Reset line search to initial state

Arguments:
INTENT(inout)
:: this ...

SUBROUTINElinesearch_step(this, energy, slope)

Calculate step length of next line search step.

Arguments:
INTENT(inout)
:: this ...
REAL(dp),
INTENT(in)
:: energy ...
REAL(dp),
INTENT(in)
:: slope ...

private Parameters/Types:

private Types:

TYPE :: linesearch_2pnt_type

...


REAL(dp),
DIMENSION(2) :: energies = 0.0 ...
REAL(dp)
:: scan_step = 0.0 ...
REAL(dp)
:: last_step_size = 0.0 ...
REAL(dp)
:: max_step_size = 0.0 ...
INTEGER
:: count = 1 ...

TYPE :: linesearch_3pnt_type

...


REAL(dp),
DIMENSION(3) :: energies = 0.0 ...
REAL(dp),
DIMENSION(3) :: scan_steps = 0.0 ...
REAL(dp)
:: last_step_size = 0.0 ...
REAL(dp)
:: max_step_size = 0.0 ...
REAL(dp)
:: tiny_step_size = 0.0 ...
INTEGER
:: count = 1 ...

TYPE :: linesearch_adapt_type

...


REAL(dp)
:: last_step_size = 0.0 ...
REAL(dp)
:: left_x = 0.0 ...
REAL(dp)
:: middle_x = 0.0 ...
REAL(dp)
:: right_x = 0.0 ...
REAL(dp)
:: left_e = 0.0 ...
REAL(dp)
:: middle_e = 0.0 ...
REAL(dp)
:: right_e = 0.0 ...
LOGICAL
:: have_left = .FALSE. ...
LOGICAL
:: have_middle = .FALSE. ...
LOGICAL
:: have_right = .FALSE. ...
INTEGER
:: count = 0 ...

TYPE :: linesearch_gold_type

...


REAL(dp)
:: scan_steps = 0.0 ...
REAL(dp)
:: last_step_size = 0.0 ...
REAL(dp)
:: eps_step_size = 0.0 ...
REAL(dp)
:: left_x = 0.0 ...
REAL(dp)
:: middle_x = 0.0 ...
REAL(dp)
:: right_x = 0.0 ...
REAL(dp)
:: left_e = 0.0 ...
REAL(dp)
:: middle_e = 0.0 ...
REAL(dp)
:: right_e = 0.0 ...
LOGICAL
:: have_left = .FALSE. ...
LOGICAL
:: have_middle = .FALSE. ...
LOGICAL
:: have_right = .FALSE. ...
LOGICAL
:: gave_up = .FALSE. ...