CSRMatrix
CSRMatrix
is defined to handle Compressed Sparse Row matrix.
Currently following modules are defined.
CSRMatrix_ConstructorMethods
CSRMatrix_IOMethods
CSRMatrix_SparsityMethods
CSRMatrix_SetMethods
CSRMatrix_AddMethods
CSRMatrix_SetRowMethods
CSRMatrix_SetColMethods
CSRMatrix_SetBlockRowMethods
CSRMatrix_SetBlockColMethods
CSRMatrix_GetMethods
CSRMatrix_GetRowMethods
CSRMatrix_GetColMethods
CSRMatrix_GetSubMatrixMethods
CSRMatrix_GetBlockRowMethods
CSRMatrix_GetBlockColMethods
CSRMatrix_UnaryMethods
CSRMatrix_ILUMethods
CSRMatrix_LUSolveMethods
CSRMatrix_MatVecMethods
CSRMatrix_MatmulMethods
CSRMatrix_ReorderingMethods
CSRMatrix_DiagonalScalingMethods
CSRMatrix_MatrixMarketIO
CSRMatrix_Superlu
CSRMatrix_SpectralMethods
CSRMatrix_SchurMethods
CSRMatrix_DBCMethods
CSRMatrix_LinSolveMethods
Constructor methodsβ
subroutine | description | status |
---|---|---|
Initiate | Initiate instance of CSRMatrix | done |
Shape | Returns shape of the matrix | done |
Size | Returns size of matrix | done |
TotalDimension | Returns the total dimension | done |
GetNNZ | Returns total number of non zeros | done |
Allocate | Allocate memory for sparse matrix | done |
Deallocate | Deallocate the data stored in CSRMatrix | done |
CSRMatrixAPLSB | Add two csr matrix | done |
CSRMatrixAPLSBSorted | Add two csr matrix | done |
Unary Methodsβ
Following subroutines are planned to include in this module
subroutine | description | status |
---|---|---|
Scal | Scale the sparse matrix | done |
Convert | Convert CSR matrix to dense matrix and vice-versa | done |
ColumnSORT | sorts the elements in increasing order of columns | done |
RemoveDuplicates | clean up the CSR format matrix, remove duplicate entry, etc | done |
Clean | This routine performs tasks related to the cleaning of sparse matrix. | done |
Copy | copy of a matrix into another matrix (both stored csr) | done |
Get | returns a(i,j) for any (i,j) from a CSR-stored matrix. | done |
DropEntry | This routine removes any elements whose absolute value is small from an input matrix A and puts the resulting matrix in B. | done |
GetTranspose | in-place transposition routine | done |
GetDiagonal | extracts a specified diagonal from a matrix. | done |
GetLowerTriangle | extracts lower triangular part | done |
GetUpperTriangle | extracts upper triangular part | done |
GetSym | Get the symmetric matrix from CSR matrix | done |
PermuteRow | permutes the rows of a matrix (B = P A) | done |
PermuteColumn | permutes the columns of a matrix (B = A Q) | done |
Permute | permutes both the rows and columns of a matrix (B = P A Q ) | done |
DVPERM | permutes a real vector (in-place) | todo |
IVPERM | permutes an integer vector (in-place) | todo |
FILTER | filters elements from a matrix according to their magnitude | todo |
LEVELS | gets the level scheduling structure for lower triangular matrices | todo |
AMASK | extracts C = A mask M | todo |
RETMX | returns the max absolute value in each row of the matrix | todo |
DIAPOS | returns the positions of the diagonal elements in A. | todo |
EXTBDG | extracts the main diagonal blocks of a matrix. | todo |
GETBWD | returns the bandwidth information on a matrix. | todo |
BLKFND | finds the block-size of a matrix. | todo |
BLKCHK | checks whether a given integer is the block size of A. | todo |
INFDIA | obtains information on the diagonals of A. | todo |
AMUBDG | gets number of nonzeros in each row of A*B (as well as NNZ) | todo |
APLBDG | gets number of nonzeros in each row of A+B (as well as NNZ) | todo |
RNRMS | computes the norms of the rows of A | todo |
CNRMS | computes the norms of the columns of A | todo |
ROSCAL | scales the rows of a matrix by their norms. | todo |
COSCAL | scales the columns of a matrix by their norms. | todo |
ADDBLK | Adds a matrix B into a block of A. | todo |
GET1UP | Collects the first elements of each row of the upper triangular portion of the matrix | todo |
XTROWS | extracts given rows from a matrix in CSR format. | todo |
CSRKVSTR | Finds block row partitioning of matrix in CSR format | todo |
CSRKVSTC | Finds block column partitioning of matrix in CSR format | todo |
KVSTMERGE | Merges block partitionings, for conformal row/col pattern | todo |
All methodsβ
ποΈ Structure
CSRMatrix data type defines a sparse matrix in the CSR format. EASIFEM uses Sparsekit library for handling CSRMatrix.
ποΈ AMatVec
This routine performs matrix vector multiplication for csrmatrix.
ποΈ Add
Add values to CSRMatrix.
ποΈ Allocate
This subroutine creates memory space for the sparse matrix.
ποΈ AtMatVec
This routine performs transpose matrix vector multiplication for csrmatrix ($A^T\ cdot x$).
ποΈ Clean
This routine performs tasks related to the cleaning of sparse matrix.
ποΈ ColumnSort
This routine sorts the elements of a matrix (stored in Compressed Sparse Row Format) in increasing order of their column indices within each row. It uses insertion sort algorithm.
ποΈ Convert
Convert() is a generic method, which can be used to change the format of matrix.
ποΈ Copy
Copy sparse matrix into each other
ποΈ Deallocate
To Deallocate the data stored inside an instance of CSRMatrix_ use Deallocate() method.
ποΈ DiagonalScaling
DiagonalScaling performs diagonal scaling on CSRMatrix.
ποΈ Display
Display method displays the contents of CSRMatrix_ object.
ποΈ DropEntry
This routine removes any element whose absolute value is small from an input matrix A and puts the resulting matrix in B.
ποΈ Get
This function returns a single value from the sparse MATRIX.
ποΈ GetBlockColumn
Calling example:
ποΈ GetBlockRow
This routine returns a row of a block csrmatrix.
ποΈ GetColumn
This routine returns the column of a csrmatrix.
ποΈ GetDiagonal
This routine returns the diagonal entries of sparse MATRIX.
ποΈ GetILUD
This routine computes the ILU factorization with standard threshold dropping
ποΈ GetILUDP
This routine computes ILUDP preconditioner: incomplete LU factorization with standard droppoing strategy.
ποΈ GetILUK
This routine returns the ILU WITH LEVEL OF FILL-IN OF K (ILU(k))
ποΈ GetILUT
This routine builds the ILUT precondition.
ποΈ GetILUTP
Incomplete LU factorization with dual truncation mechanism
ποΈ GetLowerTriangle
This subroutine returns the lower part of the sparse matrix.
ποΈ GetNNZ
Returns the number of non-zero entries in csrmatrix.
ποΈ GetRow
This routine returns a row of CSR matrix.
ποΈ GetSym
Returns the symmetric form of a sparse matrix.
ποΈ GetTranspose
In-place transposition routine. This subroutine transposes a matrix stored in compressed sparse row format.
ποΈ GetUpperTriangle
This subroutine returns the Upper part of the sparse matrix.
ποΈ Harwell-Boeing
The Harwell-Boeing format is the most popular mechanism for text-file exchange of sparse matrix data.
ποΈ Import
Import() can be used for importing sparse matrix data from a file.
ποΈ Initiate
Initiate() method constructs an instance of CSRMatrix_.
ποΈ LUSolve
This routine solves the system LU x = y, given an LU decomposition of a matrix stored in (ALU, JLU, JU) modified sparse row format (MSR).
ποΈ LUTSolve
This routine solves the system (LU)^T x = y, given an LU decomposition of a matrix stored in (ALU, JLU, JU) modified sparse row format (MSR). This ALU, JLU, JU are created by calling ILUT methods described above
ποΈ MSR
Sparse matrix in Modified Sparse Row storage format.
ποΈ MatVec
This routine performs matrix vector multiplication between CSRMatrix and dense vector.
ποΈ Matrix Market Coordinate
Reference
ποΈ Permute
Permute the columns of sparse matrix
ποΈ PermuteColumn
Permute the columns of sparse matrix
ποΈ PermuteRow
Permute the rows of sparse matrix
ποΈ RemoveDuplicates
Remove the duplicate entries from the sparse matrix
ποΈ SPY
Use SPY() method to generate a PDF/PNG/SVG file for visualizing the sparsity patterns in CSRMatrix_.
ποΈ Set
SET() method helps us in setting the values of CSRMatrix_.
ποΈ SetBlockColumn
This routine sets the columns of block CSR matrix.
ποΈ SetBlockRow
This method sets the row of block CSR matrix.
ποΈ SetColumn
This method sets the column of the CSRMatrix.
ποΈ SetRow
Calling example:
ποΈ SetSparsity
SetSparsity() method sets the sparsity pattern in the sparse matrix.
ποΈ Shape
Returns the shape of csrmatrix.
ποΈ Size
This function returns the size of sparse matrix.
ποΈ SuperluLinSolve
Interface
ποΈ SymLargestEigenval
This routine computes the largest eigenvalue of a csrmatrix.
ποΈ SymSmallestEigenval
This routine computes the smallest eigenvalue of CSRMatrix.