coo_sparsity_pattern_procedures Submodule

Contains module procedures associated with the basic coo sparsity pattern class


Uses


Module Functions

pure module function hasIndices(this, row, column) result(found)

Return true if all elements with indices (row,column) are present in sparsity pattern

Arguments

Type IntentOptional Attributes Name
class(COOSparsityPattern), intent(in) :: this
integer(kind=ik), intent(in), dimension(:) :: row

Row indices

integer(kind=ik), intent(in), dimension(:) :: column

Column indices

Return Value logical

pure module function findLocationOfIndices(this, row, column) result(indices)

Return indices with given values of (row,column)

Arguments

Type IntentOptional Attributes Name
class(COOSparsityPattern), intent(in) :: this
integer(kind=ik), intent(in), dimension(:) :: row

Row index

integer(kind=ik), intent(in), dimension(:) :: column

Column index

Return Value integer(kind=ik), allocatable, dimension(:)


Module Subroutines

pure module subroutine initCooSparsityPattern(this, numRows, numCols, bufferSize, rowOffset)

COO sparsity pattern initialization routine

Arguments

Type IntentOptional Attributes Name
class(COOSparsityPattern), intent(inout) :: this
integer(kind=ik), intent(in) :: numRows

Matrix number of rows

integer(kind=ik), intent(in) :: numCols

Matrix number of columns

integer(kind=ik), intent(in), optional :: bufferSize

Preallocated rolling buffer size

integer(kind=ik), intent(in), optional :: rowOffset

Row offset for distributed arrays

pure module subroutine addEntry(this, row, column)

Add entry if not already present

Arguments

Type IntentOptional Attributes Name
class(COOSparsityPattern), intent(inout) :: this
integer(kind=ik), intent(in) :: row

Row index

integer(kind=ik), intent(in) :: column

Column Index

pure module subroutine addPattern(this, pattern, rowOffset, colOffset)

Add entries from existing pattern that are not already present

Arguments

Type IntentOptional Attributes Name
class(COOSparsityPattern), intent(inout) :: this
type(COOSparsityPattern), intent(in) :: pattern

Pattern to add to this pattern

integer(kind=ik), intent(in), dimension(:) :: rowOffset

Array by which to offset pattern row indices before adding

integer(kind=ik), intent(in), dimension(:) :: colOffset

Array by which to offset pattern column indices before adding