Main Page | File List | File Members

dsupralu_type.h File Reference

Supralu double API. More...

#include "dsp_defs.h"

Go to the source code of this file.

Classes

struct  dsupralu_sparse_type

Functions

void dsupralu_new_ (dsupralu_sparse_type **self, double *vals, int *row_ind, int *col_ptr, int *nnz, int *n, int *info)
 Constructor.

void dsupralu_del_ (dsupralu_sparse_type **self, int *info)
 Destructor.

void dsupralu_vector_dot_matrix_ (dsupralu_sparse_type **self, double *vector, double *res, int *info)
 Vector dot matrix multiplication.

void dsupralu_matrix_dot_vector_ (dsupralu_sparse_type **self, double *vector, double *res, int *info)
 Matrix dot vector multiplication.

void dsupralu_vector_dot_matrix_dot_vector_ (dsupralu_sparse_type **self, double *vector1, double *vector2, double *res, int *info)
 Vector dot matrix dot vector multiplication.

void dsupralu_colperm_ (dsupralu_sparse_type **self, int *permc_spec, int *info)
 Compute the column permutation vector.

void dsupralu_lu_ (dsupralu_sparse_type **self, int *info)
 Perform the LU decomposition.

void dsupralu_determinant_ (dsupralu_sparse_type **self, double *res_mantissa, int *res_exponent, int *info)
 Compute the determinant.

void dsupralu_solve_ (dsupralu_sparse_type **self, double *b, int *info)
 Solve linear system.


Detailed Description

Supralu double 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 dsp_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 a pointer to the object (**self).

Author:
A. Pletzer

Function Documentation

void dsupralu_colperm_ dsupralu_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:
dsupralu_colperm_

void dsupralu_del_ dsupralu_sparse_type **  self,
int *  info
 

Destructor.

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

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

void dsupralu_determinant_ dsupralu_sparse_type **  self,
double *  res_mantissa,
int *  res_exponent,
int *  info
 

Compute the determinant.

Invoke this after calling dsupralu_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:
dsupralu_lu_

void dsupralu_lu_ dsupralu_sparse_type **  self,
int *  info
 

Perform the LU decomposition.

Invoke this after dsupralu_colperm_ but before calling dsupralu_solve_ or dsupralu_determinant_.

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

void dsupralu_matrix_dot_vector_ dsupralu_sparse_type **  self,
double *  vector,
double *  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 dsupralu_new_ dsupralu_sparse_type **  self,
double *  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:
dsupralu_del_

void dsupralu_solve_ dsupralu_sparse_type **  self,
double *  b,
int *  info
 

Solve linear system.

Invoke this after calling dsupralu_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:
dsupralu_lu_

void dsupralu_vector_dot_matrix_ dsupralu_sparse_type **  self,
double *  vector,
double *  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 dsupralu_vector_dot_matrix_dot_vector_ dsupralu_sparse_type **  self,
double *  vector1,
double *  vector2,
double *  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