From 5d0b00240be02b14dc6a0cde1880eaea3b498d3d Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 25 Feb 2012 17:17:52 +0000 Subject: [PATCH] psblas3: 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. --- base/modules/psb_c_base_mat_mod.f90 | 238 +++++++++++++++++++++------- base/modules/psb_c_csc_mat_mod.f90 | 104 ++++++++++-- base/modules/psb_c_csr_mat_mod.f90 | 88 +++++++++- base/modules/psb_d_base_mat_mod.f90 | 238 +++++++++++++++++++++------- base/modules/psb_d_csc_mat_mod.f90 | 104 ++++++++++-- base/modules/psb_d_csr_mat_mod.f90 | 88 +++++++++- base/modules/psb_s_base_mat_mod.f90 | 238 +++++++++++++++++++++------- base/modules/psb_s_csc_mat_mod.f90 | 104 ++++++++++-- base/modules/psb_s_csr_mat_mod.f90 | 88 +++++++++- base/modules/psb_z_base_mat_mod.f90 | 238 +++++++++++++++++++++------- base/modules/psb_z_csc_mat_mod.f90 | 104 ++++++++++-- base/modules/psb_z_csr_mat_mod.f90 | 88 +++++++++- 12 files changed, 1456 insertions(+), 264 deletions(-) diff --git a/base/modules/psb_c_base_mat_mod.f90 b/base/modules/psb_c_base_mat_mod.f90 index 8a6902f5..b66a66bd 100644 --- a/base/modules/psb_c_base_mat_mod.f90 +++ b/base/modules/psb_c_base_mat_mod.f90 @@ -212,7 +212,7 @@ module psb_c_base_mat_mod ! == ================= !> Function csput: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Insert coefficients. !! !! @@ -261,7 +261,7 @@ module psb_c_base_mat_mod ! ! !> Function csgetrow: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getrow is the basic method by which the other (getblk, clip) can @@ -309,7 +309,7 @@ module psb_c_base_mat_mod ! !> Function csgetblk: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getblk is very similar to getrow, except that the output @@ -347,7 +347,7 @@ module psb_c_base_mat_mod ! ! !> Function csclip: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Get a submatrix. !! !! csclip is practically identical to getblk. @@ -381,7 +381,7 @@ module psb_c_base_mat_mod ! !> Function get_diag: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Extract the diagonal of A. !! !! D(i) = A(i:i), i=1:min(nrows,ncols) @@ -400,7 +400,7 @@ module psb_c_base_mat_mod ! !> 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 !! same dynamic type as the input. !! This is equivalent to allocate( mold= ) and is provided @@ -420,7 +420,7 @@ module psb_c_base_mat_mod ! !> 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 !! Invoked from the source object. !! \param b The output variable @@ -437,7 +437,7 @@ module psb_c_base_mat_mod ! !> 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 !! Invoked from the target object. !! \param b The input variable @@ -454,7 +454,7 @@ module psb_c_base_mat_mod ! !> 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) !! Invoked from the source object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof 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 !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Convert to psb_c_coo_sparse_mat, freeing the source. !! Invoked from the source object. !! \param b The output variable @@ -507,7 +507,7 @@ module psb_c_base_mat_mod ! !> 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. !! Invoked from the target object. !! \param b The input variable @@ -524,7 +524,7 @@ module psb_c_base_mat_mod ! !> 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. !! Invoked from the source object. Can be implemented by !! 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: - !! \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. !! Invoked from the target object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Transpose. Can always be implemented by staging through a COO !! temporary for which transpose is very easy. !! Copyout version @@ -576,7 +576,7 @@ module psb_c_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! Copyout version. @@ -592,7 +592,7 @@ module psb_c_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -606,7 +606,7 @@ module psb_c_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -620,7 +620,7 @@ module psb_c_base_mat_mod ! !> Function csmm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Product by a dense rank 2 array. !! !! Compute @@ -648,7 +648,7 @@ module psb_c_base_mat_mod end interface !> Function csmv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Product by a dense rank 1 array. !! !! Compute @@ -676,7 +676,7 @@ module psb_c_base_mat_mod end interface !> 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) !! !! Compute @@ -713,7 +713,7 @@ module psb_c_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -745,7 +745,7 @@ module psb_c_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -779,7 +779,7 @@ module psb_c_base_mat_mod ! !> Function inner_vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_c_vect_type) !! @@ -810,7 +810,7 @@ module psb_c_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -843,7 +843,7 @@ module psb_c_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -876,7 +876,7 @@ module psb_c_base_mat_mod ! !> Function vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_c_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_c_vect_type) !! @@ -909,8 +909,12 @@ module psb_c_base_mat_mod end interface ! - ! Scale a matrix by a scalar or by a vector. - ! Should we handle scale on the columns?? + !> Function base_scals: + !! \memberof psb_c_base_sparse_mat + !! \brief Scale a matrix by a single scalar value + !! + !! \param d Scaling factor + !! \param info return code ! interface 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 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 subroutine psb_c_base_scal(d,a,info,side) import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_ @@ -932,7 +945,10 @@ module psb_c_base_mat_mod end interface ! - ! Maximum coefficient absolute value norm + !> Function base_maxval: + !! \memberof psb_c_base_sparse_mat + !! \brief Maximum absolute value of all coefficients; + !! ! interface function psb_c_base_maxval(a) result(res) @@ -943,7 +959,11 @@ module psb_c_base_mat_mod end interface ! - ! Operator infinity norm + ! + !> Function base_csnmi: + !! \memberof psb_c_base_sparse_mat + !! \brief Operator infinity norm + !! ! interface function psb_c_base_csnmi(a) result(res) @@ -954,7 +974,11 @@ module psb_c_base_mat_mod end interface ! - ! Operator 1-norm + ! + !> Function base_csnmi: + !! \memberof psb_c_base_sparse_mat + !! \brief Operator 1-norm + !! ! interface function psb_c_base_csnm1(a) result(res) @@ -965,8 +989,12 @@ module psb_c_base_mat_mod 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 subroutine psb_c_base_rowsum(d,a) @@ -976,6 +1004,12 @@ module psb_c_base_mat_mod end subroutine psb_c_base_rowsum 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 subroutine psb_c_base_arwsum(d,a) import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_ @@ -985,8 +1019,12 @@ module psb_c_base_mat_mod 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 subroutine psb_c_base_colsum(d,a) @@ -996,6 +1034,12 @@ module psb_c_base_mat_mod end subroutine psb_c_base_colsum 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 subroutine psb_c_base_aclsum(d,a) 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 ! 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 ! interface @@ -1038,7 +1082,7 @@ module psb_c_base_mat_mod end interface ! !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_c_coo_sparse_mat !! \see psb_base_mat_mod::psb_base_trim ! 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 ! 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 ! interface @@ -1079,7 +1123,7 @@ module psb_c_base_mat_mod ! !> Function print. - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_c_coo_sparse_mat !! \brief Print the matrix to file in MatrixMarket format !! !! \param iout The unit to write to @@ -1103,15 +1147,11 @@ module psb_c_base_mat_mod ! - !> Function print. - !! \memberof psb_@X_coo_sparse_mat - !! \brief Print the matrix to file in MatrixMarket format + !> Function get_nz_row. + !! \memberof psb_c_coo_sparse_mat + !! \brief How many nonzeros in a row? !! - !! \param iout The unit to write to - !! \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 + !! \param idx The row to search. !! ! interface @@ -1151,7 +1191,7 @@ module psb_c_base_mat_mod ! !> 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. !! \param info return code !! \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 !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_c_coo_sparse_mat !! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo interface subroutine psb_c_cp_coo_to_coo(a,b,info) @@ -1179,7 +1219,7 @@ module psb_c_base_mat_mod 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 interface 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo + !! interface subroutine psb_c_cp_coo_to_fmt(a,b,info) import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat @@ -1199,7 +1243,11 @@ module psb_c_base_mat_mod end subroutine psb_c_cp_coo_to_fmt end interface - interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt + !! + interface subroutine psb_c_cp_coo_from_fmt(a,b,info) import :: psb_ipk_, psb_c_coo_sparse_mat, psb_c_base_sparse_mat class(psb_c_coo_sparse_mat), intent(inout) :: a @@ -1208,6 +1256,9 @@ module psb_c_base_mat_mod end subroutine psb_c_cp_coo_from_fmt end interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo interface subroutine psb_c_mv_coo_to_coo(a,b,info) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo interface subroutine psb_c_mv_coo_from_coo(a,b,info) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt interface subroutine psb_c_mv_coo_to_fmt(a,b,info) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt interface subroutine psb_c_mv_coo_from_fmt(a,b,info) 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 + !> 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 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_ @@ -1273,6 +1349,9 @@ module psb_c_base_mat_mod end subroutine psb_c_coo_csput end interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_c_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1289,6 +1368,9 @@ module psb_c_base_mat_mod end subroutine psb_c_coo_csgetptn end interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csgetrow interface subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1306,6 +1388,9 @@ module psb_c_base_mat_mod end subroutine psb_c_coo_csgetrow end interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cssv interface subroutine psb_c_coo_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csmv interface subroutine psb_c_coo_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ class(psb_c_coo_sparse_mat), intent(in) :: a @@ -1345,6 +1444,9 @@ module psb_c_base_mat_mod end interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_maxval interface function psb_c_coo_maxval(a) result(res) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csnmi interface function psb_c_coo_csnmi(a) result(res) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csnm1 interface function psb_c_coo_csnm1(a) result(res) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_rowsum interface subroutine psb_c_coo_rowsum(d,a) 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(:) end subroutine psb_c_coo_rowsum end interface - + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_arwsum interface subroutine psb_c_coo_arwsum(d,a) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_colsum interface subroutine psb_c_coo_colsum(d,a) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_aclsum interface subroutine psb_c_coo_aclsum(d,a) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_get_diag interface subroutine psb_c_coo_get_diag(a,d,info) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_scal interface subroutine psb_c_coo_scal(d,a,info,side) 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 interface + !> + !! \memberof psb_c_coo_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_scals interface subroutine psb_c_coo_scals(d,a,info) import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_ diff --git a/base/modules/psb_c_csc_mat_mod.f90 b/base/modules/psb_c_csc_mat_mod.f90 index 5df5a8ca..0d4cc78f 100644 --- a/base/modules/psb_c_csc_mat_mod.f90 +++ b/base/modules/psb_c_csc_mat_mod.f90 @@ -45,9 +45,18 @@ module psb_c_csc_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 - 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(:) contains @@ -98,6 +107,8 @@ module psb_c_csc_mat_mod private :: c_csc_get_nzeros, c_csc_free, c_csc_get_fmt, & & 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 subroutine psb_c_csc_reallocate_nz(nz,a) 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 interface + !> \memberof psb_c_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_c_csc_reinit(a,clear) 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 interface + !> \memberof psb_c_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_c_csc_trim(a) import :: psb_ipk_, psb_c_csc_sparse_mat @@ -121,15 +136,8 @@ module psb_c_csc_mat_mod end subroutine psb_c_csc_trim end interface - interface - subroutine psb_c_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_c_csc_sparse_mat - integer(psb_ipk_), intent(in) :: m,n - class(psb_c_csc_sparse_mat), intent(inout) :: a - integer(psb_ipk_), intent(in), optional :: nz - end subroutine psb_c_csc_allocate_mnnz - 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_ @@ -139,6 +147,21 @@ module psb_c_csc_mat_mod end subroutine psb_c_csc_mold end interface + + !> \memberof psb_c_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz + interface + subroutine psb_c_csc_allocate_mnnz(m,n,a,nz) + import :: psb_ipk_, psb_c_csc_sparse_mat + integer(psb_ipk_), intent(in) :: m,n + class(psb_c_csc_sparse_mat), intent(inout) :: a + integer(psb_ipk_), intent(in), optional :: nz + end subroutine psb_c_csc_allocate_mnnz + end interface + + + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_print interface subroutine psb_c_csc_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo interface subroutine psb_c_cp_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo interface subroutine psb_c_cp_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_to_fmt interface subroutine psb_c_cp_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt interface subroutine psb_c_cp_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo interface subroutine psb_c_mv_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo interface subroutine psb_c_mv_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt interface subroutine psb_c_mv_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt interface subroutine psb_c_mv_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from interface subroutine psb_c_csc_cp_from(a,b) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from interface subroutine psb_c_csc_mv_from(a,b) import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ @@ -239,6 +282,8 @@ module psb_c_csc_mat_mod end interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csput interface 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_ @@ -251,6 +296,8 @@ module psb_c_csc_mat_mod end subroutine psb_c_csc_csput end interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_c_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +314,8 @@ module psb_c_csc_mat_mod end subroutine psb_c_csc_csgetptn end interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csgetrow interface subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +333,8 @@ module psb_c_csc_mat_mod end subroutine psb_c_csc_csgetrow end interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csgetblk interface subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +350,8 @@ module psb_c_csc_mat_mod end subroutine psb_c_csc_csgetblk end interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cssv interface subroutine psb_c_csc_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csmv interface subroutine psb_c_csc_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ class(psb_c_csc_sparse_mat), intent(in) :: a @@ -338,6 +402,8 @@ module psb_c_csc_mat_mod end interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_maxval interface function psb_c_csc_maxval(a) result(res) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csnmi interface function psb_c_csc_csnmi(a) result(res) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csnm1 interface function psb_c_csc_csnm1(a) result(res) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_rowsum interface subroutine psb_c_csc_rowsum(d,a) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_arwsum interface subroutine psb_c_csc_arwsum(d,a) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_colsum interface subroutine psb_c_csc_colsum(d,a) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_aclsum interface subroutine psb_c_csc_aclsum(d,a) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_get_diag interface subroutine psb_c_csc_get_diag(a,d,info) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_scal interface subroutine psb_c_csc_scal(d,a,info,side) 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 interface + !> \memberof psb_c_csc_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_scals interface subroutine psb_c_csc_scals(d,a,info) import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_ diff --git a/base/modules/psb_c_csr_mat_mod.f90 b/base/modules/psb_c_csr_mat_mod.f90 index 9f992bd5..083a701e 100644 --- a/base/modules/psb_c_csr_mat_mod.f90 +++ b/base/modules/psb_c_csr_mat_mod.f90 @@ -45,9 +45,19 @@ module psb_c_csr_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 - 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(:) contains @@ -98,6 +108,8 @@ module psb_c_csr_mat_mod private :: c_csr_get_nzeros, c_csr_free, c_csr_get_fmt, & & 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 subroutine psb_c_csr_reallocate_nz(nz,a) 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 interface + !> \memberof psb_c_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_c_csr_reinit(a,clear) import :: psb_ipk_, psb_c_csr_sparse_mat @@ -114,13 +128,18 @@ module psb_c_csr_mat_mod end subroutine psb_c_csr_reinit end interface + !> \memberof psb_c_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_c_csr_trim(a) import :: psb_ipk_, psb_c_csr_sparse_mat class(psb_c_csr_sparse_mat), intent(inout) :: a end subroutine psb_c_csr_trim end interface + + !> \memberof psb_c_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_mold interface 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_ @@ -130,6 +149,9 @@ module psb_c_csr_mat_mod end subroutine psb_c_csr_mold end interface + + !> \memberof psb_c_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_c_csr_allocate_mnnz(m,n,a,nz) import :: psb_ipk_, psb_c_csr_sparse_mat @@ -138,7 +160,10 @@ module psb_c_csr_mat_mod integer(psb_ipk_), intent(in), optional :: nz end subroutine psb_c_csr_allocate_mnnz end interface + + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_print interface subroutine psb_c_csr_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_to_coo interface subroutine psb_c_cp_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from_coo interface subroutine psb_c_cp_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_to_fmt interface subroutine psb_c_cp_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from_fmt interface subroutine psb_c_cp_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_to_coo interface subroutine psb_c_mv_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from_coo interface subroutine psb_c_mv_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_to_fmt interface subroutine psb_c_mv_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from_fmt interface subroutine psb_c_mv_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cp_from interface subroutine psb_c_csr_cp_from(a,b) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_mv_from interface subroutine psb_c_csr_mv_from(a,b) import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ @@ -239,6 +284,8 @@ module psb_c_csr_mat_mod end interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csput interface 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_ @@ -251,6 +298,8 @@ module psb_c_csr_mat_mod end subroutine psb_c_csr_csput end interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_c_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +316,8 @@ module psb_c_csr_mat_mod end subroutine psb_c_csr_csgetptn end interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csgetrow interface subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +335,8 @@ module psb_c_csr_mat_mod end subroutine psb_c_csr_csgetrow end interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csgetblk interface subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +352,8 @@ module psb_c_csr_mat_mod end subroutine psb_c_csr_csgetblk end interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_cssv interface subroutine psb_c_csr_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csmv interface subroutine psb_c_csr_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ class(psb_c_csr_sparse_mat), intent(in) :: a @@ -338,6 +404,8 @@ module psb_c_csr_mat_mod end interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_maxval interface function psb_c_csr_maxval(a) result(res) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csnmi interface function psb_c_csr_csnmi(a) result(res) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_csnm1 interface function psb_c_csr_csnm1(a) result(res) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_rowsum interface subroutine psb_c_csr_rowsum(d,a) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_arwsum interface subroutine psb_c_csr_arwsum(d,a) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_colsum interface subroutine psb_c_csr_colsum(d,a) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_aclsum interface subroutine psb_c_csr_aclsum(d,a) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_get_diag interface subroutine psb_c_csr_get_diag(a,d,info) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_scal interface subroutine psb_c_csr_scal(d,a,info,side) 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 interface + !> \memberof psb_c_csr_sparse_mat + !! \see psb_c_base_mat_mod::psb_c_base_scals interface subroutine psb_c_csr_scals(d,a,info) import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_ diff --git a/base/modules/psb_d_base_mat_mod.f90 b/base/modules/psb_d_base_mat_mod.f90 index c6c5a01a..36738bbd 100644 --- a/base/modules/psb_d_base_mat_mod.f90 +++ b/base/modules/psb_d_base_mat_mod.f90 @@ -212,7 +212,7 @@ module psb_d_base_mat_mod ! == ================= !> Function csput: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Insert coefficients. !! !! @@ -261,7 +261,7 @@ module psb_d_base_mat_mod ! ! !> Function csgetrow: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getrow is the basic method by which the other (getblk, clip) can @@ -309,7 +309,7 @@ module psb_d_base_mat_mod ! !> Function csgetblk: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getblk is very similar to getrow, except that the output @@ -347,7 +347,7 @@ module psb_d_base_mat_mod ! ! !> Function csclip: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Get a submatrix. !! !! csclip is practically identical to getblk. @@ -381,7 +381,7 @@ module psb_d_base_mat_mod ! !> Function get_diag: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Extract the diagonal of A. !! !! D(i) = A(i:i), i=1:min(nrows,ncols) @@ -400,7 +400,7 @@ module psb_d_base_mat_mod ! !> 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 !! same dynamic type as the input. !! This is equivalent to allocate( mold= ) and is provided @@ -420,7 +420,7 @@ module psb_d_base_mat_mod ! !> 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 !! Invoked from the source object. !! \param b The output variable @@ -437,7 +437,7 @@ module psb_d_base_mat_mod ! !> 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 !! Invoked from the target object. !! \param b The input variable @@ -454,7 +454,7 @@ module psb_d_base_mat_mod ! !> 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) !! Invoked from the source object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof 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 !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Convert to psb_d_coo_sparse_mat, freeing the source. !! Invoked from the source object. !! \param b The output variable @@ -507,7 +507,7 @@ module psb_d_base_mat_mod ! !> 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. !! Invoked from the target object. !! \param b The input variable @@ -524,7 +524,7 @@ module psb_d_base_mat_mod ! !> 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. !! Invoked from the source object. Can be implemented by !! 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: - !! \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. !! Invoked from the target object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Transpose. Can always be implemented by staging through a COO !! temporary for which transpose is very easy. !! Copyout version @@ -576,7 +576,7 @@ module psb_d_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! Copyout version. @@ -592,7 +592,7 @@ module psb_d_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -606,7 +606,7 @@ module psb_d_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -620,7 +620,7 @@ module psb_d_base_mat_mod ! !> Function csmm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Product by a dense rank 2 array. !! !! Compute @@ -648,7 +648,7 @@ module psb_d_base_mat_mod end interface !> Function csmv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Product by a dense rank 1 array. !! !! Compute @@ -676,7 +676,7 @@ module psb_d_base_mat_mod end interface !> 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) !! !! Compute @@ -713,7 +713,7 @@ module psb_d_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -745,7 +745,7 @@ module psb_d_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -779,7 +779,7 @@ module psb_d_base_mat_mod ! !> Function inner_vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_d_vect_type) !! @@ -810,7 +810,7 @@ module psb_d_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -843,7 +843,7 @@ module psb_d_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -876,7 +876,7 @@ module psb_d_base_mat_mod ! !> Function vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_d_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_d_vect_type) !! @@ -909,8 +909,12 @@ module psb_d_base_mat_mod end interface ! - ! Scale a matrix by a scalar or by a vector. - ! Should we handle scale on the columns?? + !> Function base_scals: + !! \memberof psb_d_base_sparse_mat + !! \brief Scale a matrix by a single scalar value + !! + !! \param d Scaling factor + !! \param info return code ! interface 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 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 subroutine psb_d_base_scal(d,a,info,side) import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_ @@ -932,7 +945,10 @@ module psb_d_base_mat_mod end interface ! - ! Maximum coefficient absolute value norm + !> Function base_maxval: + !! \memberof psb_d_base_sparse_mat + !! \brief Maximum absolute value of all coefficients; + !! ! interface function psb_d_base_maxval(a) result(res) @@ -943,7 +959,11 @@ module psb_d_base_mat_mod end interface ! - ! Operator infinity norm + ! + !> Function base_csnmi: + !! \memberof psb_d_base_sparse_mat + !! \brief Operator infinity norm + !! ! interface function psb_d_base_csnmi(a) result(res) @@ -954,7 +974,11 @@ module psb_d_base_mat_mod end interface ! - ! Operator 1-norm + ! + !> Function base_csnmi: + !! \memberof psb_d_base_sparse_mat + !! \brief Operator 1-norm + !! ! interface function psb_d_base_csnm1(a) result(res) @@ -965,8 +989,12 @@ module psb_d_base_mat_mod 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 subroutine psb_d_base_rowsum(d,a) @@ -976,6 +1004,12 @@ module psb_d_base_mat_mod end subroutine psb_d_base_rowsum 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 subroutine psb_d_base_arwsum(d,a) import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_ @@ -985,8 +1019,12 @@ module psb_d_base_mat_mod 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 subroutine psb_d_base_colsum(d,a) @@ -996,6 +1034,12 @@ module psb_d_base_mat_mod end subroutine psb_d_base_colsum 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 subroutine psb_d_base_aclsum(d,a) 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 ! 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 ! interface @@ -1038,7 +1082,7 @@ module psb_d_base_mat_mod end interface ! !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_d_coo_sparse_mat !! \see psb_base_mat_mod::psb_base_trim ! 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 ! 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 ! interface @@ -1079,7 +1123,7 @@ module psb_d_base_mat_mod ! !> Function print. - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_d_coo_sparse_mat !! \brief Print the matrix to file in MatrixMarket format !! !! \param iout The unit to write to @@ -1103,15 +1147,11 @@ module psb_d_base_mat_mod ! - !> Function print. - !! \memberof psb_@X_coo_sparse_mat - !! \brief Print the matrix to file in MatrixMarket format + !> Function get_nz_row. + !! \memberof psb_d_coo_sparse_mat + !! \brief How many nonzeros in a row? !! - !! \param iout The unit to write to - !! \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 + !! \param idx The row to search. !! ! interface @@ -1151,7 +1191,7 @@ module psb_d_base_mat_mod ! !> 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. !! \param info return code !! \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 !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_d_coo_sparse_mat !! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo interface subroutine psb_d_cp_coo_to_coo(a,b,info) @@ -1179,7 +1219,7 @@ module psb_d_base_mat_mod 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 interface 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo + !! interface subroutine psb_d_cp_coo_to_fmt(a,b,info) import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat @@ -1199,7 +1243,11 @@ module psb_d_base_mat_mod end subroutine psb_d_cp_coo_to_fmt end interface - interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt + !! + interface subroutine psb_d_cp_coo_from_fmt(a,b,info) import :: psb_ipk_, psb_d_coo_sparse_mat, psb_d_base_sparse_mat class(psb_d_coo_sparse_mat), intent(inout) :: a @@ -1208,6 +1256,9 @@ module psb_d_base_mat_mod end subroutine psb_d_cp_coo_from_fmt end interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo interface subroutine psb_d_mv_coo_to_coo(a,b,info) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo interface subroutine psb_d_mv_coo_from_coo(a,b,info) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt interface subroutine psb_d_mv_coo_to_fmt(a,b,info) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt interface subroutine psb_d_mv_coo_from_fmt(a,b,info) 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 + !> 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 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_ @@ -1273,6 +1349,9 @@ module psb_d_base_mat_mod end subroutine psb_d_coo_csput end interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_d_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1289,6 +1368,9 @@ module psb_d_base_mat_mod end subroutine psb_d_coo_csgetptn end interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csgetrow interface subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1306,6 +1388,9 @@ module psb_d_base_mat_mod end subroutine psb_d_coo_csgetrow end interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cssv interface subroutine psb_d_coo_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csmv interface subroutine psb_d_coo_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ class(psb_d_coo_sparse_mat), intent(in) :: a @@ -1345,6 +1444,9 @@ module psb_d_base_mat_mod end interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_maxval interface function psb_d_coo_maxval(a) result(res) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csnmi interface function psb_d_coo_csnmi(a) result(res) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csnm1 interface function psb_d_coo_csnm1(a) result(res) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_rowsum interface subroutine psb_d_coo_rowsum(d,a) 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(:) end subroutine psb_d_coo_rowsum end interface - + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_arwsum interface subroutine psb_d_coo_arwsum(d,a) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_colsum interface subroutine psb_d_coo_colsum(d,a) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_aclsum interface subroutine psb_d_coo_aclsum(d,a) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_get_diag interface subroutine psb_d_coo_get_diag(a,d,info) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_scal interface subroutine psb_d_coo_scal(d,a,info,side) 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 interface + !> + !! \memberof psb_d_coo_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_scals interface subroutine psb_d_coo_scals(d,a,info) import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_ diff --git a/base/modules/psb_d_csc_mat_mod.f90 b/base/modules/psb_d_csc_mat_mod.f90 index fafdd48c..24444fc4 100644 --- a/base/modules/psb_d_csc_mat_mod.f90 +++ b/base/modules/psb_d_csc_mat_mod.f90 @@ -45,9 +45,18 @@ module psb_d_csc_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 - 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(:) contains @@ -98,6 +107,8 @@ module psb_d_csc_mat_mod private :: d_csc_get_nzeros, d_csc_free, d_csc_get_fmt, & & 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 subroutine psb_d_csc_reallocate_nz(nz,a) 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 interface + !> \memberof psb_d_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_d_csc_reinit(a,clear) 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 interface + !> \memberof psb_d_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_d_csc_trim(a) import :: psb_ipk_, psb_d_csc_sparse_mat @@ -121,15 +136,8 @@ module psb_d_csc_mat_mod end subroutine psb_d_csc_trim end interface - interface - subroutine psb_d_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_d_csc_sparse_mat - integer(psb_ipk_), intent(in) :: m,n - class(psb_d_csc_sparse_mat), intent(inout) :: a - integer(psb_ipk_), intent(in), optional :: nz - end subroutine psb_d_csc_allocate_mnnz - 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_ @@ -139,6 +147,21 @@ module psb_d_csc_mat_mod end subroutine psb_d_csc_mold end interface + + !> \memberof psb_d_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz + interface + subroutine psb_d_csc_allocate_mnnz(m,n,a,nz) + import :: psb_ipk_, psb_d_csc_sparse_mat + integer(psb_ipk_), intent(in) :: m,n + class(psb_d_csc_sparse_mat), intent(inout) :: a + integer(psb_ipk_), intent(in), optional :: nz + end subroutine psb_d_csc_allocate_mnnz + end interface + + + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_print interface subroutine psb_d_csc_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo interface subroutine psb_d_cp_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo interface subroutine psb_d_cp_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_to_fmt interface subroutine psb_d_cp_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt interface subroutine psb_d_cp_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo interface subroutine psb_d_mv_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo interface subroutine psb_d_mv_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt interface subroutine psb_d_mv_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt interface subroutine psb_d_mv_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from interface subroutine psb_d_csc_cp_from(a,b) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from interface subroutine psb_d_csc_mv_from(a,b) import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ @@ -239,6 +282,8 @@ module psb_d_csc_mat_mod end interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csput interface 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_ @@ -251,6 +296,8 @@ module psb_d_csc_mat_mod end subroutine psb_d_csc_csput end interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_d_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +314,8 @@ module psb_d_csc_mat_mod end subroutine psb_d_csc_csgetptn end interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csgetrow interface subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +333,8 @@ module psb_d_csc_mat_mod end subroutine psb_d_csc_csgetrow end interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csgetblk interface subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +350,8 @@ module psb_d_csc_mat_mod end subroutine psb_d_csc_csgetblk end interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cssv interface subroutine psb_d_csc_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csmv interface subroutine psb_d_csc_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ class(psb_d_csc_sparse_mat), intent(in) :: a @@ -338,6 +402,8 @@ module psb_d_csc_mat_mod end interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_maxval interface function psb_d_csc_maxval(a) result(res) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csnmi interface function psb_d_csc_csnmi(a) result(res) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csnm1 interface function psb_d_csc_csnm1(a) result(res) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_rowsum interface subroutine psb_d_csc_rowsum(d,a) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_arwsum interface subroutine psb_d_csc_arwsum(d,a) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_colsum interface subroutine psb_d_csc_colsum(d,a) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_aclsum interface subroutine psb_d_csc_aclsum(d,a) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_get_diag interface subroutine psb_d_csc_get_diag(a,d,info) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_scal interface subroutine psb_d_csc_scal(d,a,info,side) 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 interface + !> \memberof psb_d_csc_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_scals interface subroutine psb_d_csc_scals(d,a,info) import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_ diff --git a/base/modules/psb_d_csr_mat_mod.f90 b/base/modules/psb_d_csr_mat_mod.f90 index ca4346d0..1ddc0b00 100644 --- a/base/modules/psb_d_csr_mat_mod.f90 +++ b/base/modules/psb_d_csr_mat_mod.f90 @@ -45,9 +45,19 @@ module psb_d_csr_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 - 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(:) contains @@ -98,6 +108,8 @@ module psb_d_csr_mat_mod private :: d_csr_get_nzeros, d_csr_free, d_csr_get_fmt, & & 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 subroutine psb_d_csr_reallocate_nz(nz,a) 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 interface + !> \memberof psb_d_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_d_csr_reinit(a,clear) import :: psb_ipk_, psb_d_csr_sparse_mat @@ -114,13 +128,18 @@ module psb_d_csr_mat_mod end subroutine psb_d_csr_reinit end interface + !> \memberof psb_d_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_d_csr_trim(a) import :: psb_ipk_, psb_d_csr_sparse_mat class(psb_d_csr_sparse_mat), intent(inout) :: a end subroutine psb_d_csr_trim end interface + + !> \memberof psb_d_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_mold interface 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_ @@ -130,6 +149,9 @@ module psb_d_csr_mat_mod end subroutine psb_d_csr_mold end interface + + !> \memberof psb_d_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_d_csr_allocate_mnnz(m,n,a,nz) import :: psb_ipk_, psb_d_csr_sparse_mat @@ -138,7 +160,10 @@ module psb_d_csr_mat_mod integer(psb_ipk_), intent(in), optional :: nz end subroutine psb_d_csr_allocate_mnnz end interface + + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_print interface subroutine psb_d_csr_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_to_coo interface subroutine psb_d_cp_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from_coo interface subroutine psb_d_cp_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_to_fmt interface subroutine psb_d_cp_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from_fmt interface subroutine psb_d_cp_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_to_coo interface subroutine psb_d_mv_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from_coo interface subroutine psb_d_mv_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_to_fmt interface subroutine psb_d_mv_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from_fmt interface subroutine psb_d_mv_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cp_from interface subroutine psb_d_csr_cp_from(a,b) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_mv_from interface subroutine psb_d_csr_mv_from(a,b) import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ @@ -239,6 +284,8 @@ module psb_d_csr_mat_mod end interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csput interface 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_ @@ -251,6 +298,8 @@ module psb_d_csr_mat_mod end subroutine psb_d_csr_csput end interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_d_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +316,8 @@ module psb_d_csr_mat_mod end subroutine psb_d_csr_csgetptn end interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csgetrow interface subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +335,8 @@ module psb_d_csr_mat_mod end subroutine psb_d_csr_csgetrow end interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csgetblk interface subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +352,8 @@ module psb_d_csr_mat_mod end subroutine psb_d_csr_csgetblk end interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_cssv interface subroutine psb_d_csr_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csmv interface subroutine psb_d_csr_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ class(psb_d_csr_sparse_mat), intent(in) :: a @@ -338,6 +404,8 @@ module psb_d_csr_mat_mod end interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_maxval interface function psb_d_csr_maxval(a) result(res) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csnmi interface function psb_d_csr_csnmi(a) result(res) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_csnm1 interface function psb_d_csr_csnm1(a) result(res) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_rowsum interface subroutine psb_d_csr_rowsum(d,a) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_arwsum interface subroutine psb_d_csr_arwsum(d,a) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_colsum interface subroutine psb_d_csr_colsum(d,a) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_aclsum interface subroutine psb_d_csr_aclsum(d,a) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_get_diag interface subroutine psb_d_csr_get_diag(a,d,info) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_scal interface subroutine psb_d_csr_scal(d,a,info,side) 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 interface + !> \memberof psb_d_csr_sparse_mat + !! \see psb_d_base_mat_mod::psb_d_base_scals interface subroutine psb_d_csr_scals(d,a,info) import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_ diff --git a/base/modules/psb_s_base_mat_mod.f90 b/base/modules/psb_s_base_mat_mod.f90 index ee3a9e4c..715d80f5 100644 --- a/base/modules/psb_s_base_mat_mod.f90 +++ b/base/modules/psb_s_base_mat_mod.f90 @@ -212,7 +212,7 @@ module psb_s_base_mat_mod ! == ================= !> Function csput: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Insert coefficients. !! !! @@ -261,7 +261,7 @@ module psb_s_base_mat_mod ! ! !> Function csgetrow: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getrow is the basic method by which the other (getblk, clip) can @@ -309,7 +309,7 @@ module psb_s_base_mat_mod ! !> Function csgetblk: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getblk is very similar to getrow, except that the output @@ -347,7 +347,7 @@ module psb_s_base_mat_mod ! ! !> Function csclip: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Get a submatrix. !! !! csclip is practically identical to getblk. @@ -381,7 +381,7 @@ module psb_s_base_mat_mod ! !> Function get_diag: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Extract the diagonal of A. !! !! D(i) = A(i:i), i=1:min(nrows,ncols) @@ -400,7 +400,7 @@ module psb_s_base_mat_mod ! !> 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 !! same dynamic type as the input. !! This is equivalent to allocate( mold= ) and is provided @@ -420,7 +420,7 @@ module psb_s_base_mat_mod ! !> 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 !! Invoked from the source object. !! \param b The output variable @@ -437,7 +437,7 @@ module psb_s_base_mat_mod ! !> 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 !! Invoked from the target object. !! \param b The input variable @@ -454,7 +454,7 @@ module psb_s_base_mat_mod ! !> 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) !! Invoked from the source object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof 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 !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Convert to psb_s_coo_sparse_mat, freeing the source. !! Invoked from the source object. !! \param b The output variable @@ -507,7 +507,7 @@ module psb_s_base_mat_mod ! !> 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. !! Invoked from the target object. !! \param b The input variable @@ -524,7 +524,7 @@ module psb_s_base_mat_mod ! !> 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. !! Invoked from the source object. Can be implemented by !! 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: - !! \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. !! Invoked from the target object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Transpose. Can always be implemented by staging through a COO !! temporary for which transpose is very easy. !! Copyout version @@ -576,7 +576,7 @@ module psb_s_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! Copyout version. @@ -592,7 +592,7 @@ module psb_s_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -606,7 +606,7 @@ module psb_s_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -620,7 +620,7 @@ module psb_s_base_mat_mod ! !> Function csmm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Product by a dense rank 2 array. !! !! Compute @@ -648,7 +648,7 @@ module psb_s_base_mat_mod end interface !> Function csmv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Product by a dense rank 1 array. !! !! Compute @@ -676,7 +676,7 @@ module psb_s_base_mat_mod end interface !> 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) !! !! Compute @@ -713,7 +713,7 @@ module psb_s_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -745,7 +745,7 @@ module psb_s_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -779,7 +779,7 @@ module psb_s_base_mat_mod ! !> Function inner_vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_s_vect_type) !! @@ -810,7 +810,7 @@ module psb_s_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -843,7 +843,7 @@ module psb_s_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -876,7 +876,7 @@ module psb_s_base_mat_mod ! !> Function vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_s_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_s_vect_type) !! @@ -909,8 +909,12 @@ module psb_s_base_mat_mod end interface ! - ! Scale a matrix by a scalar or by a vector. - ! Should we handle scale on the columns?? + !> Function base_scals: + !! \memberof psb_s_base_sparse_mat + !! \brief Scale a matrix by a single scalar value + !! + !! \param d Scaling factor + !! \param info return code ! interface 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 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 subroutine psb_s_base_scal(d,a,info,side) import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_ @@ -932,7 +945,10 @@ module psb_s_base_mat_mod end interface ! - ! Maximum coefficient absolute value norm + !> Function base_maxval: + !! \memberof psb_s_base_sparse_mat + !! \brief Maximum absolute value of all coefficients; + !! ! interface function psb_s_base_maxval(a) result(res) @@ -943,7 +959,11 @@ module psb_s_base_mat_mod end interface ! - ! Operator infinity norm + ! + !> Function base_csnmi: + !! \memberof psb_s_base_sparse_mat + !! \brief Operator infinity norm + !! ! interface function psb_s_base_csnmi(a) result(res) @@ -954,7 +974,11 @@ module psb_s_base_mat_mod end interface ! - ! Operator 1-norm + ! + !> Function base_csnmi: + !! \memberof psb_s_base_sparse_mat + !! \brief Operator 1-norm + !! ! interface function psb_s_base_csnm1(a) result(res) @@ -965,8 +989,12 @@ module psb_s_base_mat_mod 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 subroutine psb_s_base_rowsum(d,a) @@ -976,6 +1004,12 @@ module psb_s_base_mat_mod end subroutine psb_s_base_rowsum 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 subroutine psb_s_base_arwsum(d,a) import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_ @@ -985,8 +1019,12 @@ module psb_s_base_mat_mod 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 subroutine psb_s_base_colsum(d,a) @@ -996,6 +1034,12 @@ module psb_s_base_mat_mod end subroutine psb_s_base_colsum 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 subroutine psb_s_base_aclsum(d,a) 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 ! 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 ! interface @@ -1038,7 +1082,7 @@ module psb_s_base_mat_mod end interface ! !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_s_coo_sparse_mat !! \see psb_base_mat_mod::psb_base_trim ! 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 ! 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 ! interface @@ -1079,7 +1123,7 @@ module psb_s_base_mat_mod ! !> Function print. - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_s_coo_sparse_mat !! \brief Print the matrix to file in MatrixMarket format !! !! \param iout The unit to write to @@ -1103,15 +1147,11 @@ module psb_s_base_mat_mod ! - !> Function print. - !! \memberof psb_@X_coo_sparse_mat - !! \brief Print the matrix to file in MatrixMarket format + !> Function get_nz_row. + !! \memberof psb_s_coo_sparse_mat + !! \brief How many nonzeros in a row? !! - !! \param iout The unit to write to - !! \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 + !! \param idx The row to search. !! ! interface @@ -1151,7 +1191,7 @@ module psb_s_base_mat_mod ! !> 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. !! \param info return code !! \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 !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_s_coo_sparse_mat !! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo interface subroutine psb_s_cp_coo_to_coo(a,b,info) @@ -1179,7 +1219,7 @@ module psb_s_base_mat_mod 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 interface 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo + !! interface subroutine psb_s_cp_coo_to_fmt(a,b,info) import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat @@ -1199,7 +1243,11 @@ module psb_s_base_mat_mod end subroutine psb_s_cp_coo_to_fmt end interface - interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt + !! + interface subroutine psb_s_cp_coo_from_fmt(a,b,info) import :: psb_ipk_, psb_s_coo_sparse_mat, psb_s_base_sparse_mat class(psb_s_coo_sparse_mat), intent(inout) :: a @@ -1208,6 +1256,9 @@ module psb_s_base_mat_mod end subroutine psb_s_cp_coo_from_fmt end interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo interface subroutine psb_s_mv_coo_to_coo(a,b,info) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo interface subroutine psb_s_mv_coo_from_coo(a,b,info) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt interface subroutine psb_s_mv_coo_to_fmt(a,b,info) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt interface subroutine psb_s_mv_coo_from_fmt(a,b,info) 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 + !> 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 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_ @@ -1273,6 +1349,9 @@ module psb_s_base_mat_mod end subroutine psb_s_coo_csput end interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_s_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1289,6 +1368,9 @@ module psb_s_base_mat_mod end subroutine psb_s_coo_csgetptn end interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csgetrow interface subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1306,6 +1388,9 @@ module psb_s_base_mat_mod end subroutine psb_s_coo_csgetrow end interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cssv interface subroutine psb_s_coo_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csmv interface subroutine psb_s_coo_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ class(psb_s_coo_sparse_mat), intent(in) :: a @@ -1345,6 +1444,9 @@ module psb_s_base_mat_mod end interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_maxval interface function psb_s_coo_maxval(a) result(res) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csnmi interface function psb_s_coo_csnmi(a) result(res) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csnm1 interface function psb_s_coo_csnm1(a) result(res) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_rowsum interface subroutine psb_s_coo_rowsum(d,a) 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(:) end subroutine psb_s_coo_rowsum end interface - + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_arwsum interface subroutine psb_s_coo_arwsum(d,a) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_colsum interface subroutine psb_s_coo_colsum(d,a) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_aclsum interface subroutine psb_s_coo_aclsum(d,a) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_get_diag interface subroutine psb_s_coo_get_diag(a,d,info) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_scal interface subroutine psb_s_coo_scal(d,a,info,side) 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 interface + !> + !! \memberof psb_s_coo_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_scals interface subroutine psb_s_coo_scals(d,a,info) import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_ diff --git a/base/modules/psb_s_csc_mat_mod.f90 b/base/modules/psb_s_csc_mat_mod.f90 index 81b0525b..79ddf4e8 100644 --- a/base/modules/psb_s_csc_mat_mod.f90 +++ b/base/modules/psb_s_csc_mat_mod.f90 @@ -45,9 +45,18 @@ module psb_s_csc_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 - 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(:) contains @@ -98,6 +107,8 @@ module psb_s_csc_mat_mod private :: s_csc_get_nzeros, s_csc_free, s_csc_get_fmt, & & 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 subroutine psb_s_csc_reallocate_nz(nz,a) 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 interface + !> \memberof psb_s_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_s_csc_reinit(a,clear) 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 interface + !> \memberof psb_s_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_s_csc_trim(a) import :: psb_ipk_, psb_s_csc_sparse_mat @@ -121,15 +136,8 @@ module psb_s_csc_mat_mod end subroutine psb_s_csc_trim end interface - interface - subroutine psb_s_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_s_csc_sparse_mat - integer(psb_ipk_), intent(in) :: m,n - class(psb_s_csc_sparse_mat), intent(inout) :: a - integer(psb_ipk_), intent(in), optional :: nz - end subroutine psb_s_csc_allocate_mnnz - 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_ @@ -139,6 +147,21 @@ module psb_s_csc_mat_mod end subroutine psb_s_csc_mold end interface + + !> \memberof psb_s_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz + interface + subroutine psb_s_csc_allocate_mnnz(m,n,a,nz) + import :: psb_ipk_, psb_s_csc_sparse_mat + integer(psb_ipk_), intent(in) :: m,n + class(psb_s_csc_sparse_mat), intent(inout) :: a + integer(psb_ipk_), intent(in), optional :: nz + end subroutine psb_s_csc_allocate_mnnz + end interface + + + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_print interface subroutine psb_s_csc_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo interface subroutine psb_s_cp_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo interface subroutine psb_s_cp_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_to_fmt interface subroutine psb_s_cp_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt interface subroutine psb_s_cp_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo interface subroutine psb_s_mv_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo interface subroutine psb_s_mv_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt interface subroutine psb_s_mv_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt interface subroutine psb_s_mv_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from interface subroutine psb_s_csc_cp_from(a,b) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from interface subroutine psb_s_csc_mv_from(a,b) import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ @@ -239,6 +282,8 @@ module psb_s_csc_mat_mod end interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csput interface 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_ @@ -251,6 +296,8 @@ module psb_s_csc_mat_mod end subroutine psb_s_csc_csput end interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_s_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +314,8 @@ module psb_s_csc_mat_mod end subroutine psb_s_csc_csgetptn end interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csgetrow interface subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +333,8 @@ module psb_s_csc_mat_mod end subroutine psb_s_csc_csgetrow end interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csgetblk interface subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +350,8 @@ module psb_s_csc_mat_mod end subroutine psb_s_csc_csgetblk end interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cssv interface subroutine psb_s_csc_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csmv interface subroutine psb_s_csc_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ class(psb_s_csc_sparse_mat), intent(in) :: a @@ -338,6 +402,8 @@ module psb_s_csc_mat_mod end interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_maxval interface function psb_s_csc_maxval(a) result(res) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csnmi interface function psb_s_csc_csnmi(a) result(res) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csnm1 interface function psb_s_csc_csnm1(a) result(res) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_rowsum interface subroutine psb_s_csc_rowsum(d,a) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_arwsum interface subroutine psb_s_csc_arwsum(d,a) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_colsum interface subroutine psb_s_csc_colsum(d,a) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_aclsum interface subroutine psb_s_csc_aclsum(d,a) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_get_diag interface subroutine psb_s_csc_get_diag(a,d,info) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_scal interface subroutine psb_s_csc_scal(d,a,info,side) 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 interface + !> \memberof psb_s_csc_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_scals interface subroutine psb_s_csc_scals(d,a,info) import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_ diff --git a/base/modules/psb_s_csr_mat_mod.f90 b/base/modules/psb_s_csr_mat_mod.f90 index 46740a12..f293989e 100644 --- a/base/modules/psb_s_csr_mat_mod.f90 +++ b/base/modules/psb_s_csr_mat_mod.f90 @@ -45,9 +45,19 @@ module psb_s_csr_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 - 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(:) contains @@ -98,6 +108,8 @@ module psb_s_csr_mat_mod private :: s_csr_get_nzeros, s_csr_free, s_csr_get_fmt, & & 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 subroutine psb_s_csr_reallocate_nz(nz,a) 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 interface + !> \memberof psb_s_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_s_csr_reinit(a,clear) import :: psb_ipk_, psb_s_csr_sparse_mat @@ -114,13 +128,18 @@ module psb_s_csr_mat_mod end subroutine psb_s_csr_reinit end interface + !> \memberof psb_s_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_s_csr_trim(a) import :: psb_ipk_, psb_s_csr_sparse_mat class(psb_s_csr_sparse_mat), intent(inout) :: a end subroutine psb_s_csr_trim end interface + + !> \memberof psb_s_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_mold interface 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_ @@ -130,6 +149,9 @@ module psb_s_csr_mat_mod end subroutine psb_s_csr_mold end interface + + !> \memberof psb_s_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_s_csr_allocate_mnnz(m,n,a,nz) import :: psb_ipk_, psb_s_csr_sparse_mat @@ -138,7 +160,10 @@ module psb_s_csr_mat_mod integer(psb_ipk_), intent(in), optional :: nz end subroutine psb_s_csr_allocate_mnnz end interface + + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_print interface subroutine psb_s_csr_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_to_coo interface subroutine psb_s_cp_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from_coo interface subroutine psb_s_cp_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_to_fmt interface subroutine psb_s_cp_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from_fmt interface subroutine psb_s_cp_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_to_coo interface subroutine psb_s_mv_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from_coo interface subroutine psb_s_mv_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_to_fmt interface subroutine psb_s_mv_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from_fmt interface subroutine psb_s_mv_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cp_from interface subroutine psb_s_csr_cp_from(a,b) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_mv_from interface subroutine psb_s_csr_mv_from(a,b) import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ @@ -239,6 +284,8 @@ module psb_s_csr_mat_mod end interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csput interface 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_ @@ -251,6 +298,8 @@ module psb_s_csr_mat_mod end subroutine psb_s_csr_csput end interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_s_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +316,8 @@ module psb_s_csr_mat_mod end subroutine psb_s_csr_csgetptn end interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csgetrow interface subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +335,8 @@ module psb_s_csr_mat_mod end subroutine psb_s_csr_csgetrow end interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csgetblk interface subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +352,8 @@ module psb_s_csr_mat_mod end subroutine psb_s_csr_csgetblk end interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_cssv interface subroutine psb_s_csr_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csmv interface subroutine psb_s_csr_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ class(psb_s_csr_sparse_mat), intent(in) :: a @@ -338,6 +404,8 @@ module psb_s_csr_mat_mod end interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_maxval interface function psb_s_csr_maxval(a) result(res) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csnmi interface function psb_s_csr_csnmi(a) result(res) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_csnm1 interface function psb_s_csr_csnm1(a) result(res) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_rowsum interface subroutine psb_s_csr_rowsum(d,a) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_arwsum interface subroutine psb_s_csr_arwsum(d,a) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_colsum interface subroutine psb_s_csr_colsum(d,a) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_aclsum interface subroutine psb_s_csr_aclsum(d,a) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_get_diag interface subroutine psb_s_csr_get_diag(a,d,info) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_scal interface subroutine psb_s_csr_scal(d,a,info,side) 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 interface + !> \memberof psb_s_csr_sparse_mat + !! \see psb_s_base_mat_mod::psb_s_base_scals interface subroutine psb_s_csr_scals(d,a,info) import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_ diff --git a/base/modules/psb_z_base_mat_mod.f90 b/base/modules/psb_z_base_mat_mod.f90 index 92e60070..08b8c274 100644 --- a/base/modules/psb_z_base_mat_mod.f90 +++ b/base/modules/psb_z_base_mat_mod.f90 @@ -212,7 +212,7 @@ module psb_z_base_mat_mod ! == ================= !> Function csput: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Insert coefficients. !! !! @@ -261,7 +261,7 @@ module psb_z_base_mat_mod ! ! !> Function csgetrow: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getrow is the basic method by which the other (getblk, clip) can @@ -309,7 +309,7 @@ module psb_z_base_mat_mod ! !> Function csgetblk: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Get a (subset of) row(s) !! !! getblk is very similar to getrow, except that the output @@ -347,7 +347,7 @@ module psb_z_base_mat_mod ! ! !> Function csclip: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Get a submatrix. !! !! csclip is practically identical to getblk. @@ -381,7 +381,7 @@ module psb_z_base_mat_mod ! !> Function get_diag: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Extract the diagonal of A. !! !! D(i) = A(i:i), i=1:min(nrows,ncols) @@ -400,7 +400,7 @@ module psb_z_base_mat_mod ! !> 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 !! same dynamic type as the input. !! This is equivalent to allocate( mold= ) and is provided @@ -420,7 +420,7 @@ module psb_z_base_mat_mod ! !> 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 !! Invoked from the source object. !! \param b The output variable @@ -437,7 +437,7 @@ module psb_z_base_mat_mod ! !> 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 !! Invoked from the target object. !! \param b The input variable @@ -454,7 +454,7 @@ module psb_z_base_mat_mod ! !> 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) !! Invoked from the source object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof 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 !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Convert to psb_z_coo_sparse_mat, freeing the source. !! Invoked from the source object. !! \param b The output variable @@ -507,7 +507,7 @@ module psb_z_base_mat_mod ! !> 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. !! Invoked from the target object. !! \param b The input variable @@ -524,7 +524,7 @@ module psb_z_base_mat_mod ! !> 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. !! Invoked from the source object. Can be implemented by !! 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: - !! \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. !! Invoked from the target object. Can be implemented by !! 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: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Transpose. Can always be implemented by staging through a COO !! temporary for which transpose is very easy. !! Copyout version @@ -576,7 +576,7 @@ module psb_z_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! Copyout version. @@ -592,7 +592,7 @@ module psb_z_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -606,7 +606,7 @@ module psb_z_base_mat_mod ! !> 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 !! temporary for which transpose is very easy. !! In-place version. @@ -620,7 +620,7 @@ module psb_z_base_mat_mod ! !> Function csmm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Product by a dense rank 2 array. !! !! Compute @@ -648,7 +648,7 @@ module psb_z_base_mat_mod end interface !> Function csmv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Product by a dense rank 1 array. !! !! Compute @@ -676,7 +676,7 @@ module psb_z_base_mat_mod end interface !> 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) !! !! Compute @@ -713,7 +713,7 @@ module psb_z_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -745,7 +745,7 @@ module psb_z_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -779,7 +779,7 @@ module psb_z_base_mat_mod ! !> Function inner_vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_z_vect_type) !! @@ -810,7 +810,7 @@ module psb_z_base_mat_mod ! !> Function cssm: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Triangular system solve by a dense rank 2 array. !! !! Compute @@ -843,7 +843,7 @@ module psb_z_base_mat_mod ! !> Function cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Triangular system solve by a dense rank 1 array. !! !! Compute @@ -876,7 +876,7 @@ module psb_z_base_mat_mod ! !> Function vect_cssv: - !! \memberof psb_@X_base_sparse_mat + !! \memberof psb_z_base_sparse_mat !! \brief Triangular system solve by !! an encapsulated array type(psb_z_vect_type) !! @@ -909,8 +909,12 @@ module psb_z_base_mat_mod end interface ! - ! Scale a matrix by a scalar or by a vector. - ! Should we handle scale on the columns?? + !> Function base_scals: + !! \memberof psb_z_base_sparse_mat + !! \brief Scale a matrix by a single scalar value + !! + !! \param d Scaling factor + !! \param info return code ! interface 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 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 subroutine psb_z_base_scal(d,a,info,side) import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_ @@ -932,7 +945,10 @@ module psb_z_base_mat_mod end interface ! - ! Maximum coefficient absolute value norm + !> Function base_maxval: + !! \memberof psb_z_base_sparse_mat + !! \brief Maximum absolute value of all coefficients; + !! ! interface function psb_z_base_maxval(a) result(res) @@ -943,7 +959,11 @@ module psb_z_base_mat_mod end interface ! - ! Operator infinity norm + ! + !> Function base_csnmi: + !! \memberof psb_z_base_sparse_mat + !! \brief Operator infinity norm + !! ! interface function psb_z_base_csnmi(a) result(res) @@ -954,7 +974,11 @@ module psb_z_base_mat_mod end interface ! - ! Operator 1-norm + ! + !> Function base_csnmi: + !! \memberof psb_z_base_sparse_mat + !! \brief Operator 1-norm + !! ! interface function psb_z_base_csnm1(a) result(res) @@ -965,8 +989,12 @@ module psb_z_base_mat_mod 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 subroutine psb_z_base_rowsum(d,a) @@ -976,6 +1004,12 @@ module psb_z_base_mat_mod end subroutine psb_z_base_rowsum 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 subroutine psb_z_base_arwsum(d,a) import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_ @@ -985,8 +1019,12 @@ module psb_z_base_mat_mod 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 subroutine psb_z_base_colsum(d,a) @@ -996,6 +1034,12 @@ module psb_z_base_mat_mod end subroutine psb_z_base_colsum 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 subroutine psb_z_base_aclsum(d,a) 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 ! 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 ! interface @@ -1038,7 +1082,7 @@ module psb_z_base_mat_mod end interface ! !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_z_coo_sparse_mat !! \see psb_base_mat_mod::psb_base_trim ! 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 ! 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 ! interface @@ -1079,7 +1123,7 @@ module psb_z_base_mat_mod ! !> Function print. - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_z_coo_sparse_mat !! \brief Print the matrix to file in MatrixMarket format !! !! \param iout The unit to write to @@ -1103,15 +1147,11 @@ module psb_z_base_mat_mod ! - !> Function print. - !! \memberof psb_@X_coo_sparse_mat - !! \brief Print the matrix to file in MatrixMarket format + !> Function get_nz_row. + !! \memberof psb_z_coo_sparse_mat + !! \brief How many nonzeros in a row? !! - !! \param iout The unit to write to - !! \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 + !! \param idx The row to search. !! ! interface @@ -1151,7 +1191,7 @@ module psb_z_base_mat_mod ! !> 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. !! \param info return code !! \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 !> - !! \memberof psb_@X_coo_sparse_mat + !! \memberof psb_z_coo_sparse_mat !! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo interface subroutine psb_z_cp_coo_to_coo(a,b,info) @@ -1179,7 +1219,7 @@ module psb_z_base_mat_mod 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 interface 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo + !! interface subroutine psb_z_cp_coo_to_fmt(a,b,info) import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat @@ -1199,7 +1243,11 @@ module psb_z_base_mat_mod end subroutine psb_z_cp_coo_to_fmt end interface - interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt + !! + interface subroutine psb_z_cp_coo_from_fmt(a,b,info) import :: psb_ipk_, psb_z_coo_sparse_mat, psb_z_base_sparse_mat class(psb_z_coo_sparse_mat), intent(inout) :: a @@ -1208,6 +1256,9 @@ module psb_z_base_mat_mod end subroutine psb_z_cp_coo_from_fmt end interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo interface subroutine psb_z_mv_coo_to_coo(a,b,info) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo interface subroutine psb_z_mv_coo_from_coo(a,b,info) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt interface subroutine psb_z_mv_coo_to_fmt(a,b,info) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt interface subroutine psb_z_mv_coo_from_fmt(a,b,info) 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 + !> 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 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_ @@ -1273,6 +1349,9 @@ module psb_z_base_mat_mod end subroutine psb_z_coo_csput end interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_z_coo_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1289,6 +1368,9 @@ module psb_z_base_mat_mod end subroutine psb_z_coo_csgetptn end interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csgetrow interface subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -1306,6 +1388,9 @@ module psb_z_base_mat_mod end subroutine psb_z_coo_csgetrow end interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cssv interface subroutine psb_z_coo_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csmv interface subroutine psb_z_coo_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ class(psb_z_coo_sparse_mat), intent(in) :: a @@ -1345,6 +1444,9 @@ module psb_z_base_mat_mod end interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_maxval interface function psb_z_coo_maxval(a) result(res) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csnmi interface function psb_z_coo_csnmi(a) result(res) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csnm1 interface function psb_z_coo_csnm1(a) result(res) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_rowsum interface subroutine psb_z_coo_rowsum(d,a) 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(:) end subroutine psb_z_coo_rowsum end interface - + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_arwsum interface subroutine psb_z_coo_arwsum(d,a) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_colsum interface subroutine psb_z_coo_colsum(d,a) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_aclsum interface subroutine psb_z_coo_aclsum(d,a) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_get_diag interface subroutine psb_z_coo_get_diag(a,d,info) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_scal interface subroutine psb_z_coo_scal(d,a,info,side) 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 interface + !> + !! \memberof psb_z_coo_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_scals interface subroutine psb_z_coo_scals(d,a,info) import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_ diff --git a/base/modules/psb_z_csc_mat_mod.f90 b/base/modules/psb_z_csc_mat_mod.f90 index d44ab38a..5d195067 100644 --- a/base/modules/psb_z_csc_mat_mod.f90 +++ b/base/modules/psb_z_csc_mat_mod.f90 @@ -45,9 +45,18 @@ module psb_z_csc_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 - 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(:) contains @@ -98,6 +107,8 @@ module psb_z_csc_mat_mod private :: z_csc_get_nzeros, z_csc_free, z_csc_get_fmt, & & 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 subroutine psb_z_csc_reallocate_nz(nz,a) 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 interface + !> \memberof psb_z_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_z_csc_reinit(a,clear) 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 interface + !> \memberof psb_z_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_z_csc_trim(a) import :: psb_ipk_, psb_z_csc_sparse_mat @@ -121,15 +136,8 @@ module psb_z_csc_mat_mod end subroutine psb_z_csc_trim end interface - interface - subroutine psb_z_csc_allocate_mnnz(m,n,a,nz) - import :: psb_ipk_, psb_z_csc_sparse_mat - integer(psb_ipk_), intent(in) :: m,n - class(psb_z_csc_sparse_mat), intent(inout) :: a - integer(psb_ipk_), intent(in), optional :: nz - end subroutine psb_z_csc_allocate_mnnz - 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_ @@ -139,6 +147,21 @@ module psb_z_csc_mat_mod end subroutine psb_z_csc_mold end interface + + !> \memberof psb_z_csc_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz + interface + subroutine psb_z_csc_allocate_mnnz(m,n,a,nz) + import :: psb_ipk_, psb_z_csc_sparse_mat + integer(psb_ipk_), intent(in) :: m,n + class(psb_z_csc_sparse_mat), intent(inout) :: a + integer(psb_ipk_), intent(in), optional :: nz + end subroutine psb_z_csc_allocate_mnnz + end interface + + + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_print interface subroutine psb_z_csc_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo interface subroutine psb_z_cp_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo interface subroutine psb_z_cp_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_to_fmt interface subroutine psb_z_cp_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt interface subroutine psb_z_cp_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo interface subroutine psb_z_mv_csc_to_coo(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo interface subroutine psb_z_mv_csc_from_coo(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt interface subroutine psb_z_mv_csc_to_fmt(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt interface subroutine psb_z_mv_csc_from_fmt(a,b,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from interface subroutine psb_z_csc_cp_from(a,b) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from interface subroutine psb_z_csc_mv_from(a,b) import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ @@ -239,6 +282,8 @@ module psb_z_csc_mat_mod end interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csput interface 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_ @@ -251,6 +296,8 @@ module psb_z_csc_mat_mod end subroutine psb_z_csc_csput end interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_z_csc_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +314,8 @@ module psb_z_csc_mat_mod end subroutine psb_z_csc_csgetptn end interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csgetrow interface subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +333,8 @@ module psb_z_csc_mat_mod end subroutine psb_z_csc_csgetrow end interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csgetblk interface subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +350,8 @@ module psb_z_csc_mat_mod end subroutine psb_z_csc_csgetblk end interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cssv interface subroutine psb_z_csc_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csmv interface subroutine psb_z_csc_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ class(psb_z_csc_sparse_mat), intent(in) :: a @@ -338,6 +402,8 @@ module psb_z_csc_mat_mod end interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_maxval interface function psb_z_csc_maxval(a) result(res) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csnmi interface function psb_z_csc_csnmi(a) result(res) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csnm1 interface function psb_z_csc_csnm1(a) result(res) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_rowsum interface subroutine psb_z_csc_rowsum(d,a) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_arwsum interface subroutine psb_z_csc_arwsum(d,a) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_colsum interface subroutine psb_z_csc_colsum(d,a) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_aclsum interface subroutine psb_z_csc_aclsum(d,a) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_get_diag interface subroutine psb_z_csc_get_diag(a,d,info) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_scal interface subroutine psb_z_csc_scal(d,a,info,side) 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 interface + !> \memberof psb_z_csc_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_scals interface subroutine psb_z_csc_scals(d,a,info) import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_ diff --git a/base/modules/psb_z_csr_mat_mod.f90 b/base/modules/psb_z_csr_mat_mod.f90 index e3229c47..84ce8553 100644 --- a/base/modules/psb_z_csr_mat_mod.f90 +++ b/base/modules/psb_z_csr_mat_mod.f90 @@ -45,9 +45,19 @@ module psb_z_csr_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 - 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(:) contains @@ -98,6 +108,8 @@ module psb_z_csr_mat_mod private :: z_csr_get_nzeros, z_csr_free, z_csr_get_fmt, & & 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 subroutine psb_z_csr_reallocate_nz(nz,a) 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 interface + !> \memberof psb_z_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_reinit interface subroutine psb_z_csr_reinit(a,clear) import :: psb_ipk_, psb_z_csr_sparse_mat @@ -114,13 +128,18 @@ module psb_z_csr_mat_mod end subroutine psb_z_csr_reinit end interface + !> \memberof psb_z_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_trim interface subroutine psb_z_csr_trim(a) import :: psb_ipk_, psb_z_csr_sparse_mat class(psb_z_csr_sparse_mat), intent(inout) :: a end subroutine psb_z_csr_trim end interface + + !> \memberof psb_z_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_mold interface 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_ @@ -130,6 +149,9 @@ module psb_z_csr_mat_mod end subroutine psb_z_csr_mold end interface + + !> \memberof psb_z_csr_sparse_mat + !| \see psb_base_mat_mod::psb_base_allocate_mnnz interface subroutine psb_z_csr_allocate_mnnz(m,n,a,nz) import :: psb_ipk_, psb_z_csr_sparse_mat @@ -138,7 +160,10 @@ module psb_z_csr_mat_mod integer(psb_ipk_), intent(in), optional :: nz end subroutine psb_z_csr_allocate_mnnz end interface + + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_print interface subroutine psb_z_csr_print(iout,a,iv,head,ivr,ivc) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_to_coo interface subroutine psb_z_cp_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from_coo interface subroutine psb_z_cp_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_to_fmt interface subroutine psb_z_cp_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from_fmt interface subroutine psb_z_cp_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_to_coo interface subroutine psb_z_mv_csr_to_coo(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from_coo interface subroutine psb_z_mv_csr_from_coo(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_to_fmt interface subroutine psb_z_mv_csr_to_fmt(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from_fmt interface subroutine psb_z_mv_csr_from_fmt(a,b,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cp_from interface subroutine psb_z_csr_cp_from(a,b) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_mv_from interface subroutine psb_z_csr_mv_from(a,b) import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ @@ -239,6 +284,8 @@ module psb_z_csr_mat_mod end interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csput interface 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_ @@ -251,6 +298,8 @@ module psb_z_csr_mat_mod end subroutine psb_z_csr_csput end interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_base_mat_mod::psb_base_csgetptn interface subroutine psb_z_csr_csgetptn(imin,imax,a,nz,ia,ja,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -267,6 +316,8 @@ module psb_z_csr_mat_mod end subroutine psb_z_csr_csgetptn end interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csgetrow interface subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,& & jmin,jmax,iren,append,nzin,rscale,cscale) @@ -284,6 +335,8 @@ module psb_z_csr_mat_mod end subroutine psb_z_csr_csgetrow end interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csgetblk interface subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,& & jmin,jmax,iren,append,rscale,cscale) @@ -299,6 +352,8 @@ module psb_z_csr_mat_mod end subroutine psb_z_csr_csgetblk end interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_cssv interface subroutine psb_z_csr_cssv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csmv interface subroutine psb_z_csr_csmv(alpha,a,x,beta,y,info,trans) 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 character, optional, intent(in) :: trans 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) import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_ class(psb_z_csr_sparse_mat), intent(in) :: a @@ -338,6 +404,8 @@ module psb_z_csr_mat_mod end interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_maxval interface function psb_z_csr_maxval(a) result(res) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csnmi interface function psb_z_csr_csnmi(a) result(res) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_csnm1 interface function psb_z_csr_csnm1(a) result(res) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_rowsum interface subroutine psb_z_csr_rowsum(d,a) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_arwsum interface subroutine psb_z_csr_arwsum(d,a) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_colsum interface subroutine psb_z_csr_colsum(d,a) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_aclsum interface subroutine psb_z_csr_aclsum(d,a) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_get_diag interface subroutine psb_z_csr_get_diag(a,d,info) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_scal interface subroutine psb_z_csr_scal(d,a,info,side) 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 interface + !> \memberof psb_z_csr_sparse_mat + !! \see psb_z_base_mat_mod::psb_z_base_scals interface subroutine psb_z_csr_scals(d,a,info) import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_