m_SparseMatrix Module



Interfaces

public interface init

  • private subroutine init_(sMat, nrows, ncols, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(out) :: sMat
    integer, intent(in) :: nrows
    integer, intent(in) :: ncols
    integer, intent(in), optional :: lsize

public interface vecinit

  • private subroutine vecinit_(sMat)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat

public interface clean

  • private subroutine clean_(sMat, stat)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    integer, intent(out), optional :: stat

public interface lsize

  • private function lsize_(sMat)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat

    Return Value integer

public interface indexIA

  • private function indexIA_(sMat, item, perrWith, dieWith)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    character(len=*), intent(in) :: item
    character(len=*), intent(in), optional :: perrWith
    character(len=*), intent(in), optional :: dieWith

    Return Value integer

public interface indexRA

  • private function indexRA_(sMat, item, perrWith, dieWith)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    character(len=*), intent(in) :: item
    character(len=*), intent(in), optional :: perrWith
    character(len=*), intent(in), optional :: dieWith

    Return Value integer

public interface nRows

  • private function nRows_(sMat)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat

    Return Value integer

public interface nCols

  • private function nCols_(sMat)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat

    Return Value integer

public interface exportGlobalRowIndices

  • private subroutine exportGlobalRowIndices_(sMat, GlobalRows, length)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, dimension(:), pointer :: GlobalRows
    integer, intent(out), optional :: length

public interface exportGlobalColumnIndices

  • private subroutine exportGlobalColumnIndices_(sMat, GlobalColumns, length)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, dimension(:), pointer :: GlobalColumns
    integer, intent(out), optional :: length

public interface exportLocalRowIndices

  • private subroutine exportLocalRowIndices_(sMat, LocalRows, length)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, dimension(:), pointer :: LocalRows
    integer, intent(out), optional :: length

public interface exportLocalColumnIndices

  • private subroutine exportLocalColumnIndices_(sMat, LocalColumns, length)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, dimension(:), pointer :: LocalColumns
    integer, intent(out), optional :: length

public interface exportMatrixElements

  • private subroutine exportMatrixelementsSP_(sMat, MatrixElements, length)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    real(kind=SP), dimension(:), pointer :: MatrixElements
    integer, intent(out), optional :: length
  • private subroutine exportMatrixelementsDP_(sMat, MatrixElements, length)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    real(kind=DP), dimension(:), pointer :: MatrixElements
    integer, intent(out), optional :: length

public interface importGlobalRowIndices

  • private subroutine importGlobalRowIndices_(sMat, inVect, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    integer, dimension(:), pointer :: inVect
    integer, intent(in) :: lsize

public interface importGlobalColumnIndices

  • private subroutine importGlobalColumnIndices_(sMat, inVect, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    integer, dimension(:), pointer :: inVect
    integer, intent(in) :: lsize

public interface importLocalRowIndices

  • private subroutine importLocalRowIndices_(sMat, inVect, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    integer, dimension(:), pointer :: inVect
    integer, intent(in) :: lsize

public interface importLocalColumnIndices

  • private subroutine importLocalColumnIndices_(sMat, inVect, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    integer, dimension(:), pointer :: inVect
    integer, intent(in) :: lsize

public interface importMatrixElements

  • private subroutine importMatrixElementsSP_(sMat, inVect, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    real(kind=SP), dimension(:), pointer :: inVect
    integer, intent(in) :: lsize
  • private subroutine importMatrixElementsDP_(sMat, inVect, lsize)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    real(kind=DP), dimension(:), pointer :: inVect
    integer, intent(in) :: lsize

public interface Copy

  • private subroutine Copy_(sMat, sMatCopy)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    type(SparseMatrix), intent(out) :: sMatCopy

public interface GlobalNumElements

  • private function GlobalNumElements_(sMat, comm)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(in), optional :: comm

    Return Value integer

public interface ComputeSparsity

  • private subroutine ComputeSparsitySP_(sMat, sparsity, comm)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    real(kind=SP), intent(out) :: sparsity
    integer, intent(in), optional :: comm
  • private subroutine ComputeSparsityDP_(sMat, sparsity, comm)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    real(kind=DP), intent(out) :: sparsity
    integer, intent(in), optional :: comm

public interface local_row_range

  • private subroutine local_row_range_(sMat, start_row, end_row)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(out) :: start_row
    integer, intent(out) :: end_row

public interface global_row_range

  • private subroutine global_row_range_(sMat, comm, start_row, end_row)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(in) :: comm
    integer, intent(out) :: start_row
    integer, intent(out) :: end_row

public interface local_col_range

  • private subroutine local_col_range_(sMat, start_col, end_col)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(out) :: start_col
    integer, intent(out) :: end_col

public interface global_col_range

  • private subroutine global_col_range_(sMat, comm, start_col, end_col)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(in) :: comm
    integer, intent(out) :: start_col
    integer, intent(out) :: end_col

public interface CheckBounds

  • private subroutine CheckBounds_(sMat, ierror)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(out) :: ierror

public interface row_sum

  • private subroutine row_sumSP_(sMat, num_rows, sums, comm)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(out) :: num_rows
    real(kind=SP), dimension(:), pointer :: sums
    integer, intent(in) :: comm
  • private subroutine row_sumDP_(sMat, num_rows, sums, comm)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(out) :: num_rows
    real(kind=DP), dimension(:), pointer :: sums
    integer, intent(in) :: comm

public interface row_sum_check

  • private subroutine row_sum_checkSP_(sMat, comm, num_valid, valid_sums, abs_tol, valid)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(in) :: comm
    integer, intent(in) :: num_valid
    real(kind=SP), intent(in) :: valid_sums(num_valid)
    real(kind=SP), intent(in) :: abs_tol
    logical, intent(out) :: valid
  • private subroutine row_sum_checkDP_(sMat, comm, num_valid, valid_sums, abs_tol, valid)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    integer, intent(in) :: comm
    integer, intent(in) :: num_valid
    real(kind=DP), intent(in) :: valid_sums(num_valid)
    real(kind=DP), intent(in) :: abs_tol
    logical, intent(out) :: valid

public interface Sort

  • private subroutine Sort_(sMat, key_list, perm, descend)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(in) :: sMat
    type(List), intent(in) :: key_list
    integer, dimension(:), pointer :: perm
    logical, intent(in), optional, dimension(:) :: descend

public interface Permute

  • private subroutine Permute_(sMat, perm)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    integer, dimension(:), pointer :: perm

public interface SortPermute

  • private subroutine SortPermute_(sMat, key_list, descend)

    Arguments

    Type IntentOptional Attributes Name
    type(SparseMatrix), intent(inout) :: sMat
    type(List), intent(in) :: key_list
    logical, intent(in), optional, dimension(:) :: descend

Derived Types

type, public ::  SparseMatrix

Components

Type Visibility Attributes Name Initial
integer, public :: nrows
integer, public :: ncols
type(AttrVect), public :: data
logical, public :: vecinit
integer, public, dimension(:), pointer :: row_s
integer, public, dimension(:), pointer :: row_e
integer, public, dimension(:,:), pointer :: tcol
real(kind=FP), public, dimension(:,:), pointer :: twgt
integer, public :: row_max
integer, public :: row_min
integer, public :: tbl_end