GALAHAD SEC package#
purpose#
The sec
package
builds and updates dense BFGS and SR1 secant approximations to a Hessian
so that the approximation \(B\) satisfies the secant condition \(B s = y\)
for given vectors \(s\) and \(y\).
Currently only the options and inform dictionaries are exposed; these are provided and used by other GALAHAD packages with Python interfaces. Please contact us if you would like full functionality!
See Section 4 of $GALAHAD/doc/sec.pdf for a brief description of the method employed and other details.
parametric real type T and integer type INT#
Below, the symbol T refers to a parametric real type that may be Float32 (single precision), Float64 (double precision) or, if supported, Float128 (quadruple precision). The symbol INT refers to a parametric integer type that may be Int32 (32-bit integer) or Int64 (64-bit integer).
callable functions#
function sec_initialize(T, INT, control, status)
Set default control values and initialize private data
Parameters:
control |
is a structure containing control information (see sec_control_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function sec_information(T, INT, data, inform, status)
Provides output information
Parameters:
data |
holds private internal data |
inform |
is a structure containing output information (see sec_inform_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function sec_terminate(T, INT, data, control, inform)
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see sec_control_type) |
inform |
is a structure containing output information (see sec_inform_type) |
available structures#
sec_control_type structure#
struct sec_control_type{T,INT} f_indexing::Bool error::INT out::INT print_level::INT h_initial::T update_skip_tol::T prefix::NTuple{31,Cchar}
detailed documentation#
control derived type as a Julia structure
components#
Bool f_indexing
use C or Fortran sparse matrix indexing
INT error
error and warning diagnostics occur on stream error
INT out
general output occurs on stream out
INT print_level
the level of output required. <= 0 gives no output, >= 1 warning message
T h_initial
the initial Hessian approximation will be h_initial \* \(I\)
T update_skip_tol
an update is skipped if the resulting matrix would have grown too much; specifically it is skipped when y^T s / y^T y <= update_skip_tol.
NTuple{31,Cchar} prefix
all output lines will be prefixed by .prefix(2:LEN(TRIM(.prefix))-1) where .prefix contains the required string enclosed in quotes, e.g. “string” or ‘string’
sec_inform_type structure#
struct sec_inform_type{INT} status::INT
detailed documentation#
inform derived type as a Julia structure
components#
INT status
return status. Possible values are:
0
A successful return
-85
An update is inappropriate and has been skipped