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#
Below, the symbol T refers to a parametric real type that may be Float32 (single precision) or Float64 (double precision).
callable functions#
function sec_initialize(T, 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 Int32 that gives the exit status from the package. Possible values are (currently):
|
function sec_information(T, 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 Int32 that gives the exit status from the package. Possible values are (currently):
|
function sec_terminate(T, 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} f_indexing::Bool error::Int32 out::Int32 print_level::Int32 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
Int32 error
error and warning diagnostics occur on stream error
Int32 out
general output occurs on stream out
Int32 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 status::Int32
detailed documentation#
inform derived type as a Julia structure
components#
Int32 status
return status. Possible values are:
0
A successful return
-85
An update is inappropriate and has been skipped