overview of functions provided#
// namespaces namespace conf; // typedefs typedef float spc_; typedef double rpc_; typedef int ipc_; // structs struct fdc_control_type; struct fdc_inform_type; struct fdc_time_type; // global functions void fdc_initialize(void **data, struct fdc_control_type* control, ipc_ *status); void fdc_read_specfile(struct fdc_control_type* control, const char specfile[]); void fdc_find_dependent_rows( struct fdc_control_type* control, void **data, struct fdc_inform_type* inform, ipc_ *status, ipc_ m, ipc_ n, ipc_ A_ne, const ipc_ A_col[], const ipc_ A_ptr[], const rpc_ A_val[], const rpc_ b[], ipc_ *n_depen, ipc_ depen[] ); void fdc_terminate( void **data, struct fdc_control_type* control, struct fdc_inform_type* inform );
typedefs#
typedef float spc_
spc_
is real single precision
typedef double rpc_
rpc_
is the real working precision used, but may be changed to float
by
defining the preprocessor variable SINGLE
.
typedef int ipc_
ipc_
is the default integer word length used, but may be changed to
int64_t
by defining the preprocessor variable INTEGER_64
.
function calls#
void fdc_initialize(void **data, struct fdc_control_type* control, ipc_ *status)
Set default control values and initialize private data
Parameters:
data |
holds private internal data |
control |
is a struct containing control information (see fdc_control_type) |
status |
is a scalar variable of type ipc_, that gives the exit status from the package. Possible values are (currently):
|
void fdc_read_specfile(struct fdc_control_type* control, const char 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/fdc/FDC.template. See also Table 2.1 in the Fortran documentation provided in $GALAHAD/doc/fdc.pdf for a list of how these keywords relate to the components of the control structure.
Parameters:
control |
is a struct containing control information (see fdc_control_type) |
specfile |
is a character string containing the name of the specification file |
void fdc_find_dependent_rows( struct fdc_control_type* control, void **data, struct fdc_inform_type* inform, ipc_ *status, ipc_ m, ipc_ n, ipc_ A_ne, const ipc_ A_col[], const ipc_ A_ptr[], const rpc_ A_val[], const rpc_ b[], ipc_ *n_depen, ipc_ depen[] )
Find dependent rows and, if any, check if \(A x = b\) is consistent
Parameters:
control |
is a struct containing control information (see fdc_control_type) |
data |
holds private internal data |
inform |
is a struct containing output information (see fdc_inform_type) |
status |
is a scalar variable of type ipc_, that gives the entry and exit status from the package. Possible exit values are:
|
m |
is a scalar variable of type ipc_, that holds the number of rows of \(A\). |
n |
is a scalar variable of type ipc_, that holds the number of columns of \(A\). |
A_ne |
is a scalar variable of type ipc_, that holds the number of nonzero entries in \(A\). |
A_col |
is a one-dimensional array of size A_ne and type ipc_, that holds the column indices of \(A\) in a row-wise storage scheme. The nonzeros must be ordered so that those in row i appear directly before those in row i+1, the order within each row is unimportant. |
A_ptr |
is a one-dimensional array of size n+1 and type ipc_, that holds the starting position of each row of \(A\), as well as the total number of entries. |
A_val |
is a one-dimensional array of size a_ne and type rpc_, that holds the values of the entries of the \(A\) ordered as in A_col and A_ptr. |
b |
is a one-dimensional array of size m and type rpc_, that holds the linear term \(b\) in the constraints. The i-th component of b, i = 0, … , m-1, contains \(b_i\). |
n_depen |
is a scalar variable of type ipc_, that holds the number of dependent constraints, if any. |
depen |
is a one-dimensional array of size m and type ipc_, whose first n_depen components contain the indices of dependent constraints. |
void fdc_terminate( void **data, struct fdc_control_type* control, struct fdc_inform_type* inform )
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a struct containing control information (see fdc_control_type) |
inform |
is a struct containing output information (see fdc_inform_type) |