📁 CSRSparsity
📄️ CSRSparsityPointer
📄️ Structure
CSRSparsity is data type for handling CSRMatrix in EASIFEM.
📄️ CSRSparsity constructor
EASIFEM also has CSRSparsity and CSRSparsityPointer functions. They can be used to create an instance of [[CSRSparsity]]. The later returns the pointer to the newly created instance of [[CSRSparsity]] object. The usage are given below.
📄️ CSRSparsity example 1
This example shows how to create an instance of [[CSRSparsity_]]. Following methods are tested:
📄️ CSRSparsity example 2
This example shows how to create an instance of [[CSRSparsity_]] for block matrix storage. Following methods are tested:
📄️ CSRSparsity example 3
This example shows how to set sparsity pattern in an instance of [[CSRSparsity]]. The storage pattern is FMTDOF, and matrix is block matrix. Following methods are tested.
📄️ CSRSparsity example 4
This example shows how to set sparsity pattern in an instance of [[CSRSparsity]]. The storage pattern is FMTNODES, and matrix is not a block matrix.
📄️ CSRSparsity example 5
This example shows how to set sparsity pattern in an instance of [[CSRSparsity]]. The storage pattern is FMTDOF, and matrix is not a block matrix.
📄️ CSRSparsity example 6
This example shows how to set sparsity pattern by using IA and JA.
📄️ CSRSparsity example 7
This example shows how to set sparsity pattern by using a graph matrix. A graph matrix is a two-d array of 1 and 0. if graph( i, j ) is 1 then row-i and row-j are connected.
📄️ CSRSparsity example 8
This example shows how to set sparsity pattern by using a graph matrix. A graph matrix is a two-d array of true and false. if graph( i, j ) is true then row-i and row-j are connected.
📄️ CSRSparsity example 9
This example shows how to create an instance of [[CSRSparsity_]] for block matrix storage. Following methods are tested:
📄️ Deallocate
You can destruct an instance of [[CSRSparsity_]] by calling #CSRSparsity/Deallocate method as shown below.
📄️ Display
This method prints the contents of CSRSparsity_ object on the screen or to the file.
📄️ GetDiagonal
This subroutine returns the diagonal entries of sparse matrix.
📄️ GetNNZ
This function returns the number of non zeros.
📄️ GetSym
Make sparse matrix symmetric.
📄️ Initiate
Interface
📄️ SetSparsity
This subroutine sets the sparsity pattern in the CSRSparsity object.
📄️ Shape
This function Returns the shape of the array.
📄️ Size
This function returns the size of the sparse matrix.