escript
Revision_
|
#include <SparseMatrix.h>
Public Member Functions | |
SparseMatrix (SparseMatrixType type, Pattern_ptr pattern, dim_t rowBlockSize, dim_t colBlockSize, bool patternIsUnrolled) | |
~SparseMatrix () | |
void | setValues (double value) |
void | copyFromMainDiagonal (double *out) const |
void | copyToMainDiagonal (const double *in) |
void | copyBlockFromMainDiagonal (double *out) const |
void | copyBlockToMainDiagonal (const double *in) |
void | applyBlockMatrix (double *block_diag, index_t *pivot, double *x, const double *b) const |
void | invMain (double *inv_diag, index_t *pivot) const |
SparseMatrix_ptr | unroll (SparseMatrixType type) const |
SparseMatrix_ptr | getSubmatrix (dim_t n_row_sub, dim_t n_col_sub, const index_t *row_list, const index_t *new_col_index) const |
SparseMatrix_ptr | getBlock (int blockid) const |
SparseMatrix_ptr | getTranspose () const |
void | saveHB_CSC (const char *filename) const |
void | saveMM (const char *filename) const |
index_t * | borrowMainDiagonalPointer () const |
index_t * | borrowColoringPointer () const |
dim_t | getNumColors () const |
dim_t | maxDeg () const |
dim_t | getTotalNumRows () const |
dim_t | getTotalNumCols () const |
dim_t | getNumRows () const |
dim_t | getNumCols () const |
double | getSize () const |
double | getSparsity () const |
void | nullifyRowsAndCols_CSC_BLK1 (const double *mask_row, const double *mask_col, double main_diagonal_value) |
void | nullifyRowsAndCols_CSR_BLK1 (const double *mask_row, const double *mask_col, double main_diagonal_value) |
void | nullifyRowsAndCols_CSC (const double *mask_row, const double *mask_col, double main_diagonal_value) |
void | nullifyRowsAndCols_CSR (const double *mask_row, const double *mask_col, double main_diagonal_value) |
void | nullifyRows_CSR_BLK1 (const double *mask_row, double main_diagonal_value) |
void | nullifyRows_CSR (const double *mask_row, double main_diagonal_value) |
void | maxAbsRow_CSR_OFFSET0 (double *array) const |
void | addAbsRow_CSR_OFFSET0 (double *array) const |
void | addRow_CSR_OFFSET0 (double *array) const |
void | applyDiagonal_CSR_OFFSET0 (const double *left, const double *right) |
Static Public Member Functions | |
static SparseMatrix_ptr | loadMM_toCSR (const char *filename) |
Public Attributes | |
SparseMatrixType | type |
dim_t | row_block_size |
dim_t | col_block_size |
dim_t | block_size |
dim_t | numRows |
dim_t | numCols |
Pattern_ptr | pattern |
dim_t | len |
double * | val |
this is used for classical CSR or CSC More... | |
index_t | solver_package |
package controlling the solver pointer More... | |
void * | solver_p |
pointer to data needed by a solver More... | |
paso::SparseMatrix::SparseMatrix | ( | SparseMatrixType | type, |
Pattern_ptr | pattern, | ||
dim_t | rowBlockSize, | ||
dim_t | colBlockSize, | ||
bool | patternIsUnrolled | ||
) |
paso::SparseMatrix::~SparseMatrix | ( | ) |
void paso::SparseMatrix::addAbsRow_CSR_OFFSET0 | ( | double * | array | ) | const |
void paso::SparseMatrix::addRow_CSR_OFFSET0 | ( | double * | array | ) | const |
void paso::SparseMatrix::applyBlockMatrix | ( | double * | block_diag, |
index_t * | pivot, | ||
double * | x, | ||
const double * | b | ||
) | const |
void paso::SparseMatrix::applyDiagonal_CSR_OFFSET0 | ( | const double * | left, |
const double * | right | ||
) |
|
inline |
References numRows, and row_block_size.
|
inline |
References pattern.
void paso::SparseMatrix::copyBlockFromMainDiagonal | ( | double * | out | ) | const |
void paso::SparseMatrix::copyBlockToMainDiagonal | ( | const double * | in | ) |
void paso::SparseMatrix::copyFromMainDiagonal | ( | double * | out | ) | const |
void paso::SparseMatrix::copyToMainDiagonal | ( | const double * | in | ) |
SparseMatrix_ptr paso::SparseMatrix::getBlock | ( | int | blockid | ) | const |
|
inline |
References col_block_size, and numCols.
|
inline |
|
inline |
References getSize(), getTotalNumCols(), and getTotalNumRows().
|
inline |
Referenced by getNumRows().
|
inline |
SparseMatrix_ptr paso::SparseMatrix::getSubmatrix | ( | dim_t | n_row_sub, |
dim_t | n_col_sub, | ||
const index_t * | row_list, | ||
const index_t * | new_col_index | ||
) | const |
References block_size, paso::BlockOps_Cpy_N(), pattern, and val.
|
inline |
References len.
Referenced by getNumRows().
|
inline |
References numCols.
Referenced by getNumRows().
SparseMatrix_ptr paso::SparseMatrix::getTranspose | ( | ) | const |
void paso::SparseMatrix::invMain | ( | double * | inv_diag, |
index_t * | pivot | ||
) | const |
|
static |
void paso::SparseMatrix::maxAbsRow_CSR_OFFSET0 | ( | double * | array | ) | const |
|
inline |
References numRows.
void paso::SparseMatrix::nullifyRows_CSR | ( | const double * | mask_row, |
double | main_diagonal_value | ||
) |
void paso::SparseMatrix::nullifyRows_CSR_BLK1 | ( | const double * | mask_row, |
double | main_diagonal_value | ||
) |
void paso::SparseMatrix::nullifyRowsAndCols_CSC | ( | const double * | mask_row, |
const double * | mask_col, | ||
double | main_diagonal_value | ||
) |
References block_size, row_block_size, and val.
void paso::SparseMatrix::nullifyRowsAndCols_CSC_BLK1 | ( | const double * | mask_row, |
const double * | mask_col, | ||
double | main_diagonal_value | ||
) |
void paso::SparseMatrix::nullifyRowsAndCols_CSR | ( | const double * | mask_row, |
const double * | mask_col, | ||
double | main_diagonal_value | ||
) |
References block_size, row_block_size, and val.
void paso::SparseMatrix::nullifyRowsAndCols_CSR_BLK1 | ( | const double * | mask_row, |
const double * | mask_col, | ||
double | main_diagonal_value | ||
) |
void paso::SparseMatrix::saveHB_CSC | ( | const char * | filename | ) | const |
void paso::SparseMatrix::saveMM | ( | const char * | filename | ) | const |
void paso::SparseMatrix::setValues | ( | double | value | ) |
SparseMatrix_ptr paso::SparseMatrix::unroll | ( | SparseMatrixType | type | ) | const |
References paso::util::comparIndex().
dim_t paso::SparseMatrix::block_size |
Referenced by getSubmatrix(), nullifyRowsAndCols_CSC(), and nullifyRowsAndCols_CSR().
dim_t paso::SparseMatrix::col_block_size |
Referenced by getNumColors().
dim_t paso::SparseMatrix::len |
Referenced by getTotalNumCols().
dim_t paso::SparseMatrix::numCols |
Referenced by getNumColors(), and getTotalNumRows().
dim_t paso::SparseMatrix::numRows |
Referenced by borrowColoringPointer(), and maxDeg().
Pattern_ptr paso::SparseMatrix::pattern |
Referenced by borrowMainDiagonalPointer(), and getSubmatrix().
dim_t paso::SparseMatrix::row_block_size |
Referenced by borrowColoringPointer(), nullifyRowsAndCols_CSC(), and nullifyRowsAndCols_CSR().
void* paso::SparseMatrix::solver_p |
pointer to data needed by a solver
index_t paso::SparseMatrix::solver_package |
package controlling the solver pointer
SparseMatrixType paso::SparseMatrix::type |
double* paso::SparseMatrix::val |
this is used for classical CSR or CSC
Referenced by getSubmatrix(), nullifyRowsAndCols_CSC(), and nullifyRowsAndCols_CSR().