Zslu class

Wrapper class for a generic sparse direct solver. More...


Files

file  zslu.h
 Class Zslu: Wrapper class for a generic sparse direct solver.

Classes

struct  sZslu
 Contains public data members for Zslu class. More...

Typedefs

typedef struct sZslu Zslu
 Declaration of the Zslu class as the Zslu structure.

Functions

ZsluZslu_ctor (Vmem *vmem, int skey, int m, int n, int nnz, int *ia, int *ja, double *a)
 The Zslu constructor.
void Zslu_dtor (Zslu **thee)
 The Zslu destructor.
int Zslu_factor (Zslu *thee)
 Sparse LU factor the system.
int Zslu_solve (Zslu *thee, int key, double *b, double *x)
 Use sparse LU factors to back/forward solve a linear system.
void Zslu_memChk (Zslu *thee)
 Print the exact current malloc usage.
double Zslu_lnDet (Zslu *thee)
 Calculate the log of the determinant of a SuperLU matrix.

Detailed Description

Wrapper class for a generic sparse direct solver.


Typedef Documentation

typedef struct sZslu Zslu

Declaration of the Zslu class as the Zslu structure.

Author:
Michael Holst
Returns:
None


Function Documentation

Zslu* Zslu_ctor ( Vmem *  vmem,
int  skey,
int  m,
int  n,
int  nnz,
int *  ia,
int *  ja,
double *  a 
)

The Zslu constructor.

Author:
Michael Holst
Note:
Class Zslu: Non-inlineable methods (zslu.c)
Returns:
Pointer to a newly allocated (empty) Zslu class
Parameters:
vmem Memory management object
skey index for storage format (0=row-wise YSMP, 1=col-wise YSMP)
m number of rows
n number of cols
nnz number of nonzeros
ia row-start (skey=0) or col-start (skey=1) in < j a >& < a >
ja col indices (skey=0) or row-indices (skey=1) for < a >
a the nonzeros in the matrix

void Zslu_dtor ( Zslu **  thee  ) 

The Zslu destructor.

Author:
Michael Holst
Note:
Class Zslu: Non-inlineable methods (zslu.c)
Returns:
None
Parameters:
thee Pointer to Zslu class

int Zslu_factor ( Zslu thee  ) 

Sparse LU factor the system.

Author:
Michael Holst
Note:
Class Zslu: Non-inlineable methods (zslu.c)
Returns:
Success enumeration
Parameters:
thee Pointer to Zslu class

double Zslu_lnDet ( Zslu thee  ) 

Calculate the log of the determinant of a SuperLU matrix.

Author:
Nathan Baker (some restructuring by Michael Holst)
Note:
Class Zslu: Non-inlineable methods (zslu.c)
Uses SLU factorization and will be very slow for large matrices.
According to Sherry Li, author of SuperLU:
The diagonal blocks of both L and U are stored in the L matrix, which is returned from dgstrf(). The L matrix is a supernodal matrix, its structure is called SCformat in supermatrix.h. This is also illustrated by a small 5x5 example in Section 2.3 of the Users' Guide, see Figures 2.1 and 2.3. This example is in the code EXAMPLE/superlu.c. Since L is unit-diagonal, so the ones are not stored. Instead, the diagonal stored in L is really the diagonal for U. Therefore, you only need to extract those diagonal elements. One routine that you can hack to get the diagonal is dPrint_SuperNode_Matrix() in dutil.c. Another tricky part is the sign of the determinant. Since I am doing the following factorization Pr*A*Pc = LU, i.e., both row and column permutations may be applied, they are called perm_r and perm_c in the code. Their determinants will be 1 or -1, but you need to find out the sign by going through these permutations.
Returns:
the log of the determinant of a SuperLU matrix
Parameters:
thee Pointer to Zslu class

void Zslu_memChk ( Zslu thee  ) 

Print the exact current malloc usage.

Author:
Michael Holst
Note:
Class Zslu: Non-inlineable methods (zslu.c)
Returns:
None
Parameters:
thee Pointer to Zslu class

int Zslu_solve ( Zslu thee,
int  key,
double *  b,
double *  x 
)

Use sparse LU factors to back/forward solve a linear system.

Author:
Michael Holst
Note:
Class Zslu: Non-inlineable methods (zslu.c)
Returns:
Success enumeration
Parameters:
thee Pointer to Zslu class
key index for different solution methods
b Pointer to the array b
x Pointer to the array x


Generated on Mon Aug 9 11:13:45 2010 for MC by  doxygen 1.5.6