oomph_superlu_dist_3.0/supermatrix.h
Go to the documentation of this file.
1 
5 #ifndef __SUPERLU_SUPERMATRIX /* allow multiple inclusions */
6 #define __SUPERLU_SUPERMATRIX
7 
8 
9 /********************************************
10  * The matrix types are defined as follows. *
11  ********************************************/
12 typedef enum {
13  SLU_NC, /* column-wise, no supernode */
14  SLU_NCP, /* column-wise, column-permuted, no supernode
15  (The consecutive columns of nonzeros, after permutation,
16  may not be stored contiguously.) */
17  SLU_NR, /* row-wize, no supernode */
18  SLU_SC, /* column-wise, supernode */
19  SLU_SCP, /* supernode, column-wise, permuted */
20  SLU_SR, /* row-wise, supernode */
21  SLU_DN, /* Fortran style column-wise storage for dense matrix */
22  SLU_NR_loc /* distributed compressed row format */
24 
25 typedef enum {
26  SLU_S, /* single */
27  SLU_D, /* double */
28  SLU_C, /* single complex */
29  SLU_Z /* double complex */
31 
32 typedef enum {
33  SLU_GE, /* general */
34  SLU_TRLU, /* lower triangular, unit diagonal */
35  SLU_TRUU, /* upper triangular, unit diagonal */
36  SLU_TRL, /* lower triangular */
37  SLU_TRU, /* upper triangular */
38  SLU_SYL, /* symmetric, store lower half */
39  SLU_SYU, /* symmetric, store upper half */
40  SLU_HEL, /* Hermitian, store lower half */
41  SLU_HEU /* Hermitian, store upper half */
43 
44 typedef struct {
45  Stype_t Stype; /* Storage type: interprets the storage structure
46  pointed to by *Store. */
47  Dtype_t Dtype; /* Data type. */
48  Mtype_t Mtype; /* Matrix type: describes the mathematical property of
49  the matrix. */
50  int_t nrow; /* number of rows */
51  int_t ncol; /* number of columns */
52  void *Store; /* pointer to the actual storage of the matrix */
53 } SuperMatrix;
54 
55 /***********************************************
56  * The storage schemes are defined as follows. *
57  ***********************************************/
58 
59 /* Stype == SLU_NC (Also known as Harwell-Boeing sparse matrix format) */
60 typedef struct {
61  int_t nnz; /* number of nonzeros in the matrix */
62  void *nzval; /* pointer to array of nonzero values, packed by column */
63  int_t *rowind; /* pointer to array of row indices of the nonzeros */
64  int_t *colptr; /* pointer to array of beginning of columns in nzval[]
65  and rowind[] */
66  /* Note:
67  Zero-based indexing is used;
68  colptr[] has ncol+1 entries, the last one pointing
69  beyond the last column, so that colptr[ncol] = nnz. */
70 } NCformat;
71 
72 /* Stype == SLU_NR */
73 typedef struct {
74  int_t nnz; /* number of nonzeros in the matrix */
75  void *nzval; /* pointer to array of nonzero values, packed by raw */
76  int_t *colind; /* pointer to array of columns indices of the nonzeros */
77  int_t *rowptr; /* pointer to array of beginning of rows in nzval[]
78  and colind[] */
79  /* Note:
80  Zero-based indexing is used;
81  rowptr[] has nrow+1 entries, the last one pointing
82  beyond the last row, so that rowptr[nrow] = nnz. */
83 } NRformat;
84 
85 /* Stype == SLU_SC */
86 typedef struct {
87  int_t nnz; /* number of nonzeros in the matrix */
88  int_t nsuper; /* number of supernodes, minus 1 */
89  void *nzval; /* pointer to array of nonzero values, packed by column */
90  int_t *nzval_colptr;/* pointer to array of beginning of columns in nzval[] */
91  int_t *rowind; /* pointer to array of compressed row indices of
92  rectangular supernodes */
93  int_t *rowind_colptr;/* pointer to array of beginning of columns in rowind[] */
94  int_t *col_to_sup; /* col_to_sup[j] is the supernode number to which column
95  j belongs; mapping from column to supernode number. */
96  int_t *sup_to_col; /* sup_to_col[s] points to the start of the s-th
97  supernode; mapping from supernode number to column.
98  e.g.: col_to_sup: 0 1 2 2 3 3 3 4 4 4 4 4 4 (ncol=12)
99  sup_to_col: 0 1 2 4 7 12 (nsuper=4) */
100  /* Note:
101  Zero-based indexing is used;
102  nzval_colptr[], rowind_colptr[], col_to_sup and
103  sup_to_col[] have ncol+1 entries, the last one
104  pointing beyond the last column.
105  For col_to_sup[], only the first ncol entries are
106  defined. For sup_to_col[], only the first nsuper+2
107  entries are defined. */
108 } SCformat;
109 
110 /* Stype == SLU_SCP */
111 typedef struct {
112  int_t nnz; /* number of nonzeros in the matrix */
113  int_t nsuper; /* number of supernodes */
114  void *nzval; /* pointer to array of nonzero values, packed by column */
115  int_t *nzval_colbeg;/* nzval_colbeg[j] points to beginning of column j
116  in nzval[] */
117  int_t *nzval_colend;/* nzval_colend[j] points to one past the last element
118  of column j in nzval[] */
119  int_t *rowind; /* pointer to array of compressed row indices of
120  rectangular supernodes */
121  int_t *rowind_colbeg;/* rowind_colbeg[j] points to beginning of column j
122  in rowind[] */
123  int_t *rowind_colend;/* rowind_colend[j] points to one past the last element
124  of column j in rowind[] */
125  int_t *col_to_sup; /* col_to_sup[j] is the supernode number to which column
126  j belongs; mapping from column to supernode. */
127  int_t *sup_to_colbeg; /* sup_to_colbeg[s] points to the start of the s-th
128  supernode; mapping from supernode to column.*/
129  int_t *sup_to_colend; /* sup_to_colend[s] points to one past the end of the
130  s-th supernode; mapping from supernode number to
131  column.
132  e.g.: col_to_sup: 0 1 2 2 3 3 3 4 4 4 4 4 4 (ncol=12)
133  sup_to_colbeg: 0 1 2 4 7 (nsuper=4)
134  sup_to_colend: 1 2 4 7 12 */
135  /* Note:
136  Zero-based indexing is used;
137  nzval_colptr[], rowind_colptr[], col_to_sup and
138  sup_to_col[] have ncol+1 entries, the last one
139  pointing beyond the last column. */
140 } SCPformat;
141 
142 /* Stype == SLU_NCP */
143 typedef struct {
144  int_t nnz; /* number of nonzeros in the matrix */
145  void *nzval; /* pointer to array of nonzero values, packed by column */
146  int_t *rowind;/* pointer to array of row indices of the nonzeros */
147  /* Note: nzval[]/rowind[] always have the same length */
148  int_t *colbeg;/* colbeg[j] points to the beginning of column j in nzval[]
149  and rowind[] */
150  int_t *colend;/* colend[j] points to one past the last element of column
151  j in nzval[] and rowind[] */
152  /* Note:
153  Zero-based indexing is used;
154  The consecutive columns of the nonzeros may not be
155  contiguous in storage, because the matrix has been
156  postmultiplied by a column permutation matrix. */
157 } NCPformat;
158 
159 /* Stype == SLU_DN */
160 typedef struct {
161  int_t lda; /* leading dimension */
162  void *nzval; /* array of size lda*ncol to represent a dense matrix */
163 } DNformat;
164 
165 /* Stype == SLU_NR_loc (Distributed Compressed Row Format) */
166 typedef struct {
167  int_t nnz_loc; /* number of nonzeros in the local submatrix */
168  int_t m_loc; /* number of rows local to this processor */
169  int_t fst_row; /* global index of the first row */
170  void *nzval; /* pointer to array of nonzero values, packed by row */
171  int_t *rowptr; /* pointer to array of beginning of rows in nzval[]
172  and colind[] */
173  int_t *colind; /* pointer to array of column indices of the nonzeros */
174  /* Note:
175  Zero-based indexing is used;
176  rowptr[] has n_loc + 1 entries, the last one pointing
177  beyond the last row, so that rowptr[n_loc] = nnz_loc.*/
178 } NRformat_loc;
179 
180 
181 #endif /* __SUPERLU_SUPERMATRIX */
const char const int const RealScalar const RealScalar const int * lda
Definition: level2_cplx_impl.h:20
Mtype_t
Definition: oomph_superlu_4.3/supermatrix.h:31
Dtype_t
Definition: oomph_superlu_4.3/supermatrix.h:24
Stype_t
Definition: oomph_superlu_4.3/supermatrix.h:11
Mtype_t
Definition: oomph_superlu_dist_3.0/supermatrix.h:32
@ SLU_TRUU
Definition: oomph_superlu_dist_3.0/supermatrix.h:35
@ SLU_SYU
Definition: oomph_superlu_dist_3.0/supermatrix.h:39
@ SLU_TRL
Definition: oomph_superlu_dist_3.0/supermatrix.h:36
@ SLU_SYL
Definition: oomph_superlu_dist_3.0/supermatrix.h:38
@ SLU_TRU
Definition: oomph_superlu_dist_3.0/supermatrix.h:37
@ SLU_HEU
Definition: oomph_superlu_dist_3.0/supermatrix.h:41
@ SLU_HEL
Definition: oomph_superlu_dist_3.0/supermatrix.h:40
@ SLU_GE
Definition: oomph_superlu_dist_3.0/supermatrix.h:33
@ SLU_TRLU
Definition: oomph_superlu_dist_3.0/supermatrix.h:34
Dtype_t
Definition: oomph_superlu_dist_3.0/supermatrix.h:25
@ SLU_S
Definition: oomph_superlu_dist_3.0/supermatrix.h:26
@ SLU_Z
Definition: oomph_superlu_dist_3.0/supermatrix.h:29
@ SLU_C
Definition: oomph_superlu_dist_3.0/supermatrix.h:28
@ SLU_D
Definition: oomph_superlu_dist_3.0/supermatrix.h:27
Stype_t
Definition: oomph_superlu_dist_3.0/supermatrix.h:12
@ SLU_NC
Definition: oomph_superlu_dist_3.0/supermatrix.h:13
@ SLU_NCP
Definition: oomph_superlu_dist_3.0/supermatrix.h:14
@ SLU_SCP
Definition: oomph_superlu_dist_3.0/supermatrix.h:19
@ SLU_SC
Definition: oomph_superlu_dist_3.0/supermatrix.h:18
@ SLU_SR
Definition: oomph_superlu_dist_3.0/supermatrix.h:20
@ SLU_DN
Definition: oomph_superlu_dist_3.0/supermatrix.h:21
@ SLU_NR
Definition: oomph_superlu_dist_3.0/supermatrix.h:17
@ SLU_NR_loc
Definition: oomph_superlu_dist_3.0/supermatrix.h:22
int int_t
Definition: slu_cdefs.h:78
Definition: oomph_superlu_4.3/supermatrix.h:159
Definition: oomph_superlu_4.3/supermatrix.h:142
Definition: oomph_superlu_4.3/supermatrix.h:59
Definition: oomph_superlu_4.3/supermatrix.h:165
Definition: oomph_superlu_4.3/supermatrix.h:72
Definition: oomph_superlu_4.3/supermatrix.h:110
Definition: oomph_superlu_4.3/supermatrix.h:85
Definition: oomph_superlu_4.3/supermatrix.h:43