callable functions#
function sls_initialize(T, INT, solver, data, control, status)
Select solver, set default control values and initialize private data
Parameters:
solver |
is a one-dimensional array of type Vararg{Cchar} that specifies the solver package that should be used to factorize the matrix |
data |
holds private internal data |
control |
is a structure containing control information (see sls_control_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
function sls_read_specfile(T, INT, control, specfile)
Read the content of a specification file, and assign values associated with given keywords to the corresponding control parameters. An in-depth discussion of specification files is available, and a detailed list of keywords with associated default values is provided in $GALAHAD/src/sls/SLS.template. See also Table 2.1 in the Fortran documentation provided in $GALAHAD/doc/sls.pdf for a list of how these keywords relate to the components of the control structure.
Parameters:
control |
is a structure containing control information (see sls_control_type) |
specfile |
is a one-dimensional array of type Vararg{Cchar} that must give the name of the specification file |
function sls_analyse_matrix(T, INT, control, data, status, n, type, ne, row, col, ptr)
Import structural matrix data into internal storage prior to solution
Parameters:
control |
is a structure whose members provide control parameters for the remaining procedures (see sls_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of rows in the symmetric matrix |
type |
is a one-dimensional array of type Vararg{Cchar} that specifies the symmetric storage scheme used for the matrix |
ne |
is a scalar variable of type INT that holds the number of entries in the lower triangular part of |
row |
is a one-dimensional array of size ne and type INT that holds the row indices of the lower triangular part of |
col |
is a one-dimensional array of size ne and type INT that holds the column indices of the lower triangular part of |
ptr |
is a one-dimensional array of size n+1 and type INT that holds the starting position of each row of the lower triangular part of |
function sls_reset_control(T, INT, control, data, status)
Reset control parameters after import if required.
Parameters:
control |
is a structure whose members provide control parameters for the remaining procedures (see sls_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
function sls_factorize_matrix(T, INT, data, status, ne, val)
Form and factorize the symmetric matrix
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
ne |
is a scalar variable of type INT that holds the number of entries in the lower triangular part of the symmetric matrix |
val |
is a one-dimensional array of size ne and type T that holds the values of the entries of the lower triangular part of the symmetric matrix |
function sls_solve_system(T, INT, data, status, n, sol)
Solve the linear system
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of entries in the vectors |
sol |
is a one-dimensional array of size n and type double. On entry, it must hold the vector |
function sls_partial_solve_system(T, INT, part, data, status, n, sol)
Given the factorization
Parameters:
part |
is a one-dimensional array of type Vararg{Cchar} that specifies the component |
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the entry and exit status from the package. On initial entry, status must be set to 1. Possible exit values are:
|
n |
is a scalar variable of type INT that holds the number of entries in the vectors |
sol |
is a one-dimensional array of size n and type double. On entry, it must hold the vector |
function sls_information(T, INT, data, inform, status)
Provide output information
Parameters:
data |
holds private internal data |
inform |
is a structure containing output information (see sls_inform_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function sls_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 sls_control_type) |
inform |
is a structure containing output information (see sls_inform_type) |