KmlDssSymAnalyze?I
Analyze the data structure, rearrange the row/column of a sparse matrix, and perform symbolic factorization.
Interface Definition
C interface:
int KmlDssSymAnalyzeSI(KmlSolverTask **pHandle);
int KmlDssSymAnalyzeDI(KmlSolverTask **pHandle);
int KmlDssSymAnalyzeCI(KmlSolverTask **pHandle);
int KmlDssSymAnalyzeZI(KmlSolverTask **pHandle);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
pHandle |
KmlSolverTask ** |
Solver handle, which transfers a variable defined previously |
Input |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
The execution is successful. |
KMLSS_NULL_ARGUMENT |
int |
The pHandle pointer is null. |
KMLSS_BAD_HANDLE |
int |
The format of pHandle is incorrect. |
KMLSS_NONZERO_INDEXING |
int |
The row index pointer does not start from 0. That is, ia[0] is not 0. |
KMLSS_MISSING_DIAGONAL_ELEMENT |
int |
All diagonal elements of the sparse matrix are empty. |
KMLSS_INTERNAL_ERROR |
int |
Empty diagonal elements exist in the sparse matrix or an internal error occurs during algorithm execution. |
KMLSS_REORDERING_PROBLEM |
int |
The reordering algorithm fails. |
Dependencies
#include "kml_dss.h" or #include "kml_solver.h"
Examples
int n = 8;
int ia[9] = {0, 2, 4, 6, 7, 8, 9, 10, 11};
int ja[11] = {0, 7, 1, 6, 2, 5, 3, 4, 5, 6, 7};
double a[11] = {1.0, 2.0, -2.0, 3.0, 3.0, 4.0, -4.0, 5.0, -6.0, 7.0, 8.0};
KmlSolverTask *handle;
int ierr = KmlDssSymInitDI(&handle, n, a, ja, ia);
if (ierr != 0) {
printf("\nERROR in KmlDssSymInitDI: %d", ierr);
}
ierr = KmlDssSymAnalyzeDI(&handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSymAnalyzeDI: %d", ierr);
}