Main Page | File List | File Members

zsupralu_type.h File Reference

Supralu doublecomplex API. More...

#include "zsp_defs.h"

Go to the source code of this file.

Classes

struct  zsupralu_sparse_type

Functions

void zsupralu_new_ (zsupralu_sparse_type **self, doublecomplex *vals, int *row_ind, int *col_ptr, int *nnz, int *n, int *info)
 Constructor.

void zsupralu_del_ (zsupralu_sparse_type **self, int *info)
 Destructor.

void zsupralu_vector_dot_matrix_ (zsupralu_sparse_type **self, doublecomplex *vector, doublecomplex *res, int *info)
 Vector dot matrix multiplication.

void zsupralu_conj_vector_dot_matrix_ (zsupralu_sparse_type **self, doublecomplex *vector, doublecomplex *res, int *info)
 Conjugate(vector) dot matrix multiplication.

void zsupralu_matrix_dot_vector_ (zsupralu_sparse_type **self, doublecomplex *vector, doublecomplex *res, int *info)
 Matrix dot vector multiplication.

void zsupralu_vector_dot_matrix_dot_vector_ (zsupralu_sparse_type **self, doublecomplex *vector1, doublecomplex *vector2, doublecomplex *res, int *info)
 Vector dot matrix dot vector multiplication.

void zsupralu_conj_vector_dot_matrix_dot_vector_ (zsupralu_sparse_type **self, doublecomplex *vector1, doublecomplex *vector2, doublecomplex *res, int *info)
 Conjugate(vector) dot matrix dot vector multiplication.

void zsupralu_colperm_ (zsupralu_sparse_type **self, int *permc_spec, int *info)
 Compute the column permutation vector.

void zsupralu_lu_ (zsupralu_sparse_type **self, int *info)
 Perform the LU decomposition.

void zsupralu_determinant_ (zsupralu_sparse_type **self, doublecomplex *res_mantissa, int *res_exponent, int *info)
 Compute the determinant.

void zsupralu_solve_ (zsupralu_sparse_type **self, doublecomplex *b, int *info)
 Solve linear system.


Detailed Description

Supralu doublecomplex API.

This file contains a list of procedures that create, manipulate, perform standard sparse matrix operations on dense vectors, and destroy a Supralu object. The Superlu object's members are structs defined in the zsp_defs.h header. The API has been written to allow easy interfacing to other languages, notably Fortran and Python. The address of the object (**self) can be passed as an opaque handle to other languages.

In all routines below, the call is successful if the returned value of the last argument info is zero. The first argument is always the pointer to the object (**self).

Author:
A. Pletzer

Function Documentation

void zsupralu_colperm_ zsupralu_sparse_type **  self,
int *  permc_spec,
int *  info
 

Compute the column permutation vector.

Invoke this prior to performing the LU decomposition when solving linear systems. For details on Column permutation specification, see http://crd.lbl.gov/~xiaoye/SuperLU/.

Parameters:
self object instance (inout).
permc_spec Column permutation specification: 0=natural ordering, 1=A'*A, 2=A'+A, 3=minimum degree for unsymmetric matrices (in).
info Error flag, info=0 means ok (out).
See also:
zsupralu_colperm_

void zsupralu_conj_vector_dot_matrix_ zsupralu_sparse_type **  self,
doublecomplex *  vector,
doublecomplex *  res,
int *  info
 

Conjugate(vector) dot matrix multiplication.

The array sizes must match the rank of the sparse matrix object.

Parameters:
self object instance (inout).
vector Array (in).
res Result of conjugate(vector) dot matrix (out).
info Error flag, info=0 means ok (out).

void zsupralu_conj_vector_dot_matrix_dot_vector_ zsupralu_sparse_type **  self,
doublecomplex *  vector1,
doublecomplex *  vector2,
doublecomplex *  res,
int *  info
 

Conjugate(vector) dot matrix dot vector multiplication.

The array sizes must match the rank of the sparse matrix object.

Parameters:
self object instance (inout).
vector1 Array (in).
vector2 Array (in).
res Result of conjugate(vector1) dot matrix dot vector2 multiplication (out).
info Error flag, info=0 means ok (out).

void zsupralu_del_ zsupralu_sparse_type **  self,
int *  info
 

Destructor.

Clean-up and reclaim the memory. Every call to zsupralu_new_ should be matched by a call to zsupralu_del_.

Parameters:
self object instance (inout).
info Error flag, info=0 means ok (out).
See also:
zsupralu_new_

void zsupralu_determinant_ zsupralu_sparse_type **  self,
doublecomplex *  res_mantissa,
int *  res_exponent,
int *  info
 

Compute the determinant.

Invoke this after calling zsupralu_lu_.

Parameters:
self object instance (inout).
res_mantissa Determinant is res_mantissa * 2^res_exponent (out).
res_exponent Exponent, see above (out).
info Error flag, info=0 means ok (out).
See also:
zsupralu_lu_

void zsupralu_lu_ zsupralu_sparse_type **  self,
int *  info
 

Perform the LU decomposition.

Invoke this after zsupralu_colperm_ but before calling zsupralu_solve_ or zsupralu_determinant_.

Parameters:
self object instance (inout).
info Error flag, info=0 means ok (out).
See also:
zsupralu_colperm_, zsupralu_solve_, zsupralu_determinant_

void zsupralu_matrix_dot_vector_ zsupralu_sparse_type **  self,
doublecomplex *  vector,
doublecomplex *  res,
int *  info
 

Matrix dot vector multiplication.

The array sizes must match the rank of the sparse matrix object.

Parameters:
self object instance (inout).
vector Array (in)
res Result of matrix dot vector multiplication (out).
info Error flag, info=0 means ok (out).

void zsupralu_new_ zsupralu_sparse_type **  self,
doublecomplex *  vals,
int *  row_ind,
int *  col_ptr,
int *  nnz,
int *  n,
int *  info
 

Constructor.

Takes a sparse matrix in compressed column storage format (vals[], row_ind[], col_ptr[]) and return a pointer to a fresh object self. In the compressed column storage, the matrix elements are filled into the array vals by running down the columns. Each time a column is started, the index of vals is added to jcol_ptr. By convention, the n-th+1 value of jcol_ptr is the number of non-zero values nnz.

Parameters:
self object instance (inout).
vals Matrix elements (array size nnz: in).
row_ind Row indices of the matrix elements (array size nnz: in).
col_ptr The vals indices that start a new column (array size n+1: in).
nnz No. of non-zero elements (in).
n Rank of square matrix (in).
info Error flag, info=0 means ok (out).
See also:
zsupralu_del_

void zsupralu_solve_ zsupralu_sparse_type **  self,
doublecomplex *  b,
int *  info
 

Solve linear system.

Invoke this after calling zsupralu_lu_.

Parameters:
self object instance (inout).
b Right-hand side vector of same rank as sparse matrix object, will be overwritten by the solution vector (inout)
info Error flag, info=0 means ok (out).
See also:
zsupralu_lu_

void zsupralu_vector_dot_matrix_ zsupralu_sparse_type **  self,
doublecomplex *  vector,
doublecomplex *  res,
int *  info
 

Vector dot matrix multiplication.

The array sizes must match the rank of the sparse matrix object.

Parameters:
self object instance (inout).
vector Array (in).
res Result of vector dot matrix (out)
info Error flag, info=0 means ok (out).

void zsupralu_vector_dot_matrix_dot_vector_ zsupralu_sparse_type **  self,
doublecomplex *  vector1,
doublecomplex *  vector2,
doublecomplex *  res,
int *  info
 

Vector dot matrix dot vector multiplication.

The array sizes must match the rank of the sparse matrix object.

Parameters:
self object instance (inout).
vector1 Array (in).
vector2 Array (in).
res Result of vector1 dot matrix dot vector2 multiplication (out).
info Error flag, info=0 means ok (out).


Generated on Tue Jul 26 15:21:34 2005 for Supralu by doxygen 1.3.5