base/modules/psb_c_base_mat_mod.f90
 base/modules/psb_c_csc_mat_mod.f90
 base/modules/psb_c_csr_mat_mod.f90
 base/modules/psb_d_base_mat_mod.f90
 base/modules/psb_d_csc_mat_mod.f90
 base/modules/psb_d_csr_mat_mod.f90
 base/modules/psb_s_base_mat_mod.f90
 base/modules/psb_s_csc_mat_mod.f90
 base/modules/psb_s_csr_mat_mod.f90
 base/modules/psb_z_base_mat_mod.f90
 base/modules/psb_z_csc_mat_mod.f90
 base/modules/psb_z_csr_mat_mod.f90

Finished doxygen additions for these ones.
psblas3-type-indexed
Salvatore Filippone 13 years ago
parent 4da9bf0d01
commit 5d0b00240b

@ -212,7 +212,7 @@ module psb_c_base_mat_mod
! == ================= ! == =================
!> Function csput: !> Function csput:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Insert coefficients. !! \brief Insert coefficients.
!! !!
!! !!
@ -261,7 +261,7 @@ module psb_c_base_mat_mod
! !
! !
!> Function csgetrow: !> Function csgetrow:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getrow is the basic method by which the other (getblk, clip) can !! getrow is the basic method by which the other (getblk, clip) can
@ -309,7 +309,7 @@ module psb_c_base_mat_mod
! !
!> Function csgetblk: !> Function csgetblk:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getblk is very similar to getrow, except that the output !! getblk is very similar to getrow, except that the output
@ -347,7 +347,7 @@ module psb_c_base_mat_mod
! !
! !
!> Function csclip: !> Function csclip:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Get a submatrix. !! \brief Get a submatrix.
!! !!
!! csclip is practically identical to getblk. !! csclip is practically identical to getblk.
@ -381,7 +381,7 @@ module psb_c_base_mat_mod
! !
!> Function get_diag: !> Function get_diag:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Extract the diagonal of A. !! \brief Extract the diagonal of A.
!! !!
!! D(i) = A(i:i), i=1:min(nrows,ncols) !! D(i) = A(i:i), i=1:min(nrows,ncols)
@ -400,7 +400,7 @@ module psb_c_base_mat_mod
! !
!> Function mold: !> Function mold:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Allocate a class(psb_c_base_sparse_mat) with the !! \brief Allocate a class(psb_c_base_sparse_mat) with the
!! same dynamic type as the input. !! same dynamic type as the input.
!! This is equivalent to allocate( mold= ) and is provided !! This is equivalent to allocate( mold= ) and is provided
@ -420,7 +420,7 @@ module psb_c_base_mat_mod
! !
!> Function cp_to_coo: !> Function cp_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Copy and convert to psb_c_coo_sparse_mat !! \brief Copy and convert to psb_c_coo_sparse_mat
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -437,7 +437,7 @@ module psb_c_base_mat_mod
! !
!> Function cp_from_coo: !> Function cp_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Copy and convert from psb_c_coo_sparse_mat !! \brief Copy and convert from psb_c_coo_sparse_mat
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -454,7 +454,7 @@ module psb_c_base_mat_mod
! !
!> Function cp_to_fmt: !> Function cp_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Copy and convert to a class(psb_c_base_sparse_mat) !! \brief Copy and convert to a class(psb_c_base_sparse_mat)
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp). !! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp).
@ -472,7 +472,7 @@ module psb_c_base_mat_mod
! !
!> Function cp_from_fmt: !> Function cp_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Copy and convert from a class(psb_c_base_sparse_mat) !! \brief Copy and convert from a class(psb_c_base_sparse_mat)
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp). !! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp).
@ -490,7 +490,7 @@ module psb_c_base_mat_mod
! !
!> Function mv_to_coo: !> Function mv_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Convert to psb_c_coo_sparse_mat, freeing the source. !! \brief Convert to psb_c_coo_sparse_mat, freeing the source.
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -507,7 +507,7 @@ module psb_c_base_mat_mod
! !
!> Function mv_from_coo: !> Function mv_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Convert from psb_c_coo_sparse_mat, freeing the source. !! \brief Convert from psb_c_coo_sparse_mat, freeing the source.
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -524,7 +524,7 @@ module psb_c_base_mat_mod
! !
!> Function mv_to_fmt: !> Function mv_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Convert to a class(psb_c_base_sparse_mat), freeing the source. !! \brief Convert to a class(psb_c_base_sparse_mat), freeing the source.
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp). !! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp).
@ -542,7 +542,7 @@ module psb_c_base_mat_mod
! !
!> Function mv_from_fmt: !> Function mv_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Convert from a class(psb_c_base_sparse_mat), freeing the source. !! \brief Convert from a class(psb_c_base_sparse_mat), freeing the source.
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp). !! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp).
@ -560,7 +560,7 @@ module psb_c_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version !! Copyout version
@ -576,7 +576,7 @@ module psb_c_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version. !! Copyout version.
@ -592,7 +592,7 @@ module psb_c_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -606,7 +606,7 @@ module psb_c_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -620,7 +620,7 @@ module psb_c_base_mat_mod
! !
!> Function csmm: !> Function csmm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Product by a dense rank 2 array. !! \brief Product by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -648,7 +648,7 @@ module psb_c_base_mat_mod
end interface end interface
!> Function csmv: !> Function csmv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Product by a dense rank 1 array. !! \brief Product by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -676,7 +676,7 @@ module psb_c_base_mat_mod
end interface end interface
!> Function vect_mv: !> Function vect_mv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Product by an encapsulated array type(psb_c_vect_type) !! \brief Product by an encapsulated array type(psb_c_vect_type)
!! !!
!! Compute !! Compute
@ -713,7 +713,7 @@ module psb_c_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -745,7 +745,7 @@ module psb_c_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -779,7 +779,7 @@ module psb_c_base_mat_mod
! !
!> Function inner_vect_cssv: !> Function inner_vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_c_vect_type) !! an encapsulated array type(psb_c_vect_type)
!! !!
@ -810,7 +810,7 @@ module psb_c_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -843,7 +843,7 @@ module psb_c_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -876,7 +876,7 @@ module psb_c_base_mat_mod
! !
!> Function vect_cssv: !> Function vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_c_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_c_vect_type) !! an encapsulated array type(psb_c_vect_type)
!! !!
@ -909,8 +909,12 @@ module psb_c_base_mat_mod
end interface end interface
! !
! Scale a matrix by a scalar or by a vector. !> Function base_scals:
! Should we handle scale on the columns?? !! \memberof psb_c_base_sparse_mat
!! \brief Scale a matrix by a single scalar value
!!
!! \param d Scaling factor
!! \param info return code
! !
interface interface
subroutine psb_c_base_scals(d,a,info) subroutine psb_c_base_scals(d,a,info)
@ -921,6 +925,15 @@ module psb_c_base_mat_mod
end subroutine psb_c_base_scals end subroutine psb_c_base_scals
end interface end interface
!
!> Function base_scal:
!! \memberof psb_c_base_sparse_mat
!! \brief Scale a matrix by a vector
!!
!! \param d(:) Scaling vector
!! \param info return code
!! \param side [L] Scale on the Left (rows) or on the Right (columns)
!
interface interface
subroutine psb_c_base_scal(d,a,info,side) subroutine psb_c_base_scal(d,a,info,side)
import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_
@ -932,7 +945,10 @@ module psb_c_base_mat_mod
end interface end interface
! !
! Maximum coefficient absolute value norm !> Function base_maxval:
!! \memberof psb_c_base_sparse_mat
!! \brief Maximum absolute value of all coefficients;
!!
! !
interface interface
function psb_c_base_maxval(a) result(res) function psb_c_base_maxval(a) result(res)
@ -943,7 +959,11 @@ module psb_c_base_mat_mod
end interface end interface
! !
! Operator infinity norm !
!> Function base_csnmi:
!! \memberof psb_c_base_sparse_mat
!! \brief Operator infinity norm
!!
! !
interface interface
function psb_c_base_csnmi(a) result(res) function psb_c_base_csnmi(a) result(res)
@ -954,7 +974,11 @@ module psb_c_base_mat_mod
end interface end interface
! !
! Operator 1-norm !
!> Function base_csnmi:
!! \memberof psb_c_base_sparse_mat
!! \brief Operator 1-norm
!!
! !
interface interface
function psb_c_base_csnm1(a) result(res) function psb_c_base_csnm1(a) result(res)
@ -965,8 +989,12 @@ module psb_c_base_mat_mod
end interface end interface
! !
! Compute sums along the rows, either !
! natural or absolute value !> Function base_rowsum:
!! \memberof psb_c_base_sparse_mat
!! \brief Sum along the rows
!! \param d(:) The output row sums
!!
! !
interface interface
subroutine psb_c_base_rowsum(d,a) subroutine psb_c_base_rowsum(d,a)
@ -976,6 +1004,12 @@ module psb_c_base_mat_mod
end subroutine psb_c_base_rowsum end subroutine psb_c_base_rowsum
end interface end interface
!
!> Function base_arwsum:
!! \memberof psb_c_base_sparse_mat
!! \brief Absolute value sum along the rows
!! \param d(:) The output row sums
!!
interface interface
subroutine psb_c_base_arwsum(d,a) subroutine psb_c_base_arwsum(d,a)
import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_
@ -985,8 +1019,12 @@ module psb_c_base_mat_mod
end interface end interface
! !
! Compute sums along the columns, either !
! natural or absolute value !> Function base_colsum:
!! \memberof psb_c_base_sparse_mat
!! \brief Sum along the columns
!! \param d(:) The output col sums
!!
! !
interface interface
subroutine psb_c_base_colsum(d,a) subroutine psb_c_base_colsum(d,a)
@ -996,6 +1034,12 @@ module psb_c_base_mat_mod
end subroutine psb_c_base_colsum end subroutine psb_c_base_colsum
end interface end interface
!
!> Function base_aclsum:
!! \memberof psb_c_base_sparse_mat
!! \brief Absolute value sum along the columns
!! \param d(:) The output col sums
!!
interface interface
subroutine psb_c_base_aclsum(d,a) subroutine psb_c_base_aclsum(d,a)
import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_
@ -1013,7 +1057,7 @@ module psb_c_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reallocate_nz !! \see psb_base_mat_mod::psb_base_reallocate_nz
! !
interface interface
@ -1026,7 +1070,7 @@ module psb_c_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reinit !! \see psb_base_mat_mod::psb_base_reinit
! !
interface interface
@ -1038,7 +1082,7 @@ module psb_c_base_mat_mod
end interface end interface
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_trim !! \see psb_base_mat_mod::psb_base_trim
! !
interface interface
@ -1050,7 +1094,7 @@ module psb_c_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_allocate_mnnz !! \see psb_base_mat_mod::psb_base_allocate_mnnz
! !
interface interface
@ -1064,7 +1108,7 @@ module psb_c_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mold !! \see psb_c_base_mat_mod::psb_c_base_mold
! !
interface interface
@ -1079,7 +1123,7 @@ module psb_c_base_mat_mod
! !
!> Function print. !> Function print.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief Print the matrix to file in MatrixMarket format
!! !!
!! \param iout The unit to write to !! \param iout The unit to write to
@ -1103,15 +1147,11 @@ module psb_c_base_mat_mod
! !
!> Function print. !> Function get_nz_row.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief How many nonzeros in a row?
!! !!
!! \param iout The unit to write to !! \param idx The row to search.
!! \param iv [none] Renumbering for both rows and columns
!! \param head [none] Descriptive header for the file
!! \param ivr [none] Row renumbering
!! \param ivc [none] Col renumbering
!! !!
! !
interface interface
@ -1151,7 +1191,7 @@ module psb_c_base_mat_mod
! !
!> Function fix_coo !> Function fix_coo
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \brief Make sure the entries are sorted and duplicates are handled. !! \brief Make sure the entries are sorted and duplicates are handled.
!! \param info return code !! \param info return code
!! \param idir [0] Sort in: row major order (0) or col major order (1) !! \param idir [0] Sort in: row major order (0) or col major order (1)
@ -1167,7 +1207,7 @@ module psb_c_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo !! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo
interface interface
subroutine psb_c_cp_coo_to_coo(a,b,info) subroutine psb_c_cp_coo_to_coo(a,b,info)
@ -1179,7 +1219,7 @@ module psb_c_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo !! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo
interface interface
subroutine psb_c_cp_coo_from_coo(a,b,info) subroutine psb_c_cp_coo_from_coo(a,b,info)
@ -1190,6 +1230,10 @@ module psb_c_base_mat_mod
end subroutine psb_c_cp_coo_from_coo end subroutine psb_c_cp_coo_from_coo
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo
!!
interface interface
subroutine psb_c_cp_coo_to_fmt(a,b,info) subroutine psb_c_cp_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat
@ -1199,6 +1243,10 @@ module psb_c_base_mat_mod
end subroutine psb_c_cp_coo_to_fmt end subroutine psb_c_cp_coo_to_fmt
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt
!!
interface interface
subroutine psb_c_cp_coo_from_fmt(a,b,info) subroutine psb_c_cp_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat
@ -1208,6 +1256,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_cp_coo_from_fmt end subroutine psb_c_cp_coo_from_fmt
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo
interface interface
subroutine psb_c_mv_coo_to_coo(a,b,info) subroutine psb_c_mv_coo_to_coo(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat
@ -1217,6 +1268,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_mv_coo_to_coo end subroutine psb_c_mv_coo_to_coo
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo
interface interface
subroutine psb_c_mv_coo_from_coo(a,b,info) subroutine psb_c_mv_coo_from_coo(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat
@ -1226,6 +1280,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_mv_coo_from_coo end subroutine psb_c_mv_coo_from_coo
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt
interface interface
subroutine psb_c_mv_coo_to_fmt(a,b,info) subroutine psb_c_mv_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat
@ -1235,6 +1292,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_mv_coo_to_fmt end subroutine psb_c_mv_coo_to_fmt
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt
interface interface
subroutine psb_c_mv_coo_from_fmt(a,b,info) subroutine psb_c_mv_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat
@ -1261,6 +1321,22 @@ module psb_c_base_mat_mod
end interface end interface
!> Function csput
!! \memberof psb_c_coo_sparse_mat
!! \brief Add coefficients into the matrix.
!!
!! \param nz Number of entries to be added
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Values
!! \param imin Minimum row index to accept
!! \param imax Maximum row index to accept
!! \param jmin Minimum col index to accept
!! \param jmax Maximum col index to accept
!! \param info return code
!! \param gtl [none] Renumbering for rows/columns
!!
!
interface interface
subroutine psb_c_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_c_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1273,6 +1349,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_csput end subroutine psb_c_coo_csput
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_c_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_c_coo_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1289,6 +1368,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_csgetptn end subroutine psb_c_coo_csgetptn
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetrow
interface interface
subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1306,6 +1388,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_csgetrow end subroutine psb_c_coo_csgetrow
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssv
interface interface
subroutine psb_c_coo_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_c_coo_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1315,6 +1400,11 @@ module psb_c_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_c_coo_cssv end subroutine psb_c_coo_cssv
end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssm
interface
subroutine psb_c_coo_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_c_coo_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
class(psb_c_coo_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(in) :: a
@ -1325,6 +1415,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_cssm end subroutine psb_c_coo_cssm
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface interface
subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1334,6 +1427,12 @@ module psb_c_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_c_coo_csmv end subroutine psb_c_coo_csmv
end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmm
interface
subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_c_coo_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
class(psb_c_coo_sparse_mat), intent(in) :: a class(psb_c_coo_sparse_mat), intent(in) :: a
@ -1345,6 +1444,9 @@ module psb_c_base_mat_mod
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_maxval
interface interface
function psb_c_coo_maxval(a) result(res) function psb_c_coo_maxval(a) result(res)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1353,6 +1455,9 @@ module psb_c_base_mat_mod
end function psb_c_coo_maxval end function psb_c_coo_maxval
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csnmi
interface interface
function psb_c_coo_csnmi(a) result(res) function psb_c_coo_csnmi(a) result(res)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1361,6 +1466,9 @@ module psb_c_base_mat_mod
end function psb_c_coo_csnmi end function psb_c_coo_csnmi
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csnm1
interface interface
function psb_c_coo_csnm1(a) result(res) function psb_c_coo_csnm1(a) result(res)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1369,6 +1477,9 @@ module psb_c_base_mat_mod
end function psb_c_coo_csnm1 end function psb_c_coo_csnm1
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_rowsum
interface interface
subroutine psb_c_coo_rowsum(d,a) subroutine psb_c_coo_rowsum(d,a)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1376,7 +1487,9 @@ module psb_c_base_mat_mod
complex(psb_spk_), intent(out) :: d(:) complex(psb_spk_), intent(out) :: d(:)
end subroutine psb_c_coo_rowsum end subroutine psb_c_coo_rowsum
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_arwsum
interface interface
subroutine psb_c_coo_arwsum(d,a) subroutine psb_c_coo_arwsum(d,a)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1385,6 +1498,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_arwsum end subroutine psb_c_coo_arwsum
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_colsum
interface interface
subroutine psb_c_coo_colsum(d,a) subroutine psb_c_coo_colsum(d,a)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1393,6 +1509,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_colsum end subroutine psb_c_coo_colsum
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_aclsum
interface interface
subroutine psb_c_coo_aclsum(d,a) subroutine psb_c_coo_aclsum(d,a)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1401,6 +1520,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_aclsum end subroutine psb_c_coo_aclsum
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_get_diag
interface interface
subroutine psb_c_coo_get_diag(a,d,info) subroutine psb_c_coo_get_diag(a,d,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1410,6 +1532,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_get_diag end subroutine psb_c_coo_get_diag
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_scal
interface interface
subroutine psb_c_coo_scal(d,a,info,side) subroutine psb_c_coo_scal(d,a,info,side)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
@ -1420,6 +1545,9 @@ module psb_c_base_mat_mod
end subroutine psb_c_coo_scal end subroutine psb_c_coo_scal
end interface end interface
!>
!! \memberof psb_c_coo_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_scals
interface interface
subroutine psb_c_coo_scals(d,a,info) subroutine psb_c_coo_scals(d,a,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_

@ -45,9 +45,18 @@ module psb_c_csc_mat_mod
use psb_c_base_mat_mod use psb_c_base_mat_mod
!> \namespace psb_base_mod \class psb_c_csc_sparse_mat
!! \extends psb_c_base_mat_mod::psb_c_base_sparse_mat
!!
!! psb_c_csc_sparse_mat type and the related methods.
!!
type, extends(psb_c_base_sparse_mat) :: psb_c_csc_sparse_mat type, extends(psb_c_base_sparse_mat) :: psb_c_csc_sparse_mat
integer(psb_ipk_), allocatable :: icp(:), ia(:) !> Pointers to beginning of cols in IA and VAL.
integer(psb_ipk_), allocatable :: icp(:)
!> Row indices.
integer(psb_ipk_), allocatable :: ia(:)
!> Coefficient values.
complex(psb_spk_), allocatable :: val(:) complex(psb_spk_), allocatable :: val(:)
contains contains
@ -98,6 +107,8 @@ module psb_c_csc_mat_mod
private :: c_csc_get_nzeros, c_csc_free, c_csc_get_fmt, & private :: c_csc_get_nzeros, c_csc_free, c_csc_get_fmt, &
& c_csc_get_size, c_csc_sizeof, c_csc_get_nz_col & c_csc_get_size, c_csc_sizeof, c_csc_get_nz_col
!> \memberof psb_c_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_c_csc_reallocate_nz(nz,a) subroutine psb_c_csc_reallocate_nz(nz,a)
import :: psb_ipk_, psb_c_csc_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat
@ -106,6 +117,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_reallocate_nz end subroutine psb_c_csc_reallocate_nz
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_c_csc_reinit(a,clear) subroutine psb_c_csc_reinit(a,clear)
import :: psb_ipk_, psb_c_csc_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat
@ -114,6 +127,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_reinit end subroutine psb_c_csc_reinit
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_c_csc_trim(a) subroutine psb_c_csc_trim(a)
import :: psb_ipk_, psb_c_csc_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat
@ -121,6 +136,20 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_trim end subroutine psb_c_csc_trim
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface
subroutine psb_c_csc_mold(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_
class(psb_c_csc_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_c_csc_mold
end interface
!> \memberof psb_c_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_c_csc_allocate_mnnz(m,n,a,nz) subroutine psb_c_csc_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_c_csc_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat
@ -130,15 +159,9 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_allocate_mnnz end subroutine psb_c_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_c_csc_mold(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_
class(psb_c_csc_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_c_csc_mold
end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_print
interface interface
subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc) subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_c_csc_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat
@ -150,6 +173,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_print end subroutine psb_c_csc_print
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo
interface interface
subroutine psb_c_cp_csc_to_coo(a,b,info) subroutine psb_c_cp_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_csc_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_csc_sparse_mat
@ -159,6 +184,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_cp_csc_to_coo end subroutine psb_c_cp_csc_to_coo
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo
interface interface
subroutine psb_c_cp_csc_from_coo(a,b,info) subroutine psb_c_cp_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat
@ -168,6 +195,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_cp_csc_from_coo end subroutine psb_c_cp_csc_from_coo
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_to_fmt
interface interface
subroutine psb_c_cp_csc_to_fmt(a,b,info) subroutine psb_c_cp_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat
@ -177,6 +206,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_cp_csc_to_fmt end subroutine psb_c_cp_csc_to_fmt
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt
interface interface
subroutine psb_c_cp_csc_from_fmt(a,b,info) subroutine psb_c_cp_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat
@ -186,6 +217,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_cp_csc_from_fmt end subroutine psb_c_cp_csc_from_fmt
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo
interface interface
subroutine psb_c_mv_csc_to_coo(a,b,info) subroutine psb_c_mv_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat
@ -195,6 +228,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_mv_csc_to_coo end subroutine psb_c_mv_csc_to_coo
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo
interface interface
subroutine psb_c_mv_csc_from_coo(a,b,info) subroutine psb_c_mv_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_coo_sparse_mat
@ -204,6 +239,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_mv_csc_from_coo end subroutine psb_c_mv_csc_from_coo
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt
interface interface
subroutine psb_c_mv_csc_to_fmt(a,b,info) subroutine psb_c_mv_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat
@ -213,6 +250,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_mv_csc_to_fmt end subroutine psb_c_mv_csc_to_fmt
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt
interface interface
subroutine psb_c_mv_csc_from_fmt(a,b,info) subroutine psb_c_mv_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csc_sparse_mat, psb_c_base_sparse_mat
@ -222,6 +261,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_mv_csc_from_fmt end subroutine psb_c_mv_csc_from_fmt
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from
interface interface
subroutine psb_c_csc_cp_from(a,b) subroutine psb_c_csc_cp_from(a,b)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -230,6 +271,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_cp_from end subroutine psb_c_csc_cp_from
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from
interface interface
subroutine psb_c_csc_mv_from(a,b) subroutine psb_c_csc_mv_from(a,b)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -239,6 +282,8 @@ module psb_c_csc_mat_mod
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csput
interface interface
subroutine psb_c_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_c_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -251,6 +296,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_csput end subroutine psb_c_csc_csput
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_c_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_c_csc_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +314,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_csgetptn end subroutine psb_c_csc_csgetptn
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetrow
interface interface
subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +333,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_csgetrow end subroutine psb_c_csc_csgetrow
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetblk
interface interface
subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,& subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +350,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_csgetblk end subroutine psb_c_csc_csgetblk
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssv
interface interface
subroutine psb_c_csc_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_c_csc_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -308,6 +361,10 @@ module psb_c_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_c_csc_cssv end subroutine psb_c_csc_cssv
end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssm
interface
subroutine psb_c_csc_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_c_csc_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_csc_sparse_mat), intent(in) :: a
@ -318,6 +375,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_cssm end subroutine psb_c_csc_cssm
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface interface
subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -327,6 +386,11 @@ module psb_c_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_c_csc_csmv end subroutine psb_c_csc_csmv
end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmm
interface
subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_c_csc_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
class(psb_c_csc_sparse_mat), intent(in) :: a class(psb_c_csc_sparse_mat), intent(in) :: a
@ -338,6 +402,8 @@ module psb_c_csc_mat_mod
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_maxval
interface interface
function psb_c_csc_maxval(a) result(res) function psb_c_csc_maxval(a) result(res)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -346,6 +412,8 @@ module psb_c_csc_mat_mod
end function psb_c_csc_maxval end function psb_c_csc_maxval
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csnmi
interface interface
function psb_c_csc_csnmi(a) result(res) function psb_c_csc_csnmi(a) result(res)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -354,6 +422,8 @@ module psb_c_csc_mat_mod
end function psb_c_csc_csnmi end function psb_c_csc_csnmi
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csnm1
interface interface
function psb_c_csc_csnm1(a) result(res) function psb_c_csc_csnm1(a) result(res)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -362,6 +432,8 @@ module psb_c_csc_mat_mod
end function psb_c_csc_csnm1 end function psb_c_csc_csnm1
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_rowsum
interface interface
subroutine psb_c_csc_rowsum(d,a) subroutine psb_c_csc_rowsum(d,a)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -370,6 +442,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_rowsum end subroutine psb_c_csc_rowsum
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_arwsum
interface interface
subroutine psb_c_csc_arwsum(d,a) subroutine psb_c_csc_arwsum(d,a)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -378,6 +452,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_arwsum end subroutine psb_c_csc_arwsum
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_colsum
interface interface
subroutine psb_c_csc_colsum(d,a) subroutine psb_c_csc_colsum(d,a)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -386,6 +462,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_colsum end subroutine psb_c_csc_colsum
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_aclsum
interface interface
subroutine psb_c_csc_aclsum(d,a) subroutine psb_c_csc_aclsum(d,a)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -394,6 +472,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_aclsum end subroutine psb_c_csc_aclsum
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_get_diag
interface interface
subroutine psb_c_csc_get_diag(a,d,info) subroutine psb_c_csc_get_diag(a,d,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -403,6 +483,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_get_diag end subroutine psb_c_csc_get_diag
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_scal
interface interface
subroutine psb_c_csc_scal(d,a,info,side) subroutine psb_c_csc_scal(d,a,info,side)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
@ -413,6 +495,8 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_scal end subroutine psb_c_csc_scal
end interface end interface
!> \memberof psb_c_csc_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_scals
interface interface
subroutine psb_c_csc_scals(d,a,info) subroutine psb_c_csc_scals(d,a,info)
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_

@ -45,9 +45,19 @@ module psb_c_csr_mat_mod
use psb_c_base_mat_mod use psb_c_base_mat_mod
!> \namespace psb_base_mod \class psb_c_csr_sparse_mat
!! \extends psb_c_base_mat_mod::psb_c_base_sparse_mat
!!
!! psb_c_csr_sparse_mat type and the related methods.
!! This is a very common storage type, and is the default for assembled
!! matrices in our library
type, extends(psb_c_base_sparse_mat) :: psb_c_csr_sparse_mat type, extends(psb_c_base_sparse_mat) :: psb_c_csr_sparse_mat
integer(psb_ipk_), allocatable :: irp(:), ja(:) !> Pointers to beginning of rows in JA and VAL.
integer(psb_ipk_), allocatable :: irp(:)
!> Column indices.
integer(psb_ipk_), allocatable :: ja(:)
!> Coefficient values.
complex(psb_spk_), allocatable :: val(:) complex(psb_spk_), allocatable :: val(:)
contains contains
@ -98,6 +108,8 @@ module psb_c_csr_mat_mod
private :: c_csr_get_nzeros, c_csr_free, c_csr_get_fmt, & private :: c_csr_get_nzeros, c_csr_free, c_csr_get_fmt, &
& c_csr_get_size, c_csr_sizeof, c_csr_get_nz_row & c_csr_get_size, c_csr_sizeof, c_csr_get_nz_row
!> \memberof psb_c_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_c_csr_reallocate_nz(nz,a) subroutine psb_c_csr_reallocate_nz(nz,a)
import :: psb_ipk_, psb_c_csr_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat
@ -106,6 +118,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_reallocate_nz end subroutine psb_c_csr_reallocate_nz
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_c_csr_reinit(a,clear) subroutine psb_c_csr_reinit(a,clear)
import :: psb_ipk_, psb_c_csr_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat
@ -114,6 +128,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_reinit end subroutine psb_c_csr_reinit
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_c_csr_trim(a) subroutine psb_c_csr_trim(a)
import :: psb_ipk_, psb_c_csr_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat
@ -121,6 +137,9 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_trim end subroutine psb_c_csr_trim
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface interface
subroutine psb_c_csr_mold(a,b,info) subroutine psb_c_csr_mold(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_
@ -130,6 +149,9 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_mold end subroutine psb_c_csr_mold
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_c_csr_allocate_mnnz(m,n,a,nz) subroutine psb_c_csr_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_c_csr_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat
@ -139,6 +161,9 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_allocate_mnnz end subroutine psb_c_csr_allocate_mnnz
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_print
interface interface
subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc) subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_c_csr_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat
@ -150,6 +175,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_print end subroutine psb_c_csr_print
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo
interface interface
subroutine psb_c_cp_csr_to_coo(a,b,info) subroutine psb_c_cp_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_csr_sparse_mat import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_csr_sparse_mat
@ -159,6 +186,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_cp_csr_to_coo end subroutine psb_c_cp_csr_to_coo
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo
interface interface
subroutine psb_c_cp_csr_from_coo(a,b,info) subroutine psb_c_cp_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat
@ -168,6 +197,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_cp_csr_from_coo end subroutine psb_c_cp_csr_from_coo
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_to_fmt
interface interface
subroutine psb_c_cp_csr_to_fmt(a,b,info) subroutine psb_c_cp_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat
@ -177,6 +208,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_cp_csr_to_fmt end subroutine psb_c_cp_csr_to_fmt
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt
interface interface
subroutine psb_c_cp_csr_from_fmt(a,b,info) subroutine psb_c_cp_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat
@ -186,6 +219,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_cp_csr_from_fmt end subroutine psb_c_cp_csr_from_fmt
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo
interface interface
subroutine psb_c_mv_csr_to_coo(a,b,info) subroutine psb_c_mv_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat
@ -195,6 +230,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_mv_csr_to_coo end subroutine psb_c_mv_csr_to_coo
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo
interface interface
subroutine psb_c_mv_csr_from_coo(a,b,info) subroutine psb_c_mv_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_coo_sparse_mat
@ -204,6 +241,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_mv_csr_from_coo end subroutine psb_c_mv_csr_from_coo
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt
interface interface
subroutine psb_c_mv_csr_to_fmt(a,b,info) subroutine psb_c_mv_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat
@ -213,6 +252,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_mv_csr_to_fmt end subroutine psb_c_mv_csr_to_fmt
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt
interface interface
subroutine psb_c_mv_csr_from_fmt(a,b,info) subroutine psb_c_mv_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat import :: psb_ipk_, psb_c_csr_sparse_mat, psb_c_base_sparse_mat
@ -222,6 +263,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_mv_csr_from_fmt end subroutine psb_c_mv_csr_from_fmt
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cp_from
interface interface
subroutine psb_c_csr_cp_from(a,b) subroutine psb_c_csr_cp_from(a,b)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -230,6 +273,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_cp_from end subroutine psb_c_csr_cp_from
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_mv_from
interface interface
subroutine psb_c_csr_mv_from(a,b) subroutine psb_c_csr_mv_from(a,b)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -239,6 +284,8 @@ module psb_c_csr_mat_mod
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csput
interface interface
subroutine psb_c_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_c_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -251,6 +298,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_csput end subroutine psb_c_csr_csput
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_c_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_c_csr_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +316,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_csgetptn end subroutine psb_c_csr_csgetptn
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetrow
interface interface
subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +335,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_csgetrow end subroutine psb_c_csr_csgetrow
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csgetblk
interface interface
subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,& subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +352,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_csgetblk end subroutine psb_c_csr_csgetblk
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssv
interface interface
subroutine psb_c_csr_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_c_csr_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -308,6 +363,10 @@ module psb_c_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_c_csr_cssv end subroutine psb_c_csr_cssv
end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_cssm
interface
subroutine psb_c_csr_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_c_csr_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_csr_sparse_mat), intent(in) :: a
@ -318,6 +377,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_cssm end subroutine psb_c_csr_cssm
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmv
interface interface
subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -327,6 +388,11 @@ module psb_c_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_c_csr_csmv end subroutine psb_c_csr_csmv
end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csmm
interface
subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_c_csr_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
class(psb_c_csr_sparse_mat), intent(in) :: a class(psb_c_csr_sparse_mat), intent(in) :: a
@ -338,6 +404,8 @@ module psb_c_csr_mat_mod
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_maxval
interface interface
function psb_c_csr_maxval(a) result(res) function psb_c_csr_maxval(a) result(res)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -346,6 +414,8 @@ module psb_c_csr_mat_mod
end function psb_c_csr_maxval end function psb_c_csr_maxval
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csnmi
interface interface
function psb_c_csr_csnmi(a) result(res) function psb_c_csr_csnmi(a) result(res)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -354,6 +424,8 @@ module psb_c_csr_mat_mod
end function psb_c_csr_csnmi end function psb_c_csr_csnmi
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_csnm1
interface interface
function psb_c_csr_csnm1(a) result(res) function psb_c_csr_csnm1(a) result(res)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -362,6 +434,8 @@ module psb_c_csr_mat_mod
end function psb_c_csr_csnm1 end function psb_c_csr_csnm1
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_rowsum
interface interface
subroutine psb_c_csr_rowsum(d,a) subroutine psb_c_csr_rowsum(d,a)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -370,6 +444,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_rowsum end subroutine psb_c_csr_rowsum
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_arwsum
interface interface
subroutine psb_c_csr_arwsum(d,a) subroutine psb_c_csr_arwsum(d,a)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -378,6 +454,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_arwsum end subroutine psb_c_csr_arwsum
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_colsum
interface interface
subroutine psb_c_csr_colsum(d,a) subroutine psb_c_csr_colsum(d,a)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -386,6 +464,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_colsum end subroutine psb_c_csr_colsum
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_aclsum
interface interface
subroutine psb_c_csr_aclsum(d,a) subroutine psb_c_csr_aclsum(d,a)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -394,6 +474,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_aclsum end subroutine psb_c_csr_aclsum
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_get_diag
interface interface
subroutine psb_c_csr_get_diag(a,d,info) subroutine psb_c_csr_get_diag(a,d,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -403,6 +485,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_get_diag end subroutine psb_c_csr_get_diag
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_scal
interface interface
subroutine psb_c_csr_scal(d,a,info,side) subroutine psb_c_csr_scal(d,a,info,side)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
@ -413,6 +497,8 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_scal end subroutine psb_c_csr_scal
end interface end interface
!> \memberof psb_c_csr_sparse_mat
!! \see psb_c_base_mat_mod::psb_c_base_scals
interface interface
subroutine psb_c_csr_scals(d,a,info) subroutine psb_c_csr_scals(d,a,info)
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_

@ -212,7 +212,7 @@ module psb_d_base_mat_mod
! == ================= ! == =================
!> Function csput: !> Function csput:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Insert coefficients. !! \brief Insert coefficients.
!! !!
!! !!
@ -261,7 +261,7 @@ module psb_d_base_mat_mod
! !
! !
!> Function csgetrow: !> Function csgetrow:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getrow is the basic method by which the other (getblk, clip) can !! getrow is the basic method by which the other (getblk, clip) can
@ -309,7 +309,7 @@ module psb_d_base_mat_mod
! !
!> Function csgetblk: !> Function csgetblk:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getblk is very similar to getrow, except that the output !! getblk is very similar to getrow, except that the output
@ -347,7 +347,7 @@ module psb_d_base_mat_mod
! !
! !
!> Function csclip: !> Function csclip:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Get a submatrix. !! \brief Get a submatrix.
!! !!
!! csclip is practically identical to getblk. !! csclip is practically identical to getblk.
@ -381,7 +381,7 @@ module psb_d_base_mat_mod
! !
!> Function get_diag: !> Function get_diag:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Extract the diagonal of A. !! \brief Extract the diagonal of A.
!! !!
!! D(i) = A(i:i), i=1:min(nrows,ncols) !! D(i) = A(i:i), i=1:min(nrows,ncols)
@ -400,7 +400,7 @@ module psb_d_base_mat_mod
! !
!> Function mold: !> Function mold:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Allocate a class(psb_d_base_sparse_mat) with the !! \brief Allocate a class(psb_d_base_sparse_mat) with the
!! same dynamic type as the input. !! same dynamic type as the input.
!! This is equivalent to allocate( mold= ) and is provided !! This is equivalent to allocate( mold= ) and is provided
@ -420,7 +420,7 @@ module psb_d_base_mat_mod
! !
!> Function cp_to_coo: !> Function cp_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Copy and convert to psb_d_coo_sparse_mat !! \brief Copy and convert to psb_d_coo_sparse_mat
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -437,7 +437,7 @@ module psb_d_base_mat_mod
! !
!> Function cp_from_coo: !> Function cp_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Copy and convert from psb_d_coo_sparse_mat !! \brief Copy and convert from psb_d_coo_sparse_mat
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -454,7 +454,7 @@ module psb_d_base_mat_mod
! !
!> Function cp_to_fmt: !> Function cp_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Copy and convert to a class(psb_d_base_sparse_mat) !! \brief Copy and convert to a class(psb_d_base_sparse_mat)
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp). !! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp).
@ -472,7 +472,7 @@ module psb_d_base_mat_mod
! !
!> Function cp_from_fmt: !> Function cp_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Copy and convert from a class(psb_d_base_sparse_mat) !! \brief Copy and convert from a class(psb_d_base_sparse_mat)
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp). !! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp).
@ -490,7 +490,7 @@ module psb_d_base_mat_mod
! !
!> Function mv_to_coo: !> Function mv_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Convert to psb_d_coo_sparse_mat, freeing the source. !! \brief Convert to psb_d_coo_sparse_mat, freeing the source.
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -507,7 +507,7 @@ module psb_d_base_mat_mod
! !
!> Function mv_from_coo: !> Function mv_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Convert from psb_d_coo_sparse_mat, freeing the source. !! \brief Convert from psb_d_coo_sparse_mat, freeing the source.
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -524,7 +524,7 @@ module psb_d_base_mat_mod
! !
!> Function mv_to_fmt: !> Function mv_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Convert to a class(psb_d_base_sparse_mat), freeing the source. !! \brief Convert to a class(psb_d_base_sparse_mat), freeing the source.
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp). !! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp).
@ -542,7 +542,7 @@ module psb_d_base_mat_mod
! !
!> Function mv_from_fmt: !> Function mv_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Convert from a class(psb_d_base_sparse_mat), freeing the source. !! \brief Convert from a class(psb_d_base_sparse_mat), freeing the source.
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp). !! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp).
@ -560,7 +560,7 @@ module psb_d_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version !! Copyout version
@ -576,7 +576,7 @@ module psb_d_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version. !! Copyout version.
@ -592,7 +592,7 @@ module psb_d_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -606,7 +606,7 @@ module psb_d_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -620,7 +620,7 @@ module psb_d_base_mat_mod
! !
!> Function csmm: !> Function csmm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Product by a dense rank 2 array. !! \brief Product by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -648,7 +648,7 @@ module psb_d_base_mat_mod
end interface end interface
!> Function csmv: !> Function csmv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Product by a dense rank 1 array. !! \brief Product by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -676,7 +676,7 @@ module psb_d_base_mat_mod
end interface end interface
!> Function vect_mv: !> Function vect_mv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Product by an encapsulated array type(psb_d_vect_type) !! \brief Product by an encapsulated array type(psb_d_vect_type)
!! !!
!! Compute !! Compute
@ -713,7 +713,7 @@ module psb_d_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -745,7 +745,7 @@ module psb_d_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -779,7 +779,7 @@ module psb_d_base_mat_mod
! !
!> Function inner_vect_cssv: !> Function inner_vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_d_vect_type) !! an encapsulated array type(psb_d_vect_type)
!! !!
@ -810,7 +810,7 @@ module psb_d_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -843,7 +843,7 @@ module psb_d_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -876,7 +876,7 @@ module psb_d_base_mat_mod
! !
!> Function vect_cssv: !> Function vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_d_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_d_vect_type) !! an encapsulated array type(psb_d_vect_type)
!! !!
@ -909,8 +909,12 @@ module psb_d_base_mat_mod
end interface end interface
! !
! Scale a matrix by a scalar or by a vector. !> Function base_scals:
! Should we handle scale on the columns?? !! \memberof psb_d_base_sparse_mat
!! \brief Scale a matrix by a single scalar value
!!
!! \param d Scaling factor
!! \param info return code
! !
interface interface
subroutine psb_d_base_scals(d,a,info) subroutine psb_d_base_scals(d,a,info)
@ -921,6 +925,15 @@ module psb_d_base_mat_mod
end subroutine psb_d_base_scals end subroutine psb_d_base_scals
end interface end interface
!
!> Function base_scal:
!! \memberof psb_d_base_sparse_mat
!! \brief Scale a matrix by a vector
!!
!! \param d(:) Scaling vector
!! \param info return code
!! \param side [L] Scale on the Left (rows) or on the Right (columns)
!
interface interface
subroutine psb_d_base_scal(d,a,info,side) subroutine psb_d_base_scal(d,a,info,side)
import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_
@ -932,7 +945,10 @@ module psb_d_base_mat_mod
end interface end interface
! !
! Maximum coefficient absolute value norm !> Function base_maxval:
!! \memberof psb_d_base_sparse_mat
!! \brief Maximum absolute value of all coefficients;
!!
! !
interface interface
function psb_d_base_maxval(a) result(res) function psb_d_base_maxval(a) result(res)
@ -943,7 +959,11 @@ module psb_d_base_mat_mod
end interface end interface
! !
! Operator infinity norm !
!> Function base_csnmi:
!! \memberof psb_d_base_sparse_mat
!! \brief Operator infinity norm
!!
! !
interface interface
function psb_d_base_csnmi(a) result(res) function psb_d_base_csnmi(a) result(res)
@ -954,7 +974,11 @@ module psb_d_base_mat_mod
end interface end interface
! !
! Operator 1-norm !
!> Function base_csnmi:
!! \memberof psb_d_base_sparse_mat
!! \brief Operator 1-norm
!!
! !
interface interface
function psb_d_base_csnm1(a) result(res) function psb_d_base_csnm1(a) result(res)
@ -965,8 +989,12 @@ module psb_d_base_mat_mod
end interface end interface
! !
! Compute sums along the rows, either !
! natural or absolute value !> Function base_rowsum:
!! \memberof psb_d_base_sparse_mat
!! \brief Sum along the rows
!! \param d(:) The output row sums
!!
! !
interface interface
subroutine psb_d_base_rowsum(d,a) subroutine psb_d_base_rowsum(d,a)
@ -976,6 +1004,12 @@ module psb_d_base_mat_mod
end subroutine psb_d_base_rowsum end subroutine psb_d_base_rowsum
end interface end interface
!
!> Function base_arwsum:
!! \memberof psb_d_base_sparse_mat
!! \brief Absolute value sum along the rows
!! \param d(:) The output row sums
!!
interface interface
subroutine psb_d_base_arwsum(d,a) subroutine psb_d_base_arwsum(d,a)
import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_
@ -985,8 +1019,12 @@ module psb_d_base_mat_mod
end interface end interface
! !
! Compute sums along the columns, either !
! natural or absolute value !> Function base_colsum:
!! \memberof psb_d_base_sparse_mat
!! \brief Sum along the columns
!! \param d(:) The output col sums
!!
! !
interface interface
subroutine psb_d_base_colsum(d,a) subroutine psb_d_base_colsum(d,a)
@ -996,6 +1034,12 @@ module psb_d_base_mat_mod
end subroutine psb_d_base_colsum end subroutine psb_d_base_colsum
end interface end interface
!
!> Function base_aclsum:
!! \memberof psb_d_base_sparse_mat
!! \brief Absolute value sum along the columns
!! \param d(:) The output col sums
!!
interface interface
subroutine psb_d_base_aclsum(d,a) subroutine psb_d_base_aclsum(d,a)
import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_
@ -1013,7 +1057,7 @@ module psb_d_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reallocate_nz !! \see psb_base_mat_mod::psb_base_reallocate_nz
! !
interface interface
@ -1026,7 +1070,7 @@ module psb_d_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reinit !! \see psb_base_mat_mod::psb_base_reinit
! !
interface interface
@ -1038,7 +1082,7 @@ module psb_d_base_mat_mod
end interface end interface
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_trim !! \see psb_base_mat_mod::psb_base_trim
! !
interface interface
@ -1050,7 +1094,7 @@ module psb_d_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_allocate_mnnz !! \see psb_base_mat_mod::psb_base_allocate_mnnz
! !
interface interface
@ -1064,7 +1108,7 @@ module psb_d_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mold !! \see psb_d_base_mat_mod::psb_d_base_mold
! !
interface interface
@ -1079,7 +1123,7 @@ module psb_d_base_mat_mod
! !
!> Function print. !> Function print.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief Print the matrix to file in MatrixMarket format
!! !!
!! \param iout The unit to write to !! \param iout The unit to write to
@ -1103,15 +1147,11 @@ module psb_d_base_mat_mod
! !
!> Function print. !> Function get_nz_row.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief How many nonzeros in a row?
!! !!
!! \param iout The unit to write to !! \param idx The row to search.
!! \param iv [none] Renumbering for both rows and columns
!! \param head [none] Descriptive header for the file
!! \param ivr [none] Row renumbering
!! \param ivc [none] Col renumbering
!! !!
! !
interface interface
@ -1151,7 +1191,7 @@ module psb_d_base_mat_mod
! !
!> Function fix_coo !> Function fix_coo
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \brief Make sure the entries are sorted and duplicates are handled. !! \brief Make sure the entries are sorted and duplicates are handled.
!! \param info return code !! \param info return code
!! \param idir [0] Sort in: row major order (0) or col major order (1) !! \param idir [0] Sort in: row major order (0) or col major order (1)
@ -1167,7 +1207,7 @@ module psb_d_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo !! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo
interface interface
subroutine psb_d_cp_coo_to_coo(a,b,info) subroutine psb_d_cp_coo_to_coo(a,b,info)
@ -1179,7 +1219,7 @@ module psb_d_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo !! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo
interface interface
subroutine psb_d_cp_coo_from_coo(a,b,info) subroutine psb_d_cp_coo_from_coo(a,b,info)
@ -1190,6 +1230,10 @@ module psb_d_base_mat_mod
end subroutine psb_d_cp_coo_from_coo end subroutine psb_d_cp_coo_from_coo
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo
!!
interface interface
subroutine psb_d_cp_coo_to_fmt(a,b,info) subroutine psb_d_cp_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat
@ -1199,6 +1243,10 @@ module psb_d_base_mat_mod
end subroutine psb_d_cp_coo_to_fmt end subroutine psb_d_cp_coo_to_fmt
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt
!!
interface interface
subroutine psb_d_cp_coo_from_fmt(a,b,info) subroutine psb_d_cp_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat
@ -1208,6 +1256,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_cp_coo_from_fmt end subroutine psb_d_cp_coo_from_fmt
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo
interface interface
subroutine psb_d_mv_coo_to_coo(a,b,info) subroutine psb_d_mv_coo_to_coo(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat
@ -1217,6 +1268,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_mv_coo_to_coo end subroutine psb_d_mv_coo_to_coo
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo
interface interface
subroutine psb_d_mv_coo_from_coo(a,b,info) subroutine psb_d_mv_coo_from_coo(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat
@ -1226,6 +1280,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_mv_coo_from_coo end subroutine psb_d_mv_coo_from_coo
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt
interface interface
subroutine psb_d_mv_coo_to_fmt(a,b,info) subroutine psb_d_mv_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat
@ -1235,6 +1292,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_mv_coo_to_fmt end subroutine psb_d_mv_coo_to_fmt
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt
interface interface
subroutine psb_d_mv_coo_from_fmt(a,b,info) subroutine psb_d_mv_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat
@ -1261,6 +1321,22 @@ module psb_d_base_mat_mod
end interface end interface
!> Function csput
!! \memberof psb_d_coo_sparse_mat
!! \brief Add coefficients into the matrix.
!!
!! \param nz Number of entries to be added
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Values
!! \param imin Minimum row index to accept
!! \param imax Maximum row index to accept
!! \param jmin Minimum col index to accept
!! \param jmax Maximum col index to accept
!! \param info return code
!! \param gtl [none] Renumbering for rows/columns
!!
!
interface interface
subroutine psb_d_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_d_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1273,6 +1349,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_csput end subroutine psb_d_coo_csput
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_d_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_d_coo_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1289,6 +1368,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_csgetptn end subroutine psb_d_coo_csgetptn
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1306,6 +1388,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_csgetrow end subroutine psb_d_coo_csgetrow
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssv
interface interface
subroutine psb_d_coo_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_d_coo_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1315,6 +1400,11 @@ module psb_d_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_d_coo_cssv end subroutine psb_d_coo_cssv
end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssm
interface
subroutine psb_d_coo_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_d_coo_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
class(psb_d_coo_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(in) :: a
@ -1325,6 +1415,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_cssm end subroutine psb_d_coo_cssm
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface interface
subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1334,6 +1427,12 @@ module psb_d_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_d_coo_csmv end subroutine psb_d_coo_csmv
end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmm
interface
subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_d_coo_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
class(psb_d_coo_sparse_mat), intent(in) :: a class(psb_d_coo_sparse_mat), intent(in) :: a
@ -1345,6 +1444,9 @@ module psb_d_base_mat_mod
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_maxval
interface interface
function psb_d_coo_maxval(a) result(res) function psb_d_coo_maxval(a) result(res)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1353,6 +1455,9 @@ module psb_d_base_mat_mod
end function psb_d_coo_maxval end function psb_d_coo_maxval
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csnmi
interface interface
function psb_d_coo_csnmi(a) result(res) function psb_d_coo_csnmi(a) result(res)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1361,6 +1466,9 @@ module psb_d_base_mat_mod
end function psb_d_coo_csnmi end function psb_d_coo_csnmi
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csnm1
interface interface
function psb_d_coo_csnm1(a) result(res) function psb_d_coo_csnm1(a) result(res)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1369,6 +1477,9 @@ module psb_d_base_mat_mod
end function psb_d_coo_csnm1 end function psb_d_coo_csnm1
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_rowsum
interface interface
subroutine psb_d_coo_rowsum(d,a) subroutine psb_d_coo_rowsum(d,a)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1376,7 +1487,9 @@ module psb_d_base_mat_mod
real(psb_dpk_), intent(out) :: d(:) real(psb_dpk_), intent(out) :: d(:)
end subroutine psb_d_coo_rowsum end subroutine psb_d_coo_rowsum
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_arwsum
interface interface
subroutine psb_d_coo_arwsum(d,a) subroutine psb_d_coo_arwsum(d,a)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1385,6 +1498,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_arwsum end subroutine psb_d_coo_arwsum
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_colsum
interface interface
subroutine psb_d_coo_colsum(d,a) subroutine psb_d_coo_colsum(d,a)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1393,6 +1509,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_colsum end subroutine psb_d_coo_colsum
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_aclsum
interface interface
subroutine psb_d_coo_aclsum(d,a) subroutine psb_d_coo_aclsum(d,a)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1401,6 +1520,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_aclsum end subroutine psb_d_coo_aclsum
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_get_diag
interface interface
subroutine psb_d_coo_get_diag(a,d,info) subroutine psb_d_coo_get_diag(a,d,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1410,6 +1532,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_get_diag end subroutine psb_d_coo_get_diag
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_scal
interface interface
subroutine psb_d_coo_scal(d,a,info,side) subroutine psb_d_coo_scal(d,a,info,side)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
@ -1420,6 +1545,9 @@ module psb_d_base_mat_mod
end subroutine psb_d_coo_scal end subroutine psb_d_coo_scal
end interface end interface
!>
!! \memberof psb_d_coo_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_scals
interface interface
subroutine psb_d_coo_scals(d,a,info) subroutine psb_d_coo_scals(d,a,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_

@ -45,9 +45,18 @@ module psb_d_csc_mat_mod
use psb_d_base_mat_mod use psb_d_base_mat_mod
!> \namespace psb_base_mod \class psb_d_csc_sparse_mat
!! \extends psb_d_base_mat_mod::psb_d_base_sparse_mat
!!
!! psb_d_csc_sparse_mat type and the related methods.
!!
type, extends(psb_d_base_sparse_mat) :: psb_d_csc_sparse_mat type, extends(psb_d_base_sparse_mat) :: psb_d_csc_sparse_mat
integer(psb_ipk_), allocatable :: icp(:), ia(:) !> Pointers to beginning of cols in IA and VAL.
integer(psb_ipk_), allocatable :: icp(:)
!> Row indices.
integer(psb_ipk_), allocatable :: ia(:)
!> Coefficient values.
real(psb_dpk_), allocatable :: val(:) real(psb_dpk_), allocatable :: val(:)
contains contains
@ -98,6 +107,8 @@ module psb_d_csc_mat_mod
private :: d_csc_get_nzeros, d_csc_free, d_csc_get_fmt, & private :: d_csc_get_nzeros, d_csc_free, d_csc_get_fmt, &
& d_csc_get_size, d_csc_sizeof, d_csc_get_nz_col & d_csc_get_size, d_csc_sizeof, d_csc_get_nz_col
!> \memberof psb_d_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_d_csc_reallocate_nz(nz,a) subroutine psb_d_csc_reallocate_nz(nz,a)
import :: psb_ipk_, psb_d_csc_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat
@ -106,6 +117,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_reallocate_nz end subroutine psb_d_csc_reallocate_nz
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_d_csc_reinit(a,clear) subroutine psb_d_csc_reinit(a,clear)
import :: psb_ipk_, psb_d_csc_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat
@ -114,6 +127,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_reinit end subroutine psb_d_csc_reinit
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_d_csc_trim(a) subroutine psb_d_csc_trim(a)
import :: psb_ipk_, psb_d_csc_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat
@ -121,6 +136,20 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_trim end subroutine psb_d_csc_trim
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface
subroutine psb_d_csc_mold(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_
class(psb_d_csc_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_d_csc_mold
end interface
!> \memberof psb_d_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_d_csc_allocate_mnnz(m,n,a,nz) subroutine psb_d_csc_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_d_csc_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat
@ -130,15 +159,9 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_allocate_mnnz end subroutine psb_d_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_d_csc_mold(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_
class(psb_d_csc_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_d_csc_mold
end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_print
interface interface
subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc) subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_d_csc_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat
@ -150,6 +173,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_print end subroutine psb_d_csc_print
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo
interface interface
subroutine psb_d_cp_csc_to_coo(a,b,info) subroutine psb_d_cp_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_csc_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_csc_sparse_mat
@ -159,6 +184,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_cp_csc_to_coo end subroutine psb_d_cp_csc_to_coo
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo
interface interface
subroutine psb_d_cp_csc_from_coo(a,b,info) subroutine psb_d_cp_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat
@ -168,6 +195,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_cp_csc_from_coo end subroutine psb_d_cp_csc_from_coo
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_to_fmt
interface interface
subroutine psb_d_cp_csc_to_fmt(a,b,info) subroutine psb_d_cp_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat
@ -177,6 +206,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_cp_csc_to_fmt end subroutine psb_d_cp_csc_to_fmt
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt
interface interface
subroutine psb_d_cp_csc_from_fmt(a,b,info) subroutine psb_d_cp_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat
@ -186,6 +217,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_cp_csc_from_fmt end subroutine psb_d_cp_csc_from_fmt
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo
interface interface
subroutine psb_d_mv_csc_to_coo(a,b,info) subroutine psb_d_mv_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat
@ -195,6 +228,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_mv_csc_to_coo end subroutine psb_d_mv_csc_to_coo
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo
interface interface
subroutine psb_d_mv_csc_from_coo(a,b,info) subroutine psb_d_mv_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_coo_sparse_mat
@ -204,6 +239,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_mv_csc_from_coo end subroutine psb_d_mv_csc_from_coo
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt
interface interface
subroutine psb_d_mv_csc_to_fmt(a,b,info) subroutine psb_d_mv_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat
@ -213,6 +250,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_mv_csc_to_fmt end subroutine psb_d_mv_csc_to_fmt
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt
interface interface
subroutine psb_d_mv_csc_from_fmt(a,b,info) subroutine psb_d_mv_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csc_sparse_mat, psb_d_base_sparse_mat
@ -222,6 +261,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_mv_csc_from_fmt end subroutine psb_d_mv_csc_from_fmt
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from
interface interface
subroutine psb_d_csc_cp_from(a,b) subroutine psb_d_csc_cp_from(a,b)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -230,6 +271,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_cp_from end subroutine psb_d_csc_cp_from
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from
interface interface
subroutine psb_d_csc_mv_from(a,b) subroutine psb_d_csc_mv_from(a,b)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -239,6 +282,8 @@ module psb_d_csc_mat_mod
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csput
interface interface
subroutine psb_d_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_d_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -251,6 +296,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_csput end subroutine psb_d_csc_csput
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_d_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_d_csc_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +314,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_csgetptn end subroutine psb_d_csc_csgetptn
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +333,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_csgetrow end subroutine psb_d_csc_csgetrow
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetblk
interface interface
subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,& subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +350,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_csgetblk end subroutine psb_d_csc_csgetblk
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssv
interface interface
subroutine psb_d_csc_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_d_csc_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -308,6 +361,10 @@ module psb_d_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_d_csc_cssv end subroutine psb_d_csc_cssv
end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssm
interface
subroutine psb_d_csc_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_d_csc_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_csc_sparse_mat), intent(in) :: a
@ -318,6 +375,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_cssm end subroutine psb_d_csc_cssm
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface interface
subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -327,6 +386,11 @@ module psb_d_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_d_csc_csmv end subroutine psb_d_csc_csmv
end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmm
interface
subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_d_csc_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
class(psb_d_csc_sparse_mat), intent(in) :: a class(psb_d_csc_sparse_mat), intent(in) :: a
@ -338,6 +402,8 @@ module psb_d_csc_mat_mod
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_maxval
interface interface
function psb_d_csc_maxval(a) result(res) function psb_d_csc_maxval(a) result(res)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -346,6 +412,8 @@ module psb_d_csc_mat_mod
end function psb_d_csc_maxval end function psb_d_csc_maxval
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csnmi
interface interface
function psb_d_csc_csnmi(a) result(res) function psb_d_csc_csnmi(a) result(res)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -354,6 +422,8 @@ module psb_d_csc_mat_mod
end function psb_d_csc_csnmi end function psb_d_csc_csnmi
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csnm1
interface interface
function psb_d_csc_csnm1(a) result(res) function psb_d_csc_csnm1(a) result(res)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -362,6 +432,8 @@ module psb_d_csc_mat_mod
end function psb_d_csc_csnm1 end function psb_d_csc_csnm1
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_rowsum
interface interface
subroutine psb_d_csc_rowsum(d,a) subroutine psb_d_csc_rowsum(d,a)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -370,6 +442,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_rowsum end subroutine psb_d_csc_rowsum
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_arwsum
interface interface
subroutine psb_d_csc_arwsum(d,a) subroutine psb_d_csc_arwsum(d,a)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -378,6 +452,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_arwsum end subroutine psb_d_csc_arwsum
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_colsum
interface interface
subroutine psb_d_csc_colsum(d,a) subroutine psb_d_csc_colsum(d,a)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -386,6 +462,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_colsum end subroutine psb_d_csc_colsum
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_aclsum
interface interface
subroutine psb_d_csc_aclsum(d,a) subroutine psb_d_csc_aclsum(d,a)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -394,6 +472,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_aclsum end subroutine psb_d_csc_aclsum
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_get_diag
interface interface
subroutine psb_d_csc_get_diag(a,d,info) subroutine psb_d_csc_get_diag(a,d,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -403,6 +483,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_get_diag end subroutine psb_d_csc_get_diag
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_scal
interface interface
subroutine psb_d_csc_scal(d,a,info,side) subroutine psb_d_csc_scal(d,a,info,side)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
@ -413,6 +495,8 @@ module psb_d_csc_mat_mod
end subroutine psb_d_csc_scal end subroutine psb_d_csc_scal
end interface end interface
!> \memberof psb_d_csc_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_scals
interface interface
subroutine psb_d_csc_scals(d,a,info) subroutine psb_d_csc_scals(d,a,info)
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_

@ -45,9 +45,19 @@ module psb_d_csr_mat_mod
use psb_d_base_mat_mod use psb_d_base_mat_mod
!> \namespace psb_base_mod \class psb_d_csr_sparse_mat
!! \extends psb_d_base_mat_mod::psb_d_base_sparse_mat
!!
!! psb_d_csr_sparse_mat type and the related methods.
!! This is a very common storage type, and is the default for assembled
!! matrices in our library
type, extends(psb_d_base_sparse_mat) :: psb_d_csr_sparse_mat type, extends(psb_d_base_sparse_mat) :: psb_d_csr_sparse_mat
integer(psb_ipk_), allocatable :: irp(:), ja(:) !> Pointers to beginning of rows in JA and VAL.
integer(psb_ipk_), allocatable :: irp(:)
!> Column indices.
integer(psb_ipk_), allocatable :: ja(:)
!> Coefficient values.
real(psb_dpk_), allocatable :: val(:) real(psb_dpk_), allocatable :: val(:)
contains contains
@ -98,6 +108,8 @@ module psb_d_csr_mat_mod
private :: d_csr_get_nzeros, d_csr_free, d_csr_get_fmt, & private :: d_csr_get_nzeros, d_csr_free, d_csr_get_fmt, &
& d_csr_get_size, d_csr_sizeof, d_csr_get_nz_row & d_csr_get_size, d_csr_sizeof, d_csr_get_nz_row
!> \memberof psb_d_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_d_csr_reallocate_nz(nz,a) subroutine psb_d_csr_reallocate_nz(nz,a)
import :: psb_ipk_, psb_d_csr_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat
@ -106,6 +118,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_reallocate_nz end subroutine psb_d_csr_reallocate_nz
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_d_csr_reinit(a,clear) subroutine psb_d_csr_reinit(a,clear)
import :: psb_ipk_, psb_d_csr_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat
@ -114,6 +128,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_reinit end subroutine psb_d_csr_reinit
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_d_csr_trim(a) subroutine psb_d_csr_trim(a)
import :: psb_ipk_, psb_d_csr_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat
@ -121,6 +137,9 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_trim end subroutine psb_d_csr_trim
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface interface
subroutine psb_d_csr_mold(a,b,info) subroutine psb_d_csr_mold(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_
@ -130,6 +149,9 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_mold end subroutine psb_d_csr_mold
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_d_csr_allocate_mnnz(m,n,a,nz) subroutine psb_d_csr_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_d_csr_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat
@ -139,6 +161,9 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_allocate_mnnz end subroutine psb_d_csr_allocate_mnnz
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_print
interface interface
subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc) subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_d_csr_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat
@ -150,6 +175,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_print end subroutine psb_d_csr_print
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo
interface interface
subroutine psb_d_cp_csr_to_coo(a,b,info) subroutine psb_d_cp_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_csr_sparse_mat import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_csr_sparse_mat
@ -159,6 +186,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_cp_csr_to_coo end subroutine psb_d_cp_csr_to_coo
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo
interface interface
subroutine psb_d_cp_csr_from_coo(a,b,info) subroutine psb_d_cp_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat
@ -168,6 +197,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_cp_csr_from_coo end subroutine psb_d_cp_csr_from_coo
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_to_fmt
interface interface
subroutine psb_d_cp_csr_to_fmt(a,b,info) subroutine psb_d_cp_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat
@ -177,6 +208,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_cp_csr_to_fmt end subroutine psb_d_cp_csr_to_fmt
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt
interface interface
subroutine psb_d_cp_csr_from_fmt(a,b,info) subroutine psb_d_cp_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat
@ -186,6 +219,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_cp_csr_from_fmt end subroutine psb_d_cp_csr_from_fmt
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo
interface interface
subroutine psb_d_mv_csr_to_coo(a,b,info) subroutine psb_d_mv_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat
@ -195,6 +230,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_mv_csr_to_coo end subroutine psb_d_mv_csr_to_coo
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo
interface interface
subroutine psb_d_mv_csr_from_coo(a,b,info) subroutine psb_d_mv_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_coo_sparse_mat
@ -204,6 +241,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_mv_csr_from_coo end subroutine psb_d_mv_csr_from_coo
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt
interface interface
subroutine psb_d_mv_csr_to_fmt(a,b,info) subroutine psb_d_mv_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat
@ -213,6 +252,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_mv_csr_to_fmt end subroutine psb_d_mv_csr_to_fmt
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt
interface interface
subroutine psb_d_mv_csr_from_fmt(a,b,info) subroutine psb_d_mv_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat import :: psb_ipk_, psb_d_csr_sparse_mat, psb_d_base_sparse_mat
@ -222,6 +263,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_mv_csr_from_fmt end subroutine psb_d_mv_csr_from_fmt
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cp_from
interface interface
subroutine psb_d_csr_cp_from(a,b) subroutine psb_d_csr_cp_from(a,b)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -230,6 +273,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_cp_from end subroutine psb_d_csr_cp_from
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_mv_from
interface interface
subroutine psb_d_csr_mv_from(a,b) subroutine psb_d_csr_mv_from(a,b)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -239,6 +284,8 @@ module psb_d_csr_mat_mod
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csput
interface interface
subroutine psb_d_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_d_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -251,6 +298,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_csput end subroutine psb_d_csr_csput
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_d_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_d_csr_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +316,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_csgetptn end subroutine psb_d_csr_csgetptn
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetrow
interface interface
subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +335,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_csgetrow end subroutine psb_d_csr_csgetrow
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csgetblk
interface interface
subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,& subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +352,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_csgetblk end subroutine psb_d_csr_csgetblk
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssv
interface interface
subroutine psb_d_csr_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_d_csr_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -308,6 +363,10 @@ module psb_d_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_d_csr_cssv end subroutine psb_d_csr_cssv
end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_cssm
interface
subroutine psb_d_csr_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_d_csr_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_csr_sparse_mat), intent(in) :: a
@ -318,6 +377,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_cssm end subroutine psb_d_csr_cssm
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmv
interface interface
subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -327,6 +388,11 @@ module psb_d_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_d_csr_csmv end subroutine psb_d_csr_csmv
end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csmm
interface
subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_d_csr_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
class(psb_d_csr_sparse_mat), intent(in) :: a class(psb_d_csr_sparse_mat), intent(in) :: a
@ -338,6 +404,8 @@ module psb_d_csr_mat_mod
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_maxval
interface interface
function psb_d_csr_maxval(a) result(res) function psb_d_csr_maxval(a) result(res)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -346,6 +414,8 @@ module psb_d_csr_mat_mod
end function psb_d_csr_maxval end function psb_d_csr_maxval
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csnmi
interface interface
function psb_d_csr_csnmi(a) result(res) function psb_d_csr_csnmi(a) result(res)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -354,6 +424,8 @@ module psb_d_csr_mat_mod
end function psb_d_csr_csnmi end function psb_d_csr_csnmi
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_csnm1
interface interface
function psb_d_csr_csnm1(a) result(res) function psb_d_csr_csnm1(a) result(res)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -362,6 +434,8 @@ module psb_d_csr_mat_mod
end function psb_d_csr_csnm1 end function psb_d_csr_csnm1
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_rowsum
interface interface
subroutine psb_d_csr_rowsum(d,a) subroutine psb_d_csr_rowsum(d,a)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -370,6 +444,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_rowsum end subroutine psb_d_csr_rowsum
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_arwsum
interface interface
subroutine psb_d_csr_arwsum(d,a) subroutine psb_d_csr_arwsum(d,a)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -378,6 +454,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_arwsum end subroutine psb_d_csr_arwsum
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_colsum
interface interface
subroutine psb_d_csr_colsum(d,a) subroutine psb_d_csr_colsum(d,a)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -386,6 +464,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_colsum end subroutine psb_d_csr_colsum
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_aclsum
interface interface
subroutine psb_d_csr_aclsum(d,a) subroutine psb_d_csr_aclsum(d,a)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -394,6 +474,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_aclsum end subroutine psb_d_csr_aclsum
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_get_diag
interface interface
subroutine psb_d_csr_get_diag(a,d,info) subroutine psb_d_csr_get_diag(a,d,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -403,6 +485,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_get_diag end subroutine psb_d_csr_get_diag
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_scal
interface interface
subroutine psb_d_csr_scal(d,a,info,side) subroutine psb_d_csr_scal(d,a,info,side)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
@ -413,6 +497,8 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_scal end subroutine psb_d_csr_scal
end interface end interface
!> \memberof psb_d_csr_sparse_mat
!! \see psb_d_base_mat_mod::psb_d_base_scals
interface interface
subroutine psb_d_csr_scals(d,a,info) subroutine psb_d_csr_scals(d,a,info)
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_

@ -212,7 +212,7 @@ module psb_s_base_mat_mod
! == ================= ! == =================
!> Function csput: !> Function csput:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Insert coefficients. !! \brief Insert coefficients.
!! !!
!! !!
@ -261,7 +261,7 @@ module psb_s_base_mat_mod
! !
! !
!> Function csgetrow: !> Function csgetrow:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getrow is the basic method by which the other (getblk, clip) can !! getrow is the basic method by which the other (getblk, clip) can
@ -309,7 +309,7 @@ module psb_s_base_mat_mod
! !
!> Function csgetblk: !> Function csgetblk:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getblk is very similar to getrow, except that the output !! getblk is very similar to getrow, except that the output
@ -347,7 +347,7 @@ module psb_s_base_mat_mod
! !
! !
!> Function csclip: !> Function csclip:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Get a submatrix. !! \brief Get a submatrix.
!! !!
!! csclip is practically identical to getblk. !! csclip is practically identical to getblk.
@ -381,7 +381,7 @@ module psb_s_base_mat_mod
! !
!> Function get_diag: !> Function get_diag:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Extract the diagonal of A. !! \brief Extract the diagonal of A.
!! !!
!! D(i) = A(i:i), i=1:min(nrows,ncols) !! D(i) = A(i:i), i=1:min(nrows,ncols)
@ -400,7 +400,7 @@ module psb_s_base_mat_mod
! !
!> Function mold: !> Function mold:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Allocate a class(psb_s_base_sparse_mat) with the !! \brief Allocate a class(psb_s_base_sparse_mat) with the
!! same dynamic type as the input. !! same dynamic type as the input.
!! This is equivalent to allocate( mold= ) and is provided !! This is equivalent to allocate( mold= ) and is provided
@ -420,7 +420,7 @@ module psb_s_base_mat_mod
! !
!> Function cp_to_coo: !> Function cp_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Copy and convert to psb_s_coo_sparse_mat !! \brief Copy and convert to psb_s_coo_sparse_mat
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -437,7 +437,7 @@ module psb_s_base_mat_mod
! !
!> Function cp_from_coo: !> Function cp_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Copy and convert from psb_s_coo_sparse_mat !! \brief Copy and convert from psb_s_coo_sparse_mat
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -454,7 +454,7 @@ module psb_s_base_mat_mod
! !
!> Function cp_to_fmt: !> Function cp_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Copy and convert to a class(psb_s_base_sparse_mat) !! \brief Copy and convert to a class(psb_s_base_sparse_mat)
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp). !! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp).
@ -472,7 +472,7 @@ module psb_s_base_mat_mod
! !
!> Function cp_from_fmt: !> Function cp_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Copy and convert from a class(psb_s_base_sparse_mat) !! \brief Copy and convert from a class(psb_s_base_sparse_mat)
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp). !! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp).
@ -490,7 +490,7 @@ module psb_s_base_mat_mod
! !
!> Function mv_to_coo: !> Function mv_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Convert to psb_s_coo_sparse_mat, freeing the source. !! \brief Convert to psb_s_coo_sparse_mat, freeing the source.
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -507,7 +507,7 @@ module psb_s_base_mat_mod
! !
!> Function mv_from_coo: !> Function mv_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Convert from psb_s_coo_sparse_mat, freeing the source. !! \brief Convert from psb_s_coo_sparse_mat, freeing the source.
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -524,7 +524,7 @@ module psb_s_base_mat_mod
! !
!> Function mv_to_fmt: !> Function mv_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Convert to a class(psb_s_base_sparse_mat), freeing the source. !! \brief Convert to a class(psb_s_base_sparse_mat), freeing the source.
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp). !! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp).
@ -542,7 +542,7 @@ module psb_s_base_mat_mod
! !
!> Function mv_from_fmt: !> Function mv_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Convert from a class(psb_s_base_sparse_mat), freeing the source. !! \brief Convert from a class(psb_s_base_sparse_mat), freeing the source.
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp). !! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp).
@ -560,7 +560,7 @@ module psb_s_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version !! Copyout version
@ -576,7 +576,7 @@ module psb_s_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version. !! Copyout version.
@ -592,7 +592,7 @@ module psb_s_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -606,7 +606,7 @@ module psb_s_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -620,7 +620,7 @@ module psb_s_base_mat_mod
! !
!> Function csmm: !> Function csmm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Product by a dense rank 2 array. !! \brief Product by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -648,7 +648,7 @@ module psb_s_base_mat_mod
end interface end interface
!> Function csmv: !> Function csmv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Product by a dense rank 1 array. !! \brief Product by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -676,7 +676,7 @@ module psb_s_base_mat_mod
end interface end interface
!> Function vect_mv: !> Function vect_mv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Product by an encapsulated array type(psb_s_vect_type) !! \brief Product by an encapsulated array type(psb_s_vect_type)
!! !!
!! Compute !! Compute
@ -713,7 +713,7 @@ module psb_s_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -745,7 +745,7 @@ module psb_s_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -779,7 +779,7 @@ module psb_s_base_mat_mod
! !
!> Function inner_vect_cssv: !> Function inner_vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_s_vect_type) !! an encapsulated array type(psb_s_vect_type)
!! !!
@ -810,7 +810,7 @@ module psb_s_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -843,7 +843,7 @@ module psb_s_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -876,7 +876,7 @@ module psb_s_base_mat_mod
! !
!> Function vect_cssv: !> Function vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_s_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_s_vect_type) !! an encapsulated array type(psb_s_vect_type)
!! !!
@ -909,8 +909,12 @@ module psb_s_base_mat_mod
end interface end interface
! !
! Scale a matrix by a scalar or by a vector. !> Function base_scals:
! Should we handle scale on the columns?? !! \memberof psb_s_base_sparse_mat
!! \brief Scale a matrix by a single scalar value
!!
!! \param d Scaling factor
!! \param info return code
! !
interface interface
subroutine psb_s_base_scals(d,a,info) subroutine psb_s_base_scals(d,a,info)
@ -921,6 +925,15 @@ module psb_s_base_mat_mod
end subroutine psb_s_base_scals end subroutine psb_s_base_scals
end interface end interface
!
!> Function base_scal:
!! \memberof psb_s_base_sparse_mat
!! \brief Scale a matrix by a vector
!!
!! \param d(:) Scaling vector
!! \param info return code
!! \param side [L] Scale on the Left (rows) or on the Right (columns)
!
interface interface
subroutine psb_s_base_scal(d,a,info,side) subroutine psb_s_base_scal(d,a,info,side)
import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_
@ -932,7 +945,10 @@ module psb_s_base_mat_mod
end interface end interface
! !
! Maximum coefficient absolute value norm !> Function base_maxval:
!! \memberof psb_s_base_sparse_mat
!! \brief Maximum absolute value of all coefficients;
!!
! !
interface interface
function psb_s_base_maxval(a) result(res) function psb_s_base_maxval(a) result(res)
@ -943,7 +959,11 @@ module psb_s_base_mat_mod
end interface end interface
! !
! Operator infinity norm !
!> Function base_csnmi:
!! \memberof psb_s_base_sparse_mat
!! \brief Operator infinity norm
!!
! !
interface interface
function psb_s_base_csnmi(a) result(res) function psb_s_base_csnmi(a) result(res)
@ -954,7 +974,11 @@ module psb_s_base_mat_mod
end interface end interface
! !
! Operator 1-norm !
!> Function base_csnmi:
!! \memberof psb_s_base_sparse_mat
!! \brief Operator 1-norm
!!
! !
interface interface
function psb_s_base_csnm1(a) result(res) function psb_s_base_csnm1(a) result(res)
@ -965,8 +989,12 @@ module psb_s_base_mat_mod
end interface end interface
! !
! Compute sums along the rows, either !
! natural or absolute value !> Function base_rowsum:
!! \memberof psb_s_base_sparse_mat
!! \brief Sum along the rows
!! \param d(:) The output row sums
!!
! !
interface interface
subroutine psb_s_base_rowsum(d,a) subroutine psb_s_base_rowsum(d,a)
@ -976,6 +1004,12 @@ module psb_s_base_mat_mod
end subroutine psb_s_base_rowsum end subroutine psb_s_base_rowsum
end interface end interface
!
!> Function base_arwsum:
!! \memberof psb_s_base_sparse_mat
!! \brief Absolute value sum along the rows
!! \param d(:) The output row sums
!!
interface interface
subroutine psb_s_base_arwsum(d,a) subroutine psb_s_base_arwsum(d,a)
import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_
@ -985,8 +1019,12 @@ module psb_s_base_mat_mod
end interface end interface
! !
! Compute sums along the columns, either !
! natural or absolute value !> Function base_colsum:
!! \memberof psb_s_base_sparse_mat
!! \brief Sum along the columns
!! \param d(:) The output col sums
!!
! !
interface interface
subroutine psb_s_base_colsum(d,a) subroutine psb_s_base_colsum(d,a)
@ -996,6 +1034,12 @@ module psb_s_base_mat_mod
end subroutine psb_s_base_colsum end subroutine psb_s_base_colsum
end interface end interface
!
!> Function base_aclsum:
!! \memberof psb_s_base_sparse_mat
!! \brief Absolute value sum along the columns
!! \param d(:) The output col sums
!!
interface interface
subroutine psb_s_base_aclsum(d,a) subroutine psb_s_base_aclsum(d,a)
import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_
@ -1013,7 +1057,7 @@ module psb_s_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reallocate_nz !! \see psb_base_mat_mod::psb_base_reallocate_nz
! !
interface interface
@ -1026,7 +1070,7 @@ module psb_s_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reinit !! \see psb_base_mat_mod::psb_base_reinit
! !
interface interface
@ -1038,7 +1082,7 @@ module psb_s_base_mat_mod
end interface end interface
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_trim !! \see psb_base_mat_mod::psb_base_trim
! !
interface interface
@ -1050,7 +1094,7 @@ module psb_s_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_allocate_mnnz !! \see psb_base_mat_mod::psb_base_allocate_mnnz
! !
interface interface
@ -1064,7 +1108,7 @@ module psb_s_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mold !! \see psb_s_base_mat_mod::psb_s_base_mold
! !
interface interface
@ -1079,7 +1123,7 @@ module psb_s_base_mat_mod
! !
!> Function print. !> Function print.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief Print the matrix to file in MatrixMarket format
!! !!
!! \param iout The unit to write to !! \param iout The unit to write to
@ -1103,15 +1147,11 @@ module psb_s_base_mat_mod
! !
!> Function print. !> Function get_nz_row.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief How many nonzeros in a row?
!! !!
!! \param iout The unit to write to !! \param idx The row to search.
!! \param iv [none] Renumbering for both rows and columns
!! \param head [none] Descriptive header for the file
!! \param ivr [none] Row renumbering
!! \param ivc [none] Col renumbering
!! !!
! !
interface interface
@ -1151,7 +1191,7 @@ module psb_s_base_mat_mod
! !
!> Function fix_coo !> Function fix_coo
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \brief Make sure the entries are sorted and duplicates are handled. !! \brief Make sure the entries are sorted and duplicates are handled.
!! \param info return code !! \param info return code
!! \param idir [0] Sort in: row major order (0) or col major order (1) !! \param idir [0] Sort in: row major order (0) or col major order (1)
@ -1167,7 +1207,7 @@ module psb_s_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo !! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo
interface interface
subroutine psb_s_cp_coo_to_coo(a,b,info) subroutine psb_s_cp_coo_to_coo(a,b,info)
@ -1179,7 +1219,7 @@ module psb_s_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo !! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo
interface interface
subroutine psb_s_cp_coo_from_coo(a,b,info) subroutine psb_s_cp_coo_from_coo(a,b,info)
@ -1190,6 +1230,10 @@ module psb_s_base_mat_mod
end subroutine psb_s_cp_coo_from_coo end subroutine psb_s_cp_coo_from_coo
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo
!!
interface interface
subroutine psb_s_cp_coo_to_fmt(a,b,info) subroutine psb_s_cp_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat
@ -1199,6 +1243,10 @@ module psb_s_base_mat_mod
end subroutine psb_s_cp_coo_to_fmt end subroutine psb_s_cp_coo_to_fmt
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt
!!
interface interface
subroutine psb_s_cp_coo_from_fmt(a,b,info) subroutine psb_s_cp_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat
@ -1208,6 +1256,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_cp_coo_from_fmt end subroutine psb_s_cp_coo_from_fmt
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo
interface interface
subroutine psb_s_mv_coo_to_coo(a,b,info) subroutine psb_s_mv_coo_to_coo(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat
@ -1217,6 +1268,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_mv_coo_to_coo end subroutine psb_s_mv_coo_to_coo
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo
interface interface
subroutine psb_s_mv_coo_from_coo(a,b,info) subroutine psb_s_mv_coo_from_coo(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat
@ -1226,6 +1280,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_mv_coo_from_coo end subroutine psb_s_mv_coo_from_coo
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt
interface interface
subroutine psb_s_mv_coo_to_fmt(a,b,info) subroutine psb_s_mv_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat
@ -1235,6 +1292,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_mv_coo_to_fmt end subroutine psb_s_mv_coo_to_fmt
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt
interface interface
subroutine psb_s_mv_coo_from_fmt(a,b,info) subroutine psb_s_mv_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat
@ -1261,6 +1321,22 @@ module psb_s_base_mat_mod
end interface end interface
!> Function csput
!! \memberof psb_s_coo_sparse_mat
!! \brief Add coefficients into the matrix.
!!
!! \param nz Number of entries to be added
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Values
!! \param imin Minimum row index to accept
!! \param imax Maximum row index to accept
!! \param jmin Minimum col index to accept
!! \param jmax Maximum col index to accept
!! \param info return code
!! \param gtl [none] Renumbering for rows/columns
!!
!
interface interface
subroutine psb_s_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_s_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1273,6 +1349,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_csput end subroutine psb_s_coo_csput
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_s_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_s_coo_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1289,6 +1368,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_csgetptn end subroutine psb_s_coo_csgetptn
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetrow
interface interface
subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1306,6 +1388,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_csgetrow end subroutine psb_s_coo_csgetrow
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssv
interface interface
subroutine psb_s_coo_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_s_coo_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1315,6 +1400,11 @@ module psb_s_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_s_coo_cssv end subroutine psb_s_coo_cssv
end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssm
interface
subroutine psb_s_coo_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_s_coo_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
class(psb_s_coo_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(in) :: a
@ -1325,6 +1415,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_cssm end subroutine psb_s_coo_cssm
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface interface
subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1334,6 +1427,12 @@ module psb_s_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_s_coo_csmv end subroutine psb_s_coo_csmv
end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmm
interface
subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_s_coo_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
class(psb_s_coo_sparse_mat), intent(in) :: a class(psb_s_coo_sparse_mat), intent(in) :: a
@ -1345,6 +1444,9 @@ module psb_s_base_mat_mod
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_maxval
interface interface
function psb_s_coo_maxval(a) result(res) function psb_s_coo_maxval(a) result(res)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1353,6 +1455,9 @@ module psb_s_base_mat_mod
end function psb_s_coo_maxval end function psb_s_coo_maxval
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csnmi
interface interface
function psb_s_coo_csnmi(a) result(res) function psb_s_coo_csnmi(a) result(res)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1361,6 +1466,9 @@ module psb_s_base_mat_mod
end function psb_s_coo_csnmi end function psb_s_coo_csnmi
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csnm1
interface interface
function psb_s_coo_csnm1(a) result(res) function psb_s_coo_csnm1(a) result(res)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1369,6 +1477,9 @@ module psb_s_base_mat_mod
end function psb_s_coo_csnm1 end function psb_s_coo_csnm1
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_rowsum
interface interface
subroutine psb_s_coo_rowsum(d,a) subroutine psb_s_coo_rowsum(d,a)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1376,7 +1487,9 @@ module psb_s_base_mat_mod
real(psb_spk_), intent(out) :: d(:) real(psb_spk_), intent(out) :: d(:)
end subroutine psb_s_coo_rowsum end subroutine psb_s_coo_rowsum
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_arwsum
interface interface
subroutine psb_s_coo_arwsum(d,a) subroutine psb_s_coo_arwsum(d,a)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1385,6 +1498,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_arwsum end subroutine psb_s_coo_arwsum
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_colsum
interface interface
subroutine psb_s_coo_colsum(d,a) subroutine psb_s_coo_colsum(d,a)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1393,6 +1509,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_colsum end subroutine psb_s_coo_colsum
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_aclsum
interface interface
subroutine psb_s_coo_aclsum(d,a) subroutine psb_s_coo_aclsum(d,a)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1401,6 +1520,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_aclsum end subroutine psb_s_coo_aclsum
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_get_diag
interface interface
subroutine psb_s_coo_get_diag(a,d,info) subroutine psb_s_coo_get_diag(a,d,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1410,6 +1532,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_get_diag end subroutine psb_s_coo_get_diag
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_scal
interface interface
subroutine psb_s_coo_scal(d,a,info,side) subroutine psb_s_coo_scal(d,a,info,side)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
@ -1420,6 +1545,9 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_scal end subroutine psb_s_coo_scal
end interface end interface
!>
!! \memberof psb_s_coo_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_scals
interface interface
subroutine psb_s_coo_scals(d,a,info) subroutine psb_s_coo_scals(d,a,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_

@ -45,9 +45,18 @@ module psb_s_csc_mat_mod
use psb_s_base_mat_mod use psb_s_base_mat_mod
!> \namespace psb_base_mod \class psb_s_csc_sparse_mat
!! \extends psb_s_base_mat_mod::psb_s_base_sparse_mat
!!
!! psb_s_csc_sparse_mat type and the related methods.
!!
type, extends(psb_s_base_sparse_mat) :: psb_s_csc_sparse_mat type, extends(psb_s_base_sparse_mat) :: psb_s_csc_sparse_mat
integer(psb_ipk_), allocatable :: icp(:), ia(:) !> Pointers to beginning of cols in IA and VAL.
integer(psb_ipk_), allocatable :: icp(:)
!> Row indices.
integer(psb_ipk_), allocatable :: ia(:)
!> Coefficient values.
real(psb_spk_), allocatable :: val(:) real(psb_spk_), allocatable :: val(:)
contains contains
@ -98,6 +107,8 @@ module psb_s_csc_mat_mod
private :: s_csc_get_nzeros, s_csc_free, s_csc_get_fmt, & private :: s_csc_get_nzeros, s_csc_free, s_csc_get_fmt, &
& s_csc_get_size, s_csc_sizeof, s_csc_get_nz_col & s_csc_get_size, s_csc_sizeof, s_csc_get_nz_col
!> \memberof psb_s_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_s_csc_reallocate_nz(nz,a) subroutine psb_s_csc_reallocate_nz(nz,a)
import :: psb_ipk_, psb_s_csc_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat
@ -106,6 +117,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_reallocate_nz end subroutine psb_s_csc_reallocate_nz
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_s_csc_reinit(a,clear) subroutine psb_s_csc_reinit(a,clear)
import :: psb_ipk_, psb_s_csc_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat
@ -114,6 +127,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_reinit end subroutine psb_s_csc_reinit
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_s_csc_trim(a) subroutine psb_s_csc_trim(a)
import :: psb_ipk_, psb_s_csc_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat
@ -121,6 +136,20 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_trim end subroutine psb_s_csc_trim
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface
subroutine psb_s_csc_mold(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_
class(psb_s_csc_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_s_csc_mold
end interface
!> \memberof psb_s_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_s_csc_allocate_mnnz(m,n,a,nz) subroutine psb_s_csc_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_s_csc_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat
@ -130,15 +159,9 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_allocate_mnnz end subroutine psb_s_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_s_csc_mold(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_
class(psb_s_csc_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_s_csc_mold
end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_print
interface interface
subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc) subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_s_csc_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat
@ -150,6 +173,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_print end subroutine psb_s_csc_print
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo
interface interface
subroutine psb_s_cp_csc_to_coo(a,b,info) subroutine psb_s_cp_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_csc_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_csc_sparse_mat
@ -159,6 +184,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_cp_csc_to_coo end subroutine psb_s_cp_csc_to_coo
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo
interface interface
subroutine psb_s_cp_csc_from_coo(a,b,info) subroutine psb_s_cp_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat
@ -168,6 +195,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_cp_csc_from_coo end subroutine psb_s_cp_csc_from_coo
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_to_fmt
interface interface
subroutine psb_s_cp_csc_to_fmt(a,b,info) subroutine psb_s_cp_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat
@ -177,6 +206,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_cp_csc_to_fmt end subroutine psb_s_cp_csc_to_fmt
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt
interface interface
subroutine psb_s_cp_csc_from_fmt(a,b,info) subroutine psb_s_cp_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat
@ -186,6 +217,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_cp_csc_from_fmt end subroutine psb_s_cp_csc_from_fmt
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo
interface interface
subroutine psb_s_mv_csc_to_coo(a,b,info) subroutine psb_s_mv_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat
@ -195,6 +228,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_mv_csc_to_coo end subroutine psb_s_mv_csc_to_coo
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo
interface interface
subroutine psb_s_mv_csc_from_coo(a,b,info) subroutine psb_s_mv_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_coo_sparse_mat
@ -204,6 +239,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_mv_csc_from_coo end subroutine psb_s_mv_csc_from_coo
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt
interface interface
subroutine psb_s_mv_csc_to_fmt(a,b,info) subroutine psb_s_mv_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat
@ -213,6 +250,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_mv_csc_to_fmt end subroutine psb_s_mv_csc_to_fmt
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt
interface interface
subroutine psb_s_mv_csc_from_fmt(a,b,info) subroutine psb_s_mv_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csc_sparse_mat, psb_s_base_sparse_mat
@ -222,6 +261,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_mv_csc_from_fmt end subroutine psb_s_mv_csc_from_fmt
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from
interface interface
subroutine psb_s_csc_cp_from(a,b) subroutine psb_s_csc_cp_from(a,b)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -230,6 +271,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_cp_from end subroutine psb_s_csc_cp_from
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from
interface interface
subroutine psb_s_csc_mv_from(a,b) subroutine psb_s_csc_mv_from(a,b)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -239,6 +282,8 @@ module psb_s_csc_mat_mod
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csput
interface interface
subroutine psb_s_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_s_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -251,6 +296,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_csput end subroutine psb_s_csc_csput
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_s_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_s_csc_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +314,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_csgetptn end subroutine psb_s_csc_csgetptn
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetrow
interface interface
subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +333,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_csgetrow end subroutine psb_s_csc_csgetrow
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetblk
interface interface
subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,& subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +350,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_csgetblk end subroutine psb_s_csc_csgetblk
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssv
interface interface
subroutine psb_s_csc_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_s_csc_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -308,6 +361,10 @@ module psb_s_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_s_csc_cssv end subroutine psb_s_csc_cssv
end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssm
interface
subroutine psb_s_csc_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_s_csc_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_csc_sparse_mat), intent(in) :: a
@ -318,6 +375,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_cssm end subroutine psb_s_csc_cssm
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface interface
subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -327,6 +386,11 @@ module psb_s_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_s_csc_csmv end subroutine psb_s_csc_csmv
end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmm
interface
subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_s_csc_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
class(psb_s_csc_sparse_mat), intent(in) :: a class(psb_s_csc_sparse_mat), intent(in) :: a
@ -338,6 +402,8 @@ module psb_s_csc_mat_mod
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_maxval
interface interface
function psb_s_csc_maxval(a) result(res) function psb_s_csc_maxval(a) result(res)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -346,6 +412,8 @@ module psb_s_csc_mat_mod
end function psb_s_csc_maxval end function psb_s_csc_maxval
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csnmi
interface interface
function psb_s_csc_csnmi(a) result(res) function psb_s_csc_csnmi(a) result(res)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -354,6 +422,8 @@ module psb_s_csc_mat_mod
end function psb_s_csc_csnmi end function psb_s_csc_csnmi
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csnm1
interface interface
function psb_s_csc_csnm1(a) result(res) function psb_s_csc_csnm1(a) result(res)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -362,6 +432,8 @@ module psb_s_csc_mat_mod
end function psb_s_csc_csnm1 end function psb_s_csc_csnm1
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_rowsum
interface interface
subroutine psb_s_csc_rowsum(d,a) subroutine psb_s_csc_rowsum(d,a)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -370,6 +442,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_rowsum end subroutine psb_s_csc_rowsum
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_arwsum
interface interface
subroutine psb_s_csc_arwsum(d,a) subroutine psb_s_csc_arwsum(d,a)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -378,6 +452,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_arwsum end subroutine psb_s_csc_arwsum
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_colsum
interface interface
subroutine psb_s_csc_colsum(d,a) subroutine psb_s_csc_colsum(d,a)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -386,6 +462,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_colsum end subroutine psb_s_csc_colsum
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_aclsum
interface interface
subroutine psb_s_csc_aclsum(d,a) subroutine psb_s_csc_aclsum(d,a)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -394,6 +472,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_aclsum end subroutine psb_s_csc_aclsum
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_get_diag
interface interface
subroutine psb_s_csc_get_diag(a,d,info) subroutine psb_s_csc_get_diag(a,d,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -403,6 +483,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_get_diag end subroutine psb_s_csc_get_diag
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_scal
interface interface
subroutine psb_s_csc_scal(d,a,info,side) subroutine psb_s_csc_scal(d,a,info,side)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
@ -413,6 +495,8 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_scal end subroutine psb_s_csc_scal
end interface end interface
!> \memberof psb_s_csc_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_scals
interface interface
subroutine psb_s_csc_scals(d,a,info) subroutine psb_s_csc_scals(d,a,info)
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_

@ -45,9 +45,19 @@ module psb_s_csr_mat_mod
use psb_s_base_mat_mod use psb_s_base_mat_mod
!> \namespace psb_base_mod \class psb_s_csr_sparse_mat
!! \extends psb_s_base_mat_mod::psb_s_base_sparse_mat
!!
!! psb_s_csr_sparse_mat type and the related methods.
!! This is a very common storage type, and is the default for assembled
!! matrices in our library
type, extends(psb_s_base_sparse_mat) :: psb_s_csr_sparse_mat type, extends(psb_s_base_sparse_mat) :: psb_s_csr_sparse_mat
integer(psb_ipk_), allocatable :: irp(:), ja(:) !> Pointers to beginning of rows in JA and VAL.
integer(psb_ipk_), allocatable :: irp(:)
!> Column indices.
integer(psb_ipk_), allocatable :: ja(:)
!> Coefficient values.
real(psb_spk_), allocatable :: val(:) real(psb_spk_), allocatable :: val(:)
contains contains
@ -98,6 +108,8 @@ module psb_s_csr_mat_mod
private :: s_csr_get_nzeros, s_csr_free, s_csr_get_fmt, & private :: s_csr_get_nzeros, s_csr_free, s_csr_get_fmt, &
& s_csr_get_size, s_csr_sizeof, s_csr_get_nz_row & s_csr_get_size, s_csr_sizeof, s_csr_get_nz_row
!> \memberof psb_s_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_s_csr_reallocate_nz(nz,a) subroutine psb_s_csr_reallocate_nz(nz,a)
import :: psb_ipk_, psb_s_csr_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat
@ -106,6 +118,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_reallocate_nz end subroutine psb_s_csr_reallocate_nz
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_s_csr_reinit(a,clear) subroutine psb_s_csr_reinit(a,clear)
import :: psb_ipk_, psb_s_csr_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat
@ -114,6 +128,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_reinit end subroutine psb_s_csr_reinit
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_s_csr_trim(a) subroutine psb_s_csr_trim(a)
import :: psb_ipk_, psb_s_csr_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat
@ -121,6 +137,9 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_trim end subroutine psb_s_csr_trim
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface interface
subroutine psb_s_csr_mold(a,b,info) subroutine psb_s_csr_mold(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_
@ -130,6 +149,9 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_mold end subroutine psb_s_csr_mold
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_s_csr_allocate_mnnz(m,n,a,nz) subroutine psb_s_csr_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_s_csr_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat
@ -139,6 +161,9 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_allocate_mnnz end subroutine psb_s_csr_allocate_mnnz
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_print
interface interface
subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc) subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_s_csr_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat
@ -150,6 +175,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_print end subroutine psb_s_csr_print
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo
interface interface
subroutine psb_s_cp_csr_to_coo(a,b,info) subroutine psb_s_cp_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_csr_sparse_mat import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_csr_sparse_mat
@ -159,6 +186,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_cp_csr_to_coo end subroutine psb_s_cp_csr_to_coo
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo
interface interface
subroutine psb_s_cp_csr_from_coo(a,b,info) subroutine psb_s_cp_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat
@ -168,6 +197,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_cp_csr_from_coo end subroutine psb_s_cp_csr_from_coo
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_to_fmt
interface interface
subroutine psb_s_cp_csr_to_fmt(a,b,info) subroutine psb_s_cp_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat
@ -177,6 +208,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_cp_csr_to_fmt end subroutine psb_s_cp_csr_to_fmt
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt
interface interface
subroutine psb_s_cp_csr_from_fmt(a,b,info) subroutine psb_s_cp_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat
@ -186,6 +219,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_cp_csr_from_fmt end subroutine psb_s_cp_csr_from_fmt
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo
interface interface
subroutine psb_s_mv_csr_to_coo(a,b,info) subroutine psb_s_mv_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat
@ -195,6 +230,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_mv_csr_to_coo end subroutine psb_s_mv_csr_to_coo
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo
interface interface
subroutine psb_s_mv_csr_from_coo(a,b,info) subroutine psb_s_mv_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_coo_sparse_mat
@ -204,6 +241,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_mv_csr_from_coo end subroutine psb_s_mv_csr_from_coo
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt
interface interface
subroutine psb_s_mv_csr_to_fmt(a,b,info) subroutine psb_s_mv_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat
@ -213,6 +252,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_mv_csr_to_fmt end subroutine psb_s_mv_csr_to_fmt
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt
interface interface
subroutine psb_s_mv_csr_from_fmt(a,b,info) subroutine psb_s_mv_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat import :: psb_ipk_, psb_s_csr_sparse_mat, psb_s_base_sparse_mat
@ -222,6 +263,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_mv_csr_from_fmt end subroutine psb_s_mv_csr_from_fmt
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cp_from
interface interface
subroutine psb_s_csr_cp_from(a,b) subroutine psb_s_csr_cp_from(a,b)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -230,6 +273,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_cp_from end subroutine psb_s_csr_cp_from
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_mv_from
interface interface
subroutine psb_s_csr_mv_from(a,b) subroutine psb_s_csr_mv_from(a,b)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -239,6 +284,8 @@ module psb_s_csr_mat_mod
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csput
interface interface
subroutine psb_s_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_s_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -251,6 +298,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_csput end subroutine psb_s_csr_csput
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_s_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_s_csr_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +316,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_csgetptn end subroutine psb_s_csr_csgetptn
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetrow
interface interface
subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +335,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_csgetrow end subroutine psb_s_csr_csgetrow
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csgetblk
interface interface
subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,& subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +352,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_csgetblk end subroutine psb_s_csr_csgetblk
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssv
interface interface
subroutine psb_s_csr_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_s_csr_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -308,6 +363,10 @@ module psb_s_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_s_csr_cssv end subroutine psb_s_csr_cssv
end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_cssm
interface
subroutine psb_s_csr_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_s_csr_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_csr_sparse_mat), intent(in) :: a
@ -318,6 +377,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_cssm end subroutine psb_s_csr_cssm
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmv
interface interface
subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -327,6 +388,11 @@ module psb_s_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_s_csr_csmv end subroutine psb_s_csr_csmv
end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csmm
interface
subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_s_csr_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
class(psb_s_csr_sparse_mat), intent(in) :: a class(psb_s_csr_sparse_mat), intent(in) :: a
@ -338,6 +404,8 @@ module psb_s_csr_mat_mod
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_maxval
interface interface
function psb_s_csr_maxval(a) result(res) function psb_s_csr_maxval(a) result(res)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -346,6 +414,8 @@ module psb_s_csr_mat_mod
end function psb_s_csr_maxval end function psb_s_csr_maxval
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csnmi
interface interface
function psb_s_csr_csnmi(a) result(res) function psb_s_csr_csnmi(a) result(res)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -354,6 +424,8 @@ module psb_s_csr_mat_mod
end function psb_s_csr_csnmi end function psb_s_csr_csnmi
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_csnm1
interface interface
function psb_s_csr_csnm1(a) result(res) function psb_s_csr_csnm1(a) result(res)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -362,6 +434,8 @@ module psb_s_csr_mat_mod
end function psb_s_csr_csnm1 end function psb_s_csr_csnm1
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_rowsum
interface interface
subroutine psb_s_csr_rowsum(d,a) subroutine psb_s_csr_rowsum(d,a)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -370,6 +444,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_rowsum end subroutine psb_s_csr_rowsum
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_arwsum
interface interface
subroutine psb_s_csr_arwsum(d,a) subroutine psb_s_csr_arwsum(d,a)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -378,6 +454,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_arwsum end subroutine psb_s_csr_arwsum
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_colsum
interface interface
subroutine psb_s_csr_colsum(d,a) subroutine psb_s_csr_colsum(d,a)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -386,6 +464,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_colsum end subroutine psb_s_csr_colsum
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_aclsum
interface interface
subroutine psb_s_csr_aclsum(d,a) subroutine psb_s_csr_aclsum(d,a)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -394,6 +474,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_aclsum end subroutine psb_s_csr_aclsum
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_get_diag
interface interface
subroutine psb_s_csr_get_diag(a,d,info) subroutine psb_s_csr_get_diag(a,d,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -403,6 +485,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_get_diag end subroutine psb_s_csr_get_diag
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_scal
interface interface
subroutine psb_s_csr_scal(d,a,info,side) subroutine psb_s_csr_scal(d,a,info,side)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
@ -413,6 +497,8 @@ module psb_s_csr_mat_mod
end subroutine psb_s_csr_scal end subroutine psb_s_csr_scal
end interface end interface
!> \memberof psb_s_csr_sparse_mat
!! \see psb_s_base_mat_mod::psb_s_base_scals
interface interface
subroutine psb_s_csr_scals(d,a,info) subroutine psb_s_csr_scals(d,a,info)
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_

@ -212,7 +212,7 @@ module psb_z_base_mat_mod
! == ================= ! == =================
!> Function csput: !> Function csput:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Insert coefficients. !! \brief Insert coefficients.
!! !!
!! !!
@ -261,7 +261,7 @@ module psb_z_base_mat_mod
! !
! !
!> Function csgetrow: !> Function csgetrow:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getrow is the basic method by which the other (getblk, clip) can !! getrow is the basic method by which the other (getblk, clip) can
@ -309,7 +309,7 @@ module psb_z_base_mat_mod
! !
!> Function csgetblk: !> Function csgetblk:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Get a (subset of) row(s) !! \brief Get a (subset of) row(s)
!! !!
!! getblk is very similar to getrow, except that the output !! getblk is very similar to getrow, except that the output
@ -347,7 +347,7 @@ module psb_z_base_mat_mod
! !
! !
!> Function csclip: !> Function csclip:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Get a submatrix. !! \brief Get a submatrix.
!! !!
!! csclip is practically identical to getblk. !! csclip is practically identical to getblk.
@ -381,7 +381,7 @@ module psb_z_base_mat_mod
! !
!> Function get_diag: !> Function get_diag:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Extract the diagonal of A. !! \brief Extract the diagonal of A.
!! !!
!! D(i) = A(i:i), i=1:min(nrows,ncols) !! D(i) = A(i:i), i=1:min(nrows,ncols)
@ -400,7 +400,7 @@ module psb_z_base_mat_mod
! !
!> Function mold: !> Function mold:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Allocate a class(psb_z_base_sparse_mat) with the !! \brief Allocate a class(psb_z_base_sparse_mat) with the
!! same dynamic type as the input. !! same dynamic type as the input.
!! This is equivalent to allocate( mold= ) and is provided !! This is equivalent to allocate( mold= ) and is provided
@ -420,7 +420,7 @@ module psb_z_base_mat_mod
! !
!> Function cp_to_coo: !> Function cp_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Copy and convert to psb_z_coo_sparse_mat !! \brief Copy and convert to psb_z_coo_sparse_mat
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -437,7 +437,7 @@ module psb_z_base_mat_mod
! !
!> Function cp_from_coo: !> Function cp_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Copy and convert from psb_z_coo_sparse_mat !! \brief Copy and convert from psb_z_coo_sparse_mat
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -454,7 +454,7 @@ module psb_z_base_mat_mod
! !
!> Function cp_to_fmt: !> Function cp_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Copy and convert to a class(psb_z_base_sparse_mat) !! \brief Copy and convert to a class(psb_z_base_sparse_mat)
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp). !! simply invoking a%cp_to_coo(tmp) and then b%cp_from_coo(tmp).
@ -472,7 +472,7 @@ module psb_z_base_mat_mod
! !
!> Function cp_from_fmt: !> Function cp_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Copy and convert from a class(psb_z_base_sparse_mat) !! \brief Copy and convert from a class(psb_z_base_sparse_mat)
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp). !! simply invoking b%cp_to_coo(tmp) and then a%cp_from_coo(tmp).
@ -490,7 +490,7 @@ module psb_z_base_mat_mod
! !
!> Function mv_to_coo: !> Function mv_to_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Convert to psb_z_coo_sparse_mat, freeing the source. !! \brief Convert to psb_z_coo_sparse_mat, freeing the source.
!! Invoked from the source object. !! Invoked from the source object.
!! \param b The output variable !! \param b The output variable
@ -507,7 +507,7 @@ module psb_z_base_mat_mod
! !
!> Function mv_from_coo: !> Function mv_from_coo:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Convert from psb_z_coo_sparse_mat, freeing the source. !! \brief Convert from psb_z_coo_sparse_mat, freeing the source.
!! Invoked from the target object. !! Invoked from the target object.
!! \param b The input variable !! \param b The input variable
@ -524,7 +524,7 @@ module psb_z_base_mat_mod
! !
!> Function mv_to_fmt: !> Function mv_to_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Convert to a class(psb_z_base_sparse_mat), freeing the source. !! \brief Convert to a class(psb_z_base_sparse_mat), freeing the source.
!! Invoked from the source object. Can be implemented by !! Invoked from the source object. Can be implemented by
!! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp). !! simply invoking a%mv_to_coo(tmp) and then b%mv_from_coo(tmp).
@ -542,7 +542,7 @@ module psb_z_base_mat_mod
! !
!> Function mv_from_fmt: !> Function mv_from_fmt:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Convert from a class(psb_z_base_sparse_mat), freeing the source. !! \brief Convert from a class(psb_z_base_sparse_mat), freeing the source.
!! Invoked from the target object. Can be implemented by !! Invoked from the target object. Can be implemented by
!! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp). !! simply invoking b%mv_to_coo(tmp) and then a%mv_from_coo(tmp).
@ -560,7 +560,7 @@ module psb_z_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version !! Copyout version
@ -576,7 +576,7 @@ module psb_z_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! Copyout version. !! Copyout version.
@ -592,7 +592,7 @@ module psb_z_base_mat_mod
! !
!> Function transp: !> Function transp:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Transpose. Can always be implemented by staging through a COO !! \brief Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -606,7 +606,7 @@ module psb_z_base_mat_mod
! !
!> Function transc: !> Function transc:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Conjugate Transpose. Can always be implemented by staging through a COO !! \brief Conjugate Transpose. Can always be implemented by staging through a COO
!! temporary for which transpose is very easy. !! temporary for which transpose is very easy.
!! In-place version. !! In-place version.
@ -620,7 +620,7 @@ module psb_z_base_mat_mod
! !
!> Function csmm: !> Function csmm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Product by a dense rank 2 array. !! \brief Product by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -648,7 +648,7 @@ module psb_z_base_mat_mod
end interface end interface
!> Function csmv: !> Function csmv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Product by a dense rank 1 array. !! \brief Product by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -676,7 +676,7 @@ module psb_z_base_mat_mod
end interface end interface
!> Function vect_mv: !> Function vect_mv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Product by an encapsulated array type(psb_z_vect_type) !! \brief Product by an encapsulated array type(psb_z_vect_type)
!! !!
!! Compute !! Compute
@ -713,7 +713,7 @@ module psb_z_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -745,7 +745,7 @@ module psb_z_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -779,7 +779,7 @@ module psb_z_base_mat_mod
! !
!> Function inner_vect_cssv: !> Function inner_vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_z_vect_type) !! an encapsulated array type(psb_z_vect_type)
!! !!
@ -810,7 +810,7 @@ module psb_z_base_mat_mod
! !
!> Function cssm: !> Function cssm:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Triangular system solve by a dense rank 2 array. !! \brief Triangular system solve by a dense rank 2 array.
!! !!
!! Compute !! Compute
@ -843,7 +843,7 @@ module psb_z_base_mat_mod
! !
!> Function cssv: !> Function cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Triangular system solve by a dense rank 1 array. !! \brief Triangular system solve by a dense rank 1 array.
!! !!
!! Compute !! Compute
@ -876,7 +876,7 @@ module psb_z_base_mat_mod
! !
!> Function vect_cssv: !> Function vect_cssv:
!! \memberof psb_@X_base_sparse_mat !! \memberof psb_z_base_sparse_mat
!! \brief Triangular system solve by !! \brief Triangular system solve by
!! an encapsulated array type(psb_z_vect_type) !! an encapsulated array type(psb_z_vect_type)
!! !!
@ -909,8 +909,12 @@ module psb_z_base_mat_mod
end interface end interface
! !
! Scale a matrix by a scalar or by a vector. !> Function base_scals:
! Should we handle scale on the columns?? !! \memberof psb_z_base_sparse_mat
!! \brief Scale a matrix by a single scalar value
!!
!! \param d Scaling factor
!! \param info return code
! !
interface interface
subroutine psb_z_base_scals(d,a,info) subroutine psb_z_base_scals(d,a,info)
@ -921,6 +925,15 @@ module psb_z_base_mat_mod
end subroutine psb_z_base_scals end subroutine psb_z_base_scals
end interface end interface
!
!> Function base_scal:
!! \memberof psb_z_base_sparse_mat
!! \brief Scale a matrix by a vector
!!
!! \param d(:) Scaling vector
!! \param info return code
!! \param side [L] Scale on the Left (rows) or on the Right (columns)
!
interface interface
subroutine psb_z_base_scal(d,a,info,side) subroutine psb_z_base_scal(d,a,info,side)
import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_
@ -932,7 +945,10 @@ module psb_z_base_mat_mod
end interface end interface
! !
! Maximum coefficient absolute value norm !> Function base_maxval:
!! \memberof psb_z_base_sparse_mat
!! \brief Maximum absolute value of all coefficients;
!!
! !
interface interface
function psb_z_base_maxval(a) result(res) function psb_z_base_maxval(a) result(res)
@ -943,7 +959,11 @@ module psb_z_base_mat_mod
end interface end interface
! !
! Operator infinity norm !
!> Function base_csnmi:
!! \memberof psb_z_base_sparse_mat
!! \brief Operator infinity norm
!!
! !
interface interface
function psb_z_base_csnmi(a) result(res) function psb_z_base_csnmi(a) result(res)
@ -954,7 +974,11 @@ module psb_z_base_mat_mod
end interface end interface
! !
! Operator 1-norm !
!> Function base_csnmi:
!! \memberof psb_z_base_sparse_mat
!! \brief Operator 1-norm
!!
! !
interface interface
function psb_z_base_csnm1(a) result(res) function psb_z_base_csnm1(a) result(res)
@ -965,8 +989,12 @@ module psb_z_base_mat_mod
end interface end interface
! !
! Compute sums along the rows, either !
! natural or absolute value !> Function base_rowsum:
!! \memberof psb_z_base_sparse_mat
!! \brief Sum along the rows
!! \param d(:) The output row sums
!!
! !
interface interface
subroutine psb_z_base_rowsum(d,a) subroutine psb_z_base_rowsum(d,a)
@ -976,6 +1004,12 @@ module psb_z_base_mat_mod
end subroutine psb_z_base_rowsum end subroutine psb_z_base_rowsum
end interface end interface
!
!> Function base_arwsum:
!! \memberof psb_z_base_sparse_mat
!! \brief Absolute value sum along the rows
!! \param d(:) The output row sums
!!
interface interface
subroutine psb_z_base_arwsum(d,a) subroutine psb_z_base_arwsum(d,a)
import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_
@ -985,8 +1019,12 @@ module psb_z_base_mat_mod
end interface end interface
! !
! Compute sums along the columns, either !
! natural or absolute value !> Function base_colsum:
!! \memberof psb_z_base_sparse_mat
!! \brief Sum along the columns
!! \param d(:) The output col sums
!!
! !
interface interface
subroutine psb_z_base_colsum(d,a) subroutine psb_z_base_colsum(d,a)
@ -996,6 +1034,12 @@ module psb_z_base_mat_mod
end subroutine psb_z_base_colsum end subroutine psb_z_base_colsum
end interface end interface
!
!> Function base_aclsum:
!! \memberof psb_z_base_sparse_mat
!! \brief Absolute value sum along the columns
!! \param d(:) The output col sums
!!
interface interface
subroutine psb_z_base_aclsum(d,a) subroutine psb_z_base_aclsum(d,a)
import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_
@ -1013,7 +1057,7 @@ module psb_z_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reallocate_nz !! \see psb_base_mat_mod::psb_base_reallocate_nz
! !
interface interface
@ -1026,7 +1070,7 @@ module psb_z_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_reinit !! \see psb_base_mat_mod::psb_base_reinit
! !
interface interface
@ -1038,7 +1082,7 @@ module psb_z_base_mat_mod
end interface end interface
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_trim !! \see psb_base_mat_mod::psb_base_trim
! !
interface interface
@ -1050,7 +1094,7 @@ module psb_z_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_allocate_mnnz !! \see psb_base_mat_mod::psb_base_allocate_mnnz
! !
interface interface
@ -1064,7 +1108,7 @@ module psb_z_base_mat_mod
! !
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mold !! \see psb_z_base_mat_mod::psb_z_base_mold
! !
interface interface
@ -1079,7 +1123,7 @@ module psb_z_base_mat_mod
! !
!> Function print. !> Function print.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief Print the matrix to file in MatrixMarket format
!! !!
!! \param iout The unit to write to !! \param iout The unit to write to
@ -1103,15 +1147,11 @@ module psb_z_base_mat_mod
! !
!> Function print. !> Function get_nz_row.
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \brief Print the matrix to file in MatrixMarket format !! \brief How many nonzeros in a row?
!! !!
!! \param iout The unit to write to !! \param idx The row to search.
!! \param iv [none] Renumbering for both rows and columns
!! \param head [none] Descriptive header for the file
!! \param ivr [none] Row renumbering
!! \param ivc [none] Col renumbering
!! !!
! !
interface interface
@ -1151,7 +1191,7 @@ module psb_z_base_mat_mod
! !
!> Function fix_coo !> Function fix_coo
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \brief Make sure the entries are sorted and duplicates are handled. !! \brief Make sure the entries are sorted and duplicates are handled.
!! \param info return code !! \param info return code
!! \param idir [0] Sort in: row major order (0) or col major order (1) !! \param idir [0] Sort in: row major order (0) or col major order (1)
@ -1167,7 +1207,7 @@ module psb_z_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo !! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo
interface interface
subroutine psb_z_cp_coo_to_coo(a,b,info) subroutine psb_z_cp_coo_to_coo(a,b,info)
@ -1179,7 +1219,7 @@ module psb_z_base_mat_mod
end interface end interface
!> !>
!! \memberof psb_@X_coo_sparse_mat !! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo !! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo
interface interface
subroutine psb_z_cp_coo_from_coo(a,b,info) subroutine psb_z_cp_coo_from_coo(a,b,info)
@ -1190,6 +1230,10 @@ module psb_z_base_mat_mod
end subroutine psb_z_cp_coo_from_coo end subroutine psb_z_cp_coo_from_coo
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo
!!
interface interface
subroutine psb_z_cp_coo_to_fmt(a,b,info) subroutine psb_z_cp_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat
@ -1199,6 +1243,10 @@ module psb_z_base_mat_mod
end subroutine psb_z_cp_coo_to_fmt end subroutine psb_z_cp_coo_to_fmt
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt
!!
interface interface
subroutine psb_z_cp_coo_from_fmt(a,b,info) subroutine psb_z_cp_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat
@ -1208,6 +1256,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_cp_coo_from_fmt end subroutine psb_z_cp_coo_from_fmt
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo
interface interface
subroutine psb_z_mv_coo_to_coo(a,b,info) subroutine psb_z_mv_coo_to_coo(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat
@ -1217,6 +1268,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_mv_coo_to_coo end subroutine psb_z_mv_coo_to_coo
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo
interface interface
subroutine psb_z_mv_coo_from_coo(a,b,info) subroutine psb_z_mv_coo_from_coo(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat
@ -1226,6 +1280,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_mv_coo_from_coo end subroutine psb_z_mv_coo_from_coo
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt
interface interface
subroutine psb_z_mv_coo_to_fmt(a,b,info) subroutine psb_z_mv_coo_to_fmt(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat
@ -1235,6 +1292,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_mv_coo_to_fmt end subroutine psb_z_mv_coo_to_fmt
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt
interface interface
subroutine psb_z_mv_coo_from_fmt(a,b,info) subroutine psb_z_mv_coo_from_fmt(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat
@ -1261,6 +1321,22 @@ module psb_z_base_mat_mod
end interface end interface
!> Function csput
!! \memberof psb_z_coo_sparse_mat
!! \brief Add coefficients into the matrix.
!!
!! \param nz Number of entries to be added
!! \param ia(:) Row indices
!! \param ja(:) Col indices
!! \param val(:) Values
!! \param imin Minimum row index to accept
!! \param imax Maximum row index to accept
!! \param jmin Minimum col index to accept
!! \param jmax Maximum col index to accept
!! \param info return code
!! \param gtl [none] Renumbering for rows/columns
!!
!
interface interface
subroutine psb_z_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_z_coo_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1273,6 +1349,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_csput end subroutine psb_z_coo_csput
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_z_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_z_coo_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1289,6 +1368,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_csgetptn end subroutine psb_z_coo_csgetptn
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetrow
interface interface
subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -1306,6 +1388,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_csgetrow end subroutine psb_z_coo_csgetrow
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssv
interface interface
subroutine psb_z_coo_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_z_coo_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1315,6 +1400,11 @@ module psb_z_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_z_coo_cssv end subroutine psb_z_coo_cssv
end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssm
interface
subroutine psb_z_coo_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_z_coo_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
class(psb_z_coo_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(in) :: a
@ -1325,6 +1415,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_cssm end subroutine psb_z_coo_cssm
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface interface
subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1334,6 +1427,12 @@ module psb_z_base_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_z_coo_csmv end subroutine psb_z_coo_csmv
end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmm
interface
subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_z_coo_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
class(psb_z_coo_sparse_mat), intent(in) :: a class(psb_z_coo_sparse_mat), intent(in) :: a
@ -1345,6 +1444,9 @@ module psb_z_base_mat_mod
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_maxval
interface interface
function psb_z_coo_maxval(a) result(res) function psb_z_coo_maxval(a) result(res)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1353,6 +1455,9 @@ module psb_z_base_mat_mod
end function psb_z_coo_maxval end function psb_z_coo_maxval
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csnmi
interface interface
function psb_z_coo_csnmi(a) result(res) function psb_z_coo_csnmi(a) result(res)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1361,6 +1466,9 @@ module psb_z_base_mat_mod
end function psb_z_coo_csnmi end function psb_z_coo_csnmi
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csnm1
interface interface
function psb_z_coo_csnm1(a) result(res) function psb_z_coo_csnm1(a) result(res)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1369,6 +1477,9 @@ module psb_z_base_mat_mod
end function psb_z_coo_csnm1 end function psb_z_coo_csnm1
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_rowsum
interface interface
subroutine psb_z_coo_rowsum(d,a) subroutine psb_z_coo_rowsum(d,a)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1376,7 +1487,9 @@ module psb_z_base_mat_mod
complex(psb_dpk_), intent(out) :: d(:) complex(psb_dpk_), intent(out) :: d(:)
end subroutine psb_z_coo_rowsum end subroutine psb_z_coo_rowsum
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_arwsum
interface interface
subroutine psb_z_coo_arwsum(d,a) subroutine psb_z_coo_arwsum(d,a)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1385,6 +1498,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_arwsum end subroutine psb_z_coo_arwsum
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_colsum
interface interface
subroutine psb_z_coo_colsum(d,a) subroutine psb_z_coo_colsum(d,a)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1393,6 +1509,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_colsum end subroutine psb_z_coo_colsum
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_aclsum
interface interface
subroutine psb_z_coo_aclsum(d,a) subroutine psb_z_coo_aclsum(d,a)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1401,6 +1520,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_aclsum end subroutine psb_z_coo_aclsum
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_get_diag
interface interface
subroutine psb_z_coo_get_diag(a,d,info) subroutine psb_z_coo_get_diag(a,d,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1410,6 +1532,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_get_diag end subroutine psb_z_coo_get_diag
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_scal
interface interface
subroutine psb_z_coo_scal(d,a,info,side) subroutine psb_z_coo_scal(d,a,info,side)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
@ -1420,6 +1545,9 @@ module psb_z_base_mat_mod
end subroutine psb_z_coo_scal end subroutine psb_z_coo_scal
end interface end interface
!>
!! \memberof psb_z_coo_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_scals
interface interface
subroutine psb_z_coo_scals(d,a,info) subroutine psb_z_coo_scals(d,a,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_

@ -45,9 +45,18 @@ module psb_z_csc_mat_mod
use psb_z_base_mat_mod use psb_z_base_mat_mod
!> \namespace psb_base_mod \class psb_z_csc_sparse_mat
!! \extends psb_z_base_mat_mod::psb_z_base_sparse_mat
!!
!! psb_z_csc_sparse_mat type and the related methods.
!!
type, extends(psb_z_base_sparse_mat) :: psb_z_csc_sparse_mat type, extends(psb_z_base_sparse_mat) :: psb_z_csc_sparse_mat
integer(psb_ipk_), allocatable :: icp(:), ia(:) !> Pointers to beginning of cols in IA and VAL.
integer(psb_ipk_), allocatable :: icp(:)
!> Row indices.
integer(psb_ipk_), allocatable :: ia(:)
!> Coefficient values.
complex(psb_dpk_), allocatable :: val(:) complex(psb_dpk_), allocatable :: val(:)
contains contains
@ -98,6 +107,8 @@ module psb_z_csc_mat_mod
private :: z_csc_get_nzeros, z_csc_free, z_csc_get_fmt, & private :: z_csc_get_nzeros, z_csc_free, z_csc_get_fmt, &
& z_csc_get_size, z_csc_sizeof, z_csc_get_nz_col & z_csc_get_size, z_csc_sizeof, z_csc_get_nz_col
!> \memberof psb_z_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_z_csc_reallocate_nz(nz,a) subroutine psb_z_csc_reallocate_nz(nz,a)
import :: psb_ipk_, psb_z_csc_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat
@ -106,6 +117,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_reallocate_nz end subroutine psb_z_csc_reallocate_nz
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_z_csc_reinit(a,clear) subroutine psb_z_csc_reinit(a,clear)
import :: psb_ipk_, psb_z_csc_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat
@ -114,6 +127,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_reinit end subroutine psb_z_csc_reinit
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_z_csc_trim(a) subroutine psb_z_csc_trim(a)
import :: psb_ipk_, psb_z_csc_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat
@ -121,6 +136,20 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_trim end subroutine psb_z_csc_trim
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface
subroutine psb_z_csc_mold(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_
class(psb_z_csc_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_csc_mold
end interface
!> \memberof psb_z_csc_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_z_csc_allocate_mnnz(m,n,a,nz) subroutine psb_z_csc_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_z_csc_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat
@ -130,15 +159,9 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_allocate_mnnz end subroutine psb_z_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_z_csc_mold(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_
class(psb_z_csc_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_csc_mold
end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_print
interface interface
subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc) subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_z_csc_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat
@ -150,6 +173,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_print end subroutine psb_z_csc_print
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo
interface interface
subroutine psb_z_cp_csc_to_coo(a,b,info) subroutine psb_z_cp_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_csc_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_csc_sparse_mat
@ -159,6 +184,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_cp_csc_to_coo end subroutine psb_z_cp_csc_to_coo
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo
interface interface
subroutine psb_z_cp_csc_from_coo(a,b,info) subroutine psb_z_cp_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat
@ -168,6 +195,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_cp_csc_from_coo end subroutine psb_z_cp_csc_from_coo
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_to_fmt
interface interface
subroutine psb_z_cp_csc_to_fmt(a,b,info) subroutine psb_z_cp_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat
@ -177,6 +206,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_cp_csc_to_fmt end subroutine psb_z_cp_csc_to_fmt
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt
interface interface
subroutine psb_z_cp_csc_from_fmt(a,b,info) subroutine psb_z_cp_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat
@ -186,6 +217,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_cp_csc_from_fmt end subroutine psb_z_cp_csc_from_fmt
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo
interface interface
subroutine psb_z_mv_csc_to_coo(a,b,info) subroutine psb_z_mv_csc_to_coo(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat
@ -195,6 +228,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_mv_csc_to_coo end subroutine psb_z_mv_csc_to_coo
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo
interface interface
subroutine psb_z_mv_csc_from_coo(a,b,info) subroutine psb_z_mv_csc_from_coo(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_coo_sparse_mat
@ -204,6 +239,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_mv_csc_from_coo end subroutine psb_z_mv_csc_from_coo
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt
interface interface
subroutine psb_z_mv_csc_to_fmt(a,b,info) subroutine psb_z_mv_csc_to_fmt(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat
@ -213,6 +250,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_mv_csc_to_fmt end subroutine psb_z_mv_csc_to_fmt
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt
interface interface
subroutine psb_z_mv_csc_from_fmt(a,b,info) subroutine psb_z_mv_csc_from_fmt(a,b,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csc_sparse_mat, psb_z_base_sparse_mat
@ -222,6 +261,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_mv_csc_from_fmt end subroutine psb_z_mv_csc_from_fmt
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from
interface interface
subroutine psb_z_csc_cp_from(a,b) subroutine psb_z_csc_cp_from(a,b)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -230,6 +271,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_cp_from end subroutine psb_z_csc_cp_from
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from
interface interface
subroutine psb_z_csc_mv_from(a,b) subroutine psb_z_csc_mv_from(a,b)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -239,6 +282,8 @@ module psb_z_csc_mat_mod
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csput
interface interface
subroutine psb_z_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_z_csc_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -251,6 +296,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_csput end subroutine psb_z_csc_csput
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_z_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_z_csc_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +314,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_csgetptn end subroutine psb_z_csc_csgetptn
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetrow
interface interface
subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +333,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_csgetrow end subroutine psb_z_csc_csgetrow
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetblk
interface interface
subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,& subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +350,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_csgetblk end subroutine psb_z_csc_csgetblk
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssv
interface interface
subroutine psb_z_csc_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_z_csc_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -308,6 +361,10 @@ module psb_z_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_z_csc_cssv end subroutine psb_z_csc_cssv
end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssm
interface
subroutine psb_z_csc_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_z_csc_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_csc_sparse_mat), intent(in) :: a
@ -318,6 +375,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_cssm end subroutine psb_z_csc_cssm
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface interface
subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -327,6 +386,11 @@ module psb_z_csc_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_z_csc_csmv end subroutine psb_z_csc_csmv
end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmm
interface
subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_z_csc_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
class(psb_z_csc_sparse_mat), intent(in) :: a class(psb_z_csc_sparse_mat), intent(in) :: a
@ -338,6 +402,8 @@ module psb_z_csc_mat_mod
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_maxval
interface interface
function psb_z_csc_maxval(a) result(res) function psb_z_csc_maxval(a) result(res)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -346,6 +412,8 @@ module psb_z_csc_mat_mod
end function psb_z_csc_maxval end function psb_z_csc_maxval
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csnmi
interface interface
function psb_z_csc_csnmi(a) result(res) function psb_z_csc_csnmi(a) result(res)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -354,6 +422,8 @@ module psb_z_csc_mat_mod
end function psb_z_csc_csnmi end function psb_z_csc_csnmi
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csnm1
interface interface
function psb_z_csc_csnm1(a) result(res) function psb_z_csc_csnm1(a) result(res)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -362,6 +432,8 @@ module psb_z_csc_mat_mod
end function psb_z_csc_csnm1 end function psb_z_csc_csnm1
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_rowsum
interface interface
subroutine psb_z_csc_rowsum(d,a) subroutine psb_z_csc_rowsum(d,a)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -370,6 +442,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_rowsum end subroutine psb_z_csc_rowsum
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_arwsum
interface interface
subroutine psb_z_csc_arwsum(d,a) subroutine psb_z_csc_arwsum(d,a)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -378,6 +452,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_arwsum end subroutine psb_z_csc_arwsum
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_colsum
interface interface
subroutine psb_z_csc_colsum(d,a) subroutine psb_z_csc_colsum(d,a)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -386,6 +462,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_colsum end subroutine psb_z_csc_colsum
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_aclsum
interface interface
subroutine psb_z_csc_aclsum(d,a) subroutine psb_z_csc_aclsum(d,a)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -394,6 +472,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_aclsum end subroutine psb_z_csc_aclsum
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_get_diag
interface interface
subroutine psb_z_csc_get_diag(a,d,info) subroutine psb_z_csc_get_diag(a,d,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -403,6 +483,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_get_diag end subroutine psb_z_csc_get_diag
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_scal
interface interface
subroutine psb_z_csc_scal(d,a,info,side) subroutine psb_z_csc_scal(d,a,info,side)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
@ -413,6 +495,8 @@ module psb_z_csc_mat_mod
end subroutine psb_z_csc_scal end subroutine psb_z_csc_scal
end interface end interface
!> \memberof psb_z_csc_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_scals
interface interface
subroutine psb_z_csc_scals(d,a,info) subroutine psb_z_csc_scals(d,a,info)
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_

@ -45,9 +45,19 @@ module psb_z_csr_mat_mod
use psb_z_base_mat_mod use psb_z_base_mat_mod
!> \namespace psb_base_mod \class psb_z_csr_sparse_mat
!! \extends psb_z_base_mat_mod::psb_z_base_sparse_mat
!!
!! psb_z_csr_sparse_mat type and the related methods.
!! This is a very common storage type, and is the default for assembled
!! matrices in our library
type, extends(psb_z_base_sparse_mat) :: psb_z_csr_sparse_mat type, extends(psb_z_base_sparse_mat) :: psb_z_csr_sparse_mat
integer(psb_ipk_), allocatable :: irp(:), ja(:) !> Pointers to beginning of rows in JA and VAL.
integer(psb_ipk_), allocatable :: irp(:)
!> Column indices.
integer(psb_ipk_), allocatable :: ja(:)
!> Coefficient values.
complex(psb_dpk_), allocatable :: val(:) complex(psb_dpk_), allocatable :: val(:)
contains contains
@ -98,6 +108,8 @@ module psb_z_csr_mat_mod
private :: z_csr_get_nzeros, z_csr_free, z_csr_get_fmt, & private :: z_csr_get_nzeros, z_csr_free, z_csr_get_fmt, &
& z_csr_get_size, z_csr_sizeof, z_csr_get_nz_row & z_csr_get_size, z_csr_sizeof, z_csr_get_nz_row
!> \memberof psb_z_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reallocate_nz
interface interface
subroutine psb_z_csr_reallocate_nz(nz,a) subroutine psb_z_csr_reallocate_nz(nz,a)
import :: psb_ipk_, psb_z_csr_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat
@ -106,6 +118,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_reallocate_nz end subroutine psb_z_csr_reallocate_nz
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_reinit
interface interface
subroutine psb_z_csr_reinit(a,clear) subroutine psb_z_csr_reinit(a,clear)
import :: psb_ipk_, psb_z_csr_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat
@ -114,6 +128,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_reinit end subroutine psb_z_csr_reinit
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_trim
interface interface
subroutine psb_z_csr_trim(a) subroutine psb_z_csr_trim(a)
import :: psb_ipk_, psb_z_csr_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat
@ -121,6 +137,9 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_trim end subroutine psb_z_csr_trim
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_mold
interface interface
subroutine psb_z_csr_mold(a,b,info) subroutine psb_z_csr_mold(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_
@ -130,6 +149,9 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_mold end subroutine psb_z_csr_mold
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!| \see psb_base_mat_mod::psb_base_allocate_mnnz
interface interface
subroutine psb_z_csr_allocate_mnnz(m,n,a,nz) subroutine psb_z_csr_allocate_mnnz(m,n,a,nz)
import :: psb_ipk_, psb_z_csr_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat
@ -139,6 +161,9 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_allocate_mnnz end subroutine psb_z_csr_allocate_mnnz
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_print
interface interface
subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc) subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc)
import :: psb_ipk_, psb_z_csr_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat
@ -150,6 +175,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_print end subroutine psb_z_csr_print
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo
interface interface
subroutine psb_z_cp_csr_to_coo(a,b,info) subroutine psb_z_cp_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_csr_sparse_mat import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_csr_sparse_mat
@ -159,6 +186,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_cp_csr_to_coo end subroutine psb_z_cp_csr_to_coo
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo
interface interface
subroutine psb_z_cp_csr_from_coo(a,b,info) subroutine psb_z_cp_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat
@ -168,6 +197,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_cp_csr_from_coo end subroutine psb_z_cp_csr_from_coo
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_to_fmt
interface interface
subroutine psb_z_cp_csr_to_fmt(a,b,info) subroutine psb_z_cp_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat
@ -177,6 +208,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_cp_csr_to_fmt end subroutine psb_z_cp_csr_to_fmt
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt
interface interface
subroutine psb_z_cp_csr_from_fmt(a,b,info) subroutine psb_z_cp_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat
@ -186,6 +219,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_cp_csr_from_fmt end subroutine psb_z_cp_csr_from_fmt
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo
interface interface
subroutine psb_z_mv_csr_to_coo(a,b,info) subroutine psb_z_mv_csr_to_coo(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat
@ -195,6 +230,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_mv_csr_to_coo end subroutine psb_z_mv_csr_to_coo
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo
interface interface
subroutine psb_z_mv_csr_from_coo(a,b,info) subroutine psb_z_mv_csr_from_coo(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_coo_sparse_mat
@ -204,6 +241,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_mv_csr_from_coo end subroutine psb_z_mv_csr_from_coo
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt
interface interface
subroutine psb_z_mv_csr_to_fmt(a,b,info) subroutine psb_z_mv_csr_to_fmt(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat
@ -213,6 +252,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_mv_csr_to_fmt end subroutine psb_z_mv_csr_to_fmt
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt
interface interface
subroutine psb_z_mv_csr_from_fmt(a,b,info) subroutine psb_z_mv_csr_from_fmt(a,b,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat import :: psb_ipk_, psb_z_csr_sparse_mat, psb_z_base_sparse_mat
@ -222,6 +263,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_mv_csr_from_fmt end subroutine psb_z_mv_csr_from_fmt
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cp_from
interface interface
subroutine psb_z_csr_cp_from(a,b) subroutine psb_z_csr_cp_from(a,b)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -230,6 +273,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_cp_from end subroutine psb_z_csr_cp_from
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_mv_from
interface interface
subroutine psb_z_csr_mv_from(a,b) subroutine psb_z_csr_mv_from(a,b)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -239,6 +284,8 @@ module psb_z_csr_mat_mod
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csput
interface interface
subroutine psb_z_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl) subroutine psb_z_csr_csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -251,6 +298,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_csput end subroutine psb_z_csr_csput
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_base_mat_mod::psb_base_csgetptn
interface interface
subroutine psb_z_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& subroutine psb_z_csr_csgetptn(imin,imax,a,nz,ia,ja,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -267,6 +316,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_csgetptn end subroutine psb_z_csr_csgetptn
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetrow
interface interface
subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale) & jmin,jmax,iren,append,nzin,rscale,cscale)
@ -284,6 +335,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_csgetrow end subroutine psb_z_csr_csgetrow
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csgetblk
interface interface
subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,& subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,&
& jmin,jmax,iren,append,rscale,cscale) & jmin,jmax,iren,append,rscale,cscale)
@ -299,6 +352,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_csgetblk end subroutine psb_z_csr_csgetblk
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssv
interface interface
subroutine psb_z_csr_cssv(alpha,a,x,beta,y,info,trans) subroutine psb_z_csr_cssv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -308,6 +363,10 @@ module psb_z_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_z_csr_cssv end subroutine psb_z_csr_cssv
end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_cssm
interface
subroutine psb_z_csr_cssm(alpha,a,x,beta,y,info,trans) subroutine psb_z_csr_cssm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_csr_sparse_mat), intent(in) :: a
@ -318,6 +377,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_cssm end subroutine psb_z_csr_cssm
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmv
interface interface
subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans) subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -327,6 +388,11 @@ module psb_z_csr_mat_mod
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
character, optional, intent(in) :: trans character, optional, intent(in) :: trans
end subroutine psb_z_csr_csmv end subroutine psb_z_csr_csmv
end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csmm
interface
subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans) subroutine psb_z_csr_csmm(alpha,a,x,beta,y,info,trans)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
class(psb_z_csr_sparse_mat), intent(in) :: a class(psb_z_csr_sparse_mat), intent(in) :: a
@ -338,6 +404,8 @@ module psb_z_csr_mat_mod
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_maxval
interface interface
function psb_z_csr_maxval(a) result(res) function psb_z_csr_maxval(a) result(res)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -346,6 +414,8 @@ module psb_z_csr_mat_mod
end function psb_z_csr_maxval end function psb_z_csr_maxval
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csnmi
interface interface
function psb_z_csr_csnmi(a) result(res) function psb_z_csr_csnmi(a) result(res)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -354,6 +424,8 @@ module psb_z_csr_mat_mod
end function psb_z_csr_csnmi end function psb_z_csr_csnmi
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_csnm1
interface interface
function psb_z_csr_csnm1(a) result(res) function psb_z_csr_csnm1(a) result(res)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -362,6 +434,8 @@ module psb_z_csr_mat_mod
end function psb_z_csr_csnm1 end function psb_z_csr_csnm1
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_rowsum
interface interface
subroutine psb_z_csr_rowsum(d,a) subroutine psb_z_csr_rowsum(d,a)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -370,6 +444,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_rowsum end subroutine psb_z_csr_rowsum
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_arwsum
interface interface
subroutine psb_z_csr_arwsum(d,a) subroutine psb_z_csr_arwsum(d,a)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -378,6 +454,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_arwsum end subroutine psb_z_csr_arwsum
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_colsum
interface interface
subroutine psb_z_csr_colsum(d,a) subroutine psb_z_csr_colsum(d,a)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -386,6 +464,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_colsum end subroutine psb_z_csr_colsum
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_aclsum
interface interface
subroutine psb_z_csr_aclsum(d,a) subroutine psb_z_csr_aclsum(d,a)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -394,6 +474,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_aclsum end subroutine psb_z_csr_aclsum
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_get_diag
interface interface
subroutine psb_z_csr_get_diag(a,d,info) subroutine psb_z_csr_get_diag(a,d,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -403,6 +485,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_get_diag end subroutine psb_z_csr_get_diag
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_scal
interface interface
subroutine psb_z_csr_scal(d,a,info,side) subroutine psb_z_csr_scal(d,a,info,side)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
@ -413,6 +497,8 @@ module psb_z_csr_mat_mod
end subroutine psb_z_csr_scal end subroutine psb_z_csr_scal
end interface end interface
!> \memberof psb_z_csr_sparse_mat
!! \see psb_z_base_mat_mod::psb_z_base_scals
interface interface
subroutine psb_z_csr_scals(d,a,info) subroutine psb_z_csr_scals(d,a,info)
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_

Loading…
Cancel
Save