|
|
◆ csr_ilu0()
| void csr_ilu0 |
( |
int |
n, |
|
|
const double |
val[], |
|
|
const int |
rowptr[], |
|
|
const int |
colind[], |
|
|
int |
base, |
|
|
double |
val2[], |
|
|
double |
d[], |
|
|
int * |
info |
|
) |
| |
Incomplete LU decomposition without fill-in (ILU0) (CSR)
- Purpose
- This routine computes the incomplete LU decomposition, without fill-in, of the coefficient matrix A of the sparse linear equations. where R is the difference from the complete LU decomposition. Assuming that R is small, the following preconditioner matrix is obtained by solving the equations using this decomposition. This routine outputs the lower triangular matrix L and the upper triangular matrix U in val2[]. And the diagonal elements of U are copied to d[]. val2[] and d[] will be used by csr_ilu_solve().
- Parameters
-
| [in] | n | Dimension of matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | val[] | Array val[lval] (lval >= nnz) (nnz is number of non-zero elements of matrix A)
Values of non-zero elements of matrix A. |
| [in] | rowptr[] | Array rowptr[lrowptr] (lrowptr >= n + 1)
Row pointers of matrix A. |
| [in] | colind[] | Array colind[lcolind] (lcolind >= nnz)
Column indices of matrix A. |
| [in] | base | Indexing of rowptr[] and colind[].
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1. |
| [out] | val2[] | Array val2[lval2] (lval2 >= nnz)
Values of non-zero elements of the lower triangular matrix L and the upper triangular matrix U. (nnz is same with the number of non-zero elements of A. The values are stored in the same location of lower and upper triangular elements of A.) |
| [out] | d[] | Array d[ld] (ld >= n)
The diagonal elements of upper triangular matrix U. |
| [out] | info | = 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= j > 0: Matrix is singular (j-th diagonal element is zero). |
|