KmlDss(Spd/Hpd)Analyze?I
Analyze the data structure, rearrange the sparse matrix, and perform symbolic factorization.
Interface Definition
C interface:
int KmlDssSpdAnalyzeSI(KmlSolverTask **pHandle);
int KmlDssSpdAnalyzeDI(KmlSolverTask **pHandle);
int KmlDssHpdAnalyzeCI(KmlSolverTask **pHandle);
int KmlDssHpdAnalyzeZI(KmlSolverTask **pHandle);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
pHandle |
KmlSolverTask ** |
Solver handle, which is a variable passed from a previous step. |
Input |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
Normal execution. |
KMLSS_NULL_ARGUMENT |
int |
The pHandle pointer is null. |
KMLSS_BAD_HANDLE |
int |
Incorrect format of pHandle. |
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 = 2;
int ia[3] = {0,2,4};
int ja[4] = {0,1,0,1};
double a[4] = {2,1,1,2};
KmlSolverTask *handle;
int ierr = KmlDssSpdInitDI(&handle, n, a, ja, ia);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdInitDI: %d", ierr);
}
ierr = KmlDssSpdAnalyzeDI(&handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSpdAnalyzeDI: %d", ierr);
}