|
|
|
@ -10,22 +10,22 @@ module psb_s_mat_mod
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
! Getters
|
|
|
|
|
procedure, pass(a) :: get_nrows
|
|
|
|
|
procedure, pass(a) :: get_ncols
|
|
|
|
|
procedure, pass(a) :: get_nzeros
|
|
|
|
|
procedure, pass(a) :: get_nz_row
|
|
|
|
|
procedure, pass(a) :: get_size
|
|
|
|
|
procedure, pass(a) :: get_state
|
|
|
|
|
procedure, pass(a) :: get_dupl
|
|
|
|
|
procedure, pass(a) :: is_null
|
|
|
|
|
procedure, pass(a) :: is_bld
|
|
|
|
|
procedure, pass(a) :: is_upd
|
|
|
|
|
procedure, pass(a) :: is_asb
|
|
|
|
|
procedure, pass(a) :: is_sorted
|
|
|
|
|
procedure, pass(a) :: is_upper
|
|
|
|
|
procedure, pass(a) :: is_lower
|
|
|
|
|
procedure, pass(a) :: is_triangle
|
|
|
|
|
procedure, pass(a) :: is_unit
|
|
|
|
|
procedure, pass(a) :: get_nrows => psb_s_get_nrows
|
|
|
|
|
procedure, pass(a) :: get_ncols => psb_s_get_ncols
|
|
|
|
|
procedure, pass(a) :: get_nzeros => psb_s_get_nzeros
|
|
|
|
|
procedure, pass(a) :: get_nz_row => psb_s_get_nz_row
|
|
|
|
|
procedure, pass(a) :: get_size => psb_s_get_size
|
|
|
|
|
procedure, pass(a) :: get_state => psb_s_get_state
|
|
|
|
|
procedure, pass(a) :: get_dupl => psb_s_get_dupl
|
|
|
|
|
procedure, pass(a) :: is_null => psb_s_is_null
|
|
|
|
|
procedure, pass(a) :: is_bld => psb_s_is_bld
|
|
|
|
|
procedure, pass(a) :: is_upd => psb_s_is_upd
|
|
|
|
|
procedure, pass(a) :: is_asb => psb_s_is_asb
|
|
|
|
|
procedure, pass(a) :: is_sorted => psb_s_is_sorted
|
|
|
|
|
procedure, pass(a) :: is_upper => psb_s_is_upper
|
|
|
|
|
procedure, pass(a) :: is_lower => psb_s_is_lower
|
|
|
|
|
procedure, pass(a) :: is_triangle => psb_s_is_triangle
|
|
|
|
|
procedure, pass(a) :: is_unit => psb_s_is_unit
|
|
|
|
|
procedure, pass(a) :: get_fmt => psb_s_get_fmt
|
|
|
|
|
procedure, pass(a) :: sizeof => psb_s_sizeof
|
|
|
|
|
|
|
|
|
@ -99,9 +99,9 @@ module psb_s_mat_mod
|
|
|
|
|
|
|
|
|
|
end type psb_s_sparse_mat
|
|
|
|
|
|
|
|
|
|
private :: get_nrows, get_ncols, get_nzeros, get_size, &
|
|
|
|
|
& get_state, get_dupl, is_null, is_bld, is_upd, &
|
|
|
|
|
& is_asb, is_sorted, is_upper, is_lower, is_triangle
|
|
|
|
|
private :: psb_s_get_nrows, psb_s_get_ncols, get_nzeros, psb_s_get_size, &
|
|
|
|
|
& psb_s_get_state, psb_s_get_dupl, psb_s_is_null, psb_s_is_bld, psb_s_is_upd, &
|
|
|
|
|
& psb_s_is_asb, psb_s_is_sorted, psb_s_is_upper, psb_s_is_lower, psb_s_is_triangle
|
|
|
|
|
|
|
|
|
|
interface psb_sizeof
|
|
|
|
|
module procedure psb_s_sizeof
|
|
|
|
@ -292,7 +292,7 @@ module psb_s_mat_mod
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_s_csgetptn(imin,imax,a,nz,ia,ja,info,&
|
|
|
|
|
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
|
|
|
|
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
|
|
|
|
import psb_s_sparse_mat, psb_spk_
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
@ -325,7 +325,7 @@ module psb_s_mat_mod
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_s_csgetblk(imin,imax,a,b,info,&
|
|
|
|
|
& jmin,jmax,iren,append,rscale,cscale)
|
|
|
|
|
& jmin,jmax,iren,append,rscale,cscale)
|
|
|
|
|
import psb_s_sparse_mat, psb_spk_
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
class(psb_s_sparse_mat), intent(out) :: b
|
|
|
|
@ -340,7 +340,7 @@ module psb_s_mat_mod
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_s_csclip(a,b,info,&
|
|
|
|
|
& imin,imax,jmin,jmax,rscale,cscale)
|
|
|
|
|
& imin,imax,jmin,jmax,rscale,cscale)
|
|
|
|
|
import psb_s_sparse_mat, psb_spk_
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
class(psb_s_sparse_mat), intent(out) :: b
|
|
|
|
@ -352,7 +352,7 @@ module psb_s_mat_mod
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
subroutine psb_s_b_csclip(a,b,info,&
|
|
|
|
|
& imin,imax,jmin,jmax,rscale,cscale)
|
|
|
|
|
& imin,imax,jmin,jmax,rscale,cscale)
|
|
|
|
|
import psb_s_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
type(psb_s_coo_sparse_mat), intent(out) :: b
|
|
|
|
@ -505,7 +505,6 @@ module psb_s_mat_mod
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! == ===================================
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
@ -638,8 +637,7 @@ contains
|
|
|
|
|
end function psb_s_get_fmt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_dupl(a) result(res)
|
|
|
|
|
function psb_s_get_dupl(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
integer :: res
|
|
|
|
@ -649,10 +647,10 @@ contains
|
|
|
|
|
else
|
|
|
|
|
res = psb_invalid_
|
|
|
|
|
end if
|
|
|
|
|
end function get_dupl
|
|
|
|
|
end function psb_s_get_dupl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_state(a) result(res)
|
|
|
|
|
function psb_s_get_state(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
integer :: res
|
|
|
|
@ -662,9 +660,9 @@ contains
|
|
|
|
|
else
|
|
|
|
|
res = psb_spmat_null_
|
|
|
|
|
end if
|
|
|
|
|
end function get_state
|
|
|
|
|
end function psb_s_get_state
|
|
|
|
|
|
|
|
|
|
function get_nrows(a) result(res)
|
|
|
|
|
function psb_s_get_nrows(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
integer :: res
|
|
|
|
@ -675,9 +673,9 @@ contains
|
|
|
|
|
res = 0
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function get_nrows
|
|
|
|
|
end function psb_s_get_nrows
|
|
|
|
|
|
|
|
|
|
function get_ncols(a) result(res)
|
|
|
|
|
function psb_s_get_ncols(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
integer :: res
|
|
|
|
@ -688,9 +686,9 @@ contains
|
|
|
|
|
res = 0
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function get_ncols
|
|
|
|
|
end function psb_s_get_ncols
|
|
|
|
|
|
|
|
|
|
function is_triangle(a) result(res)
|
|
|
|
|
function psb_s_is_triangle(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -701,9 +699,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_triangle
|
|
|
|
|
end function psb_s_is_triangle
|
|
|
|
|
|
|
|
|
|
function is_unit(a) result(res)
|
|
|
|
|
function psb_s_is_unit(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -714,9 +712,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_unit
|
|
|
|
|
end function psb_s_is_unit
|
|
|
|
|
|
|
|
|
|
function is_upper(a) result(res)
|
|
|
|
|
function psb_s_is_upper(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -727,9 +725,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_upper
|
|
|
|
|
end function psb_s_is_upper
|
|
|
|
|
|
|
|
|
|
function is_lower(a) result(res)
|
|
|
|
|
function psb_s_is_lower(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -740,9 +738,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_lower
|
|
|
|
|
end function psb_s_is_lower
|
|
|
|
|
|
|
|
|
|
function is_null(a) result(res)
|
|
|
|
|
function psb_s_is_null(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -753,9 +751,9 @@ contains
|
|
|
|
|
res = .true.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_null
|
|
|
|
|
end function psb_s_is_null
|
|
|
|
|
|
|
|
|
|
function is_bld(a) result(res)
|
|
|
|
|
function psb_s_is_bld(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -766,9 +764,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_bld
|
|
|
|
|
end function psb_s_is_bld
|
|
|
|
|
|
|
|
|
|
function is_upd(a) result(res)
|
|
|
|
|
function psb_s_is_upd(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -779,9 +777,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_upd
|
|
|
|
|
end function psb_s_is_upd
|
|
|
|
|
|
|
|
|
|
function is_asb(a) result(res)
|
|
|
|
|
function psb_s_is_asb(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -792,9 +790,9 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_asb
|
|
|
|
|
end function psb_s_is_asb
|
|
|
|
|
|
|
|
|
|
function is_sorted(a) result(res)
|
|
|
|
|
function psb_s_is_sorted(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
logical :: res
|
|
|
|
@ -805,11 +803,11 @@ contains
|
|
|
|
|
res = .false.
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function is_sorted
|
|
|
|
|
end function psb_s_is_sorted
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_nzeros(a) result(res)
|
|
|
|
|
function psb_s_get_nzeros(a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
|
integer :: res
|
|
|
|
@ -819,9 +817,9 @@ contains
|
|
|
|
|
res = a%a%get_nzeros()
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function get_nzeros
|
|
|
|
|
end function psb_s_get_nzeros
|
|
|
|
|
|
|
|
|
|
function get_size(a) result(res)
|
|
|
|
|
function psb_s_get_size(a) result(res)
|
|
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
@ -833,10 +831,10 @@ contains
|
|
|
|
|
res = a%a%get_size()
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end function get_size
|
|
|
|
|
end function psb_s_get_size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_nz_row(idx,a) result(res)
|
|
|
|
|
function psb_s_get_nz_row(idx,a) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
integer, intent(in) :: idx
|
|
|
|
|
class(psb_s_sparse_mat), intent(in) :: a
|
|
|
|
@ -848,7 +846,7 @@ contains
|
|
|
|
|
|
|
|
|
|
if (allocated(a%a)) res = a%a%get_nz_row(idx)
|
|
|
|
|
|
|
|
|
|
end function get_nz_row
|
|
|
|
|
end function psb_s_get_nz_row
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end module psb_s_mat_mod
|
|
|
|
|