KmlDssSymClean?I
Release the internal data structure and point the handle to a null pointer.
Interface Definition
C interface:
int KmlDssSymCleanSI(KmlSolverTask **pHandle);
int KmlDssSymCleanDI(KmlSolverTask **pHandle);
int KmlDssSymCleanCI(KmlSolverTask **pHandle);
int KmlDssSymCleanZI(KmlSolverTask **pHandle);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
pHandle |
KmlSolverTask ** |
Solver handle, which transfers a variable defined previously |
Input/Output |
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
The execution is successful. |
KMLSS_NULL_ARGUMENT |
int |
Invalid parameter. |
KMLSS_BAD_HANDLE |
int |
The format of pHandle is incorrect. |
Dependencies
#include "kml_dss.h" or #include "kml_solver.h"
Examples
C interface:
int n = 8;
int ia[9] = {0, 2, 4, 6, 8, 10, 12, 13, 14};
int ja[14] = {0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 7};
double a[14] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0};
double b[8] = {3.0, 7.0, 13.0, 19.0, 25.0, 31.0, 23.0, 26.0};
double x[8];
KmlSolverTask* matrix_handle = NULL;
int ierr = KmlDssSymInitDI(&matrix_handle, n, a, ja, ia);
if (ierr != 0) {
printf("\nERROR in KmlDssSymInitDI: %d", ierr);
}
ierr = KmlDssSymAnalyzeDI(&matrix_handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSymAnalyzeDI: %d", ierr);
}
ierr = KmlDssSymFactorizeDI(&matrix_handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSymFactorizeDI: %d", ierr);
}
ierr = KmlDssSymSolveDI(&matrix_handle, nrhs, x, ldx, b, ldb);
if (ierr != 0) {
printf("\nERROR in KmlDssSymSolveDI: %d", ierr);
}
ierr = KmlDssSymCleanDI(&matrix_handle);
if (ierr != 0) {
printf("\nERROR in KmlDssSymcleanDI: %d", ierr);
}
Parent topic: LDLT