Rate This Document
Findability
Accuracy
Completeness
Readability

KmlScadss(SPD/HPD)Factorize?I

Apply LLT factorization to a symmetric positive definite matrix or LLH factorization to a Hermitian positive definite matrix.

Interface Definition

C interface:

int KmlScadssSpdFactorizeSI(KmlScasolverTask **pHandle);

int KmlScadssSpdFactorizeDI(KmlScasolverTask **pHandle);

int KmlScadssHpdFactorizeCI(KmlScasolverTask **pHandle);

int KmlScadssHpdFactorizeZI(KmlScasolverTask **pHandle);

Parameters

Parameter

Type

Description

Input/Output

pHandle

KmlScasolverTask **

Solver handle, which is a variable transferred previously

Input/Output

Return Value

Return Value

Type

Description

KMLSS_NO_ERROR

int

The execution is successful.

KMLSS_NULL_ARGUMENT

int

The parameter is invalid or its format is incorrect.

Dependencies

#include "kml_scadss.h"

Examples

C interface:
MPI_Init(NULL, NULL);
int size, rank;
MPI_Comm_size(MPI_COMM_WORLD, &size);// Obtain the total number of processes.
MPI_Comm_rank(MPI_COMM_WORLD, &rank);// Obtain the current process ID.

int n = 8;
int ia[9] = {0, 3, 7, 9, 11, 13, 15, 16, 17};
int ja[17] = {0, 3, 4, 1, 2, 3, 5, 2, 7, 3, 6, 4, 5, 5, 7, 6, 7};
double a[17] = {1.0, 1.0, 2.0, 9.0, 2.0, 1.0, -3.0, 3.0, 2.0, 9.0, -5.0, 6.0, 1.0, 4.0, 1.0, 7.0, 2.0};
KmlScasolverTask* matrix_handle = NULL;
int ierr = KmlScadssSpdInitDI(&matrix_handle, n, a, ja, ia, MPI_COMM_WORLD);
ierr = KmlScadssSpdAnalyzeDI(&matrix_handle);
ierr = KmlScadssSpdFactorizeDI(&matrix_handle);
if (ierr != 0) {
    printf("\nERROR in KmlScadssSpdFactorizeDI: %d", ierr);
}