GetDiagonal
This routine returns the diagonal entries of sparse MATRIX.
Interface
- 📝 Interface 1
- Interface 2
- ◉ Close
INTERFACE
MODULE SUBROUTINE GetDiagonal(obj, diag, idiag, offset)
TYPE(CSRMatrix_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: diag(:)
INTEGER(I4B), ALLOCATABLE, INTENT(INOUT) :: idiag(:)
INTEGER(I4B), OPTIONAL, INTENT(IN) :: offset
END SUBROUTINE GetDiagonal
END INTERFACE
- This subroutine returns the diagonal entries of sparse matrix.
offset
containing the offset of the wanted diagonal the diagonal extracted is the one corresponding to the entriesa(i,j)
withj-i = ioff
. Thusioff = 0
means the main diagonaldiag
is an array of reals of length nrow containing the wanted diagonal. diag contains the diagonal (a(i,j),j-i = ioff
) as defined above.idiag
is an array of integer of lengthlen
, containing the poisitions in the original arraysa
andja
of the diagonal elements collected indiag
. A zero entry inidiag(i)
means that there was no entry found in row i belonging to the diagonal.
INTERFACE
MODULE SUBROUTINE GetDiagonal(obj, diag, offset)
TYPE(CSRMatrix_), INTENT(INOUT) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: diag(:)
INTEGER(I4B), OPTIONAL, INTENT(IN) :: offset
END SUBROUTINE GetDiagonal
END INTERFACE
This routine is like interface-1, but in this routine we do not get idiag