mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
Optional argument in GETROW.
This commit is contained in:
@@ -316,7 +316,7 @@ module psb_c_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_c_base_sparse_mat, psb_spk_
|
||||
class(psb_c_base_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -327,7 +327,7 @@ module psb_c_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale, chksz
|
||||
end subroutine psb_c_base_csgetrow
|
||||
end interface
|
||||
|
||||
@@ -355,7 +355,7 @@ module psb_c_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_c_base_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
& jmin,jmax,iren,append,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_c_base_sparse_mat, psb_c_coo_sparse_mat, psb_spk_
|
||||
class(psb_c_base_sparse_mat), intent(in) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
@@ -364,7 +364,7 @@ module psb_c_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_c_base_csgetblk
|
||||
end interface
|
||||
|
||||
@@ -1550,7 +1550,7 @@ module psb_c_base_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_c_coo_sparse_mat, psb_spk_
|
||||
class(psb_c_coo_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -1561,7 +1561,7 @@ module psb_c_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_c_coo_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ module psb_c_csc_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_
|
||||
class(psb_c_csc_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -324,27 +324,27 @@ module psb_c_csc_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_, psb_c_coo_sparse_mat
|
||||
class(psb_c_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_c_csc_csgetblk
|
||||
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,chksz)
|
||||
!!$ import :: psb_ipk_, psb_c_csc_sparse_mat, psb_spk_, psb_c_coo_sparse_mat
|
||||
!!$ class(psb_c_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale,chksz
|
||||
!!$ 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
|
||||
|
||||
@@ -405,7 +405,7 @@ module psb_c_csr_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_
|
||||
class(psb_c_csr_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -416,26 +416,26 @@ module psb_c_csr_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_, psb_c_coo_sparse_mat
|
||||
class(psb_c_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_c_csr_csgetblk
|
||||
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)
|
||||
!!$ import :: psb_ipk_, psb_c_csr_sparse_mat, psb_spk_, psb_c_coo_sparse_mat
|
||||
!!$ class(psb_c_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ end subroutine psb_c_csr_csgetblk
|
||||
!!$ end interface
|
||||
|
||||
!> \memberof psb_c_csr_sparse_mat
|
||||
!! \see psb_c_base_mat_mod::psb_c_base_cssv
|
||||
|
||||
@@ -450,7 +450,7 @@ module psb_c_mat_mod
|
||||
|
||||
interface
|
||||
subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_cspmat_type, psb_spk_
|
||||
class(psb_cspmat_type), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -461,7 +461,7 @@ module psb_c_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_c_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ module psb_d_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_d_base_sparse_mat, psb_dpk_
|
||||
class(psb_d_base_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -327,7 +327,7 @@ module psb_d_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale, chksz
|
||||
end subroutine psb_d_base_csgetrow
|
||||
end interface
|
||||
|
||||
@@ -355,7 +355,7 @@ module psb_d_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_d_base_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
& jmin,jmax,iren,append,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_d_base_sparse_mat, psb_d_coo_sparse_mat, psb_dpk_
|
||||
class(psb_d_base_sparse_mat), intent(in) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
@@ -364,7 +364,7 @@ module psb_d_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_d_base_csgetblk
|
||||
end interface
|
||||
|
||||
@@ -1550,7 +1550,7 @@ module psb_d_base_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_d_coo_sparse_mat, psb_dpk_
|
||||
class(psb_d_coo_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -1561,7 +1561,7 @@ module psb_d_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_d_coo_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ module psb_d_csc_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_
|
||||
class(psb_d_csc_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -324,27 +324,27 @@ module psb_d_csc_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat
|
||||
class(psb_d_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_d_csc_csgetblk
|
||||
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,chksz)
|
||||
!!$ import :: psb_ipk_, psb_d_csc_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat
|
||||
!!$ class(psb_d_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale,chksz
|
||||
!!$ 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
|
||||
|
||||
@@ -405,7 +405,7 @@ module psb_d_csr_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_
|
||||
class(psb_d_csr_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -416,26 +416,26 @@ module psb_d_csr_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat
|
||||
class(psb_d_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_d_csr_csgetblk
|
||||
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)
|
||||
!!$ import :: psb_ipk_, psb_d_csr_sparse_mat, psb_dpk_, psb_d_coo_sparse_mat
|
||||
!!$ class(psb_d_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ end subroutine psb_d_csr_csgetblk
|
||||
!!$ end interface
|
||||
|
||||
!> \memberof psb_d_csr_sparse_mat
|
||||
!! \see psb_d_base_mat_mod::psb_d_base_cssv
|
||||
|
||||
@@ -450,7 +450,7 @@ module psb_d_mat_mod
|
||||
|
||||
interface
|
||||
subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_dspmat_type, psb_dpk_
|
||||
class(psb_dspmat_type), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -461,7 +461,7 @@ module psb_d_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_d_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ module psb_s_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_s_base_sparse_mat, psb_spk_
|
||||
class(psb_s_base_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -327,7 +327,7 @@ module psb_s_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale, chksz
|
||||
end subroutine psb_s_base_csgetrow
|
||||
end interface
|
||||
|
||||
@@ -355,7 +355,7 @@ module psb_s_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_s_base_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
& jmin,jmax,iren,append,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_s_base_sparse_mat, psb_s_coo_sparse_mat, psb_spk_
|
||||
class(psb_s_base_sparse_mat), intent(in) :: a
|
||||
class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
@@ -364,7 +364,7 @@ module psb_s_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_s_base_csgetblk
|
||||
end interface
|
||||
|
||||
@@ -1550,7 +1550,7 @@ module psb_s_base_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_s_coo_sparse_mat, psb_spk_
|
||||
class(psb_s_coo_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -1561,7 +1561,7 @@ module psb_s_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_s_coo_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ module psb_s_csc_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_
|
||||
class(psb_s_csc_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -324,27 +324,27 @@ module psb_s_csc_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
|
||||
class(psb_s_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_s_csc_csgetblk
|
||||
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,chksz)
|
||||
!!$ import :: psb_ipk_, psb_s_csc_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
|
||||
!!$ class(psb_s_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale,chksz
|
||||
!!$ 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
|
||||
|
||||
@@ -405,7 +405,7 @@ module psb_s_csr_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_
|
||||
class(psb_s_csr_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -416,26 +416,26 @@ module psb_s_csr_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
|
||||
class(psb_s_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_s_csr_csgetblk
|
||||
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)
|
||||
!!$ import :: psb_ipk_, psb_s_csr_sparse_mat, psb_spk_, psb_s_coo_sparse_mat
|
||||
!!$ class(psb_s_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ end subroutine psb_s_csr_csgetblk
|
||||
!!$ end interface
|
||||
|
||||
!> \memberof psb_s_csr_sparse_mat
|
||||
!! \see psb_s_base_mat_mod::psb_s_base_cssv
|
||||
|
||||
@@ -450,7 +450,7 @@ module psb_s_mat_mod
|
||||
|
||||
interface
|
||||
subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_sspmat_type, psb_spk_
|
||||
class(psb_sspmat_type), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -461,7 +461,7 @@ module psb_s_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_s_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ module psb_z_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_z_base_sparse_mat, psb_dpk_
|
||||
class(psb_z_base_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -327,7 +327,7 @@ module psb_z_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale, chksz
|
||||
end subroutine psb_z_base_csgetrow
|
||||
end interface
|
||||
|
||||
@@ -355,7 +355,7 @@ module psb_z_base_mat_mod
|
||||
!
|
||||
interface
|
||||
subroutine psb_z_base_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
& jmin,jmax,iren,append,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_z_base_sparse_mat, psb_z_coo_sparse_mat, psb_dpk_
|
||||
class(psb_z_base_sparse_mat), intent(in) :: a
|
||||
class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
@@ -364,7 +364,7 @@ module psb_z_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_z_base_csgetblk
|
||||
end interface
|
||||
|
||||
@@ -1550,7 +1550,7 @@ module psb_z_base_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_z_coo_sparse_mat, psb_dpk_
|
||||
class(psb_z_coo_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -1561,7 +1561,7 @@ module psb_z_base_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_z_coo_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ module psb_z_csc_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_
|
||||
class(psb_z_csc_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -324,27 +324,27 @@ module psb_z_csc_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat
|
||||
class(psb_z_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_z_csc_csgetblk
|
||||
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,chksz)
|
||||
!!$ import :: psb_ipk_, psb_z_csc_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat
|
||||
!!$ class(psb_z_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale,chksz
|
||||
!!$ 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
|
||||
|
||||
@@ -405,7 +405,7 @@ module psb_z_csr_mat_mod
|
||||
!! \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)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_
|
||||
class(psb_z_csr_sparse_mat), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -416,26 +416,26 @@ module psb_z_csr_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
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)
|
||||
import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat
|
||||
class(psb_z_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
end subroutine psb_z_csr_csgetblk
|
||||
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)
|
||||
!!$ import :: psb_ipk_, psb_z_csr_sparse_mat, psb_dpk_, psb_z_coo_sparse_mat
|
||||
!!$ class(psb_z_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ end subroutine psb_z_csr_csgetblk
|
||||
!!$ end interface
|
||||
|
||||
!> \memberof psb_z_csr_sparse_mat
|
||||
!! \see psb_z_base_mat_mod::psb_z_base_cssv
|
||||
|
||||
@@ -450,7 +450,7 @@ module psb_z_mat_mod
|
||||
|
||||
interface
|
||||
subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
import :: psb_ipk_, psb_zspmat_type, psb_dpk_
|
||||
class(psb_zspmat_type), intent(in) :: a
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
@@ -461,7 +461,7 @@ module psb_z_mat_mod
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
end subroutine psb_z_csgetrow
|
||||
end interface
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ subroutine psb_c_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
|
||||
end subroutine psb_c_base_csput_v
|
||||
|
||||
subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -422,7 +422,7 @@ subroutine psb_c_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
integer(psb_ipk_) :: err_act
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
|
||||
@@ -2259,7 +2259,7 @@ end subroutine psb_c_coo_csgetptn
|
||||
! The output is guaranteed to be sorted
|
||||
!
|
||||
subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2276,9 +2276,9 @@ subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2321,13 +2321,18 @@ subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2352,7 +2357,7 @@ subroutine psb_c_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2368,7 +2373,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
complex(psb_spk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append,chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
|
||||
@@ -2452,11 +2457,13 @@ contains
|
||||
nzt = jp - ip +1
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=ip,jp
|
||||
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
|
||||
@@ -2488,11 +2495,13 @@ contains
|
||||
|
||||
nrd = max(a%get_nrows(),1)
|
||||
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
k = 0
|
||||
do i=1, a%get_nzeros()
|
||||
@@ -2501,10 +2510,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = iren(a%ia(i))
|
||||
@@ -2519,11 +2530,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = (a%ia(i))
|
||||
|
||||
@@ -1686,7 +1686,7 @@ end subroutine psb_c_csc_csgetptn
|
||||
|
||||
|
||||
subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -1704,7 +1704,7 @@ subroutine psb_c_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
@@ -2557,60 +2557,60 @@ end subroutine psb_c_csc_reallocate_nz
|
||||
|
||||
|
||||
|
||||
subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_c_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csc_csgetblk
|
||||
!!$subroutine psb_c_csc_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_c_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_c_csc_csgetblk
|
||||
|
||||
subroutine psb_c_csc_reinit(a,clear)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1999,7 +1999,7 @@ end subroutine psb_c_csr_csgetptn
|
||||
|
||||
|
||||
subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2017,9 +2017,9 @@ subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2063,13 +2063,18 @@ subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2094,7 +2099,7 @@ subroutine psb_c_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2109,7 +2114,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
complex(psb_spk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append, chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
|
||||
@@ -2142,11 +2147,13 @@ contains
|
||||
nzt = (a%irp(lrw+1)-a%irp(irw))
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=irw, lrw
|
||||
@@ -2178,60 +2185,60 @@ contains
|
||||
|
||||
end subroutine psb_c_csr_csgetrow
|
||||
|
||||
subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_c_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_c_csr_csgetblk
|
||||
!!$subroutine psb_c_csr_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_c_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_c_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_c_csr_csgetblk
|
||||
|
||||
!
|
||||
! CSR implementation of tril/triu
|
||||
|
||||
@@ -793,7 +793,7 @@ end subroutine psb_c_csgetptn
|
||||
|
||||
|
||||
subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -810,7 +810,7 @@ subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='csget'
|
||||
@@ -826,7 +826,7 @@ subroutine psb_c_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
|
||||
call a%a%csget(imin,imax,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -406,7 +406,7 @@ subroutine psb_d_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
|
||||
end subroutine psb_d_base_csput_v
|
||||
|
||||
subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -422,7 +422,7 @@ subroutine psb_d_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
integer(psb_ipk_) :: err_act
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
|
||||
@@ -2259,7 +2259,7 @@ end subroutine psb_d_coo_csgetptn
|
||||
! The output is guaranteed to be sorted
|
||||
!
|
||||
subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2276,9 +2276,9 @@ subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2321,13 +2321,18 @@ subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2352,7 +2357,7 @@ subroutine psb_d_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2368,7 +2373,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
real(psb_dpk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append,chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
|
||||
@@ -2452,11 +2457,13 @@ contains
|
||||
nzt = jp - ip +1
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=ip,jp
|
||||
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
|
||||
@@ -2488,11 +2495,13 @@ contains
|
||||
|
||||
nrd = max(a%get_nrows(),1)
|
||||
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
k = 0
|
||||
do i=1, a%get_nzeros()
|
||||
@@ -2501,10 +2510,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = iren(a%ia(i))
|
||||
@@ -2519,11 +2530,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = (a%ia(i))
|
||||
|
||||
@@ -1686,7 +1686,7 @@ end subroutine psb_d_csc_csgetptn
|
||||
|
||||
|
||||
subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -1704,7 +1704,7 @@ subroutine psb_d_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
@@ -2557,60 +2557,60 @@ end subroutine psb_d_csc_reallocate_nz
|
||||
|
||||
|
||||
|
||||
subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_d_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csc_csgetblk
|
||||
!!$subroutine psb_d_csc_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_d_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_d_csc_csgetblk
|
||||
|
||||
subroutine psb_d_csc_reinit(a,clear)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1999,7 +1999,7 @@ end subroutine psb_d_csr_csgetptn
|
||||
|
||||
|
||||
subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2017,9 +2017,9 @@ subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2063,13 +2063,18 @@ subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2094,7 +2099,7 @@ subroutine psb_d_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2109,7 +2114,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
real(psb_dpk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append, chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
|
||||
@@ -2142,11 +2147,13 @@ contains
|
||||
nzt = (a%irp(lrw+1)-a%irp(irw))
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=irw, lrw
|
||||
@@ -2178,60 +2185,60 @@ contains
|
||||
|
||||
end subroutine psb_d_csr_csgetrow
|
||||
|
||||
subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_d_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_d_csr_csgetblk
|
||||
!!$subroutine psb_d_csr_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_d_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_d_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_d_csr_csgetblk
|
||||
|
||||
!
|
||||
! CSR implementation of tril/triu
|
||||
|
||||
@@ -793,7 +793,7 @@ end subroutine psb_d_csgetptn
|
||||
|
||||
|
||||
subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -810,7 +810,7 @@ subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='csget'
|
||||
@@ -826,7 +826,7 @@ subroutine psb_d_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
|
||||
call a%a%csget(imin,imax,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -406,7 +406,7 @@ subroutine psb_s_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
|
||||
end subroutine psb_s_base_csput_v
|
||||
|
||||
subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -422,7 +422,7 @@ subroutine psb_s_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
integer(psb_ipk_) :: err_act
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
|
||||
@@ -2259,7 +2259,7 @@ end subroutine psb_s_coo_csgetptn
|
||||
! The output is guaranteed to be sorted
|
||||
!
|
||||
subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2276,9 +2276,9 @@ subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2321,13 +2321,18 @@ subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2352,7 +2357,7 @@ subroutine psb_s_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2368,7 +2373,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
real(psb_spk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append,chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
|
||||
@@ -2452,11 +2457,13 @@ contains
|
||||
nzt = jp - ip +1
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=ip,jp
|
||||
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
|
||||
@@ -2488,11 +2495,13 @@ contains
|
||||
|
||||
nrd = max(a%get_nrows(),1)
|
||||
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
k = 0
|
||||
do i=1, a%get_nzeros()
|
||||
@@ -2501,10 +2510,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = iren(a%ia(i))
|
||||
@@ -2519,11 +2530,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = (a%ia(i))
|
||||
|
||||
@@ -1686,7 +1686,7 @@ end subroutine psb_s_csc_csgetptn
|
||||
|
||||
|
||||
subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -1704,7 +1704,7 @@ subroutine psb_s_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
@@ -2557,60 +2557,60 @@ end subroutine psb_s_csc_reallocate_nz
|
||||
|
||||
|
||||
|
||||
subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_s_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_s_csc_csgetblk
|
||||
!!$subroutine psb_s_csc_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_s_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_s_csc_csgetblk
|
||||
|
||||
subroutine psb_s_csc_reinit(a,clear)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1999,7 +1999,7 @@ end subroutine psb_s_csr_csgetptn
|
||||
|
||||
|
||||
subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2017,9 +2017,9 @@ subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2063,13 +2063,18 @@ subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2094,7 +2099,7 @@ subroutine psb_s_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2109,7 +2114,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
real(psb_spk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append, chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
|
||||
@@ -2142,11 +2147,13 @@ contains
|
||||
nzt = (a%irp(lrw+1)-a%irp(irw))
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=irw, lrw
|
||||
@@ -2178,60 +2185,60 @@ contains
|
||||
|
||||
end subroutine psb_s_csr_csgetrow
|
||||
|
||||
subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_s_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_s_csr_csgetblk
|
||||
!!$subroutine psb_s_csr_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_s_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_s_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_s_csr_csgetblk
|
||||
|
||||
!
|
||||
! CSR implementation of tril/triu
|
||||
|
||||
@@ -793,7 +793,7 @@ end subroutine psb_s_csgetptn
|
||||
|
||||
|
||||
subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -810,7 +810,7 @@ subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='csget'
|
||||
@@ -826,7 +826,7 @@ subroutine psb_s_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
|
||||
call a%a%csget(imin,imax,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
@@ -406,7 +406,7 @@ subroutine psb_z_base_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
|
||||
end subroutine psb_z_base_csput_v
|
||||
|
||||
subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -422,7 +422,7 @@ subroutine psb_z_base_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
integer(psb_ipk_) :: err_act
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
|
||||
@@ -2259,7 +2259,7 @@ end subroutine psb_z_coo_csgetptn
|
||||
! The output is guaranteed to be sorted
|
||||
!
|
||||
subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2276,9 +2276,9 @@ subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2321,13 +2321,18 @@ subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call coo_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2352,7 +2357,7 @@ subroutine psb_z_coo_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine coo_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2368,7 +2373,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
complex(psb_dpk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append,chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,ip,jp,i,k, nzt, irw, lrw, nra, nca, nrd
|
||||
@@ -2452,11 +2457,13 @@ contains
|
||||
nzt = jp - ip +1
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=ip,jp
|
||||
if ((jmin <= a%ja(i)).and.(a%ja(i)<=jmax)) then
|
||||
@@ -2488,11 +2495,13 @@ contains
|
||||
|
||||
nrd = max(a%get_nrows(),1)
|
||||
nzt = ((nza+nrd-1)/nrd)*(lrw-irw+1)
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
k = 0
|
||||
do i=1, a%get_nzeros()
|
||||
@@ -2501,10 +2510,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = iren(a%ia(i))
|
||||
@@ -2519,11 +2530,12 @@ contains
|
||||
k = k + 1
|
||||
if (k > nzt) then
|
||||
nzt = k + nzt
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
end if
|
||||
val(nzin_+k) = a%val(i)
|
||||
ia(nzin_+k) = (a%ia(i))
|
||||
|
||||
@@ -1686,7 +1686,7 @@ end subroutine psb_z_csc_csgetptn
|
||||
|
||||
|
||||
subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -1704,7 +1704,7 @@ subroutine psb_z_csc_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
@@ -2557,60 +2557,60 @@ end subroutine psb_z_csc_reallocate_nz
|
||||
|
||||
|
||||
|
||||
subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_z_csc_sparse_mat), intent(in) :: a
|
||||
class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_z_csc_csgetblk
|
||||
!!$subroutine psb_z_csc_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_z_csc_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_z_csc_csgetblk
|
||||
|
||||
subroutine psb_z_csc_reinit(a,clear)
|
||||
use psb_error_mod
|
||||
|
||||
@@ -1999,7 +1999,7 @@ end subroutine psb_z_csr_csgetptn
|
||||
|
||||
|
||||
subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -2017,9 +2017,9 @@ subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
logical :: append_, rscale_, cscale_
|
||||
logical :: append_, rscale_, cscale_, chksz_
|
||||
integer(psb_ipk_) :: nzin_, jmin_, jmax_, err_act, i
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
@@ -2063,13 +2063,18 @@ subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
else
|
||||
cscale_ = .false.
|
||||
endif
|
||||
if (present(chksz)) then
|
||||
chksz_ = chksz
|
||||
else
|
||||
chksz_ = .true.
|
||||
endif
|
||||
if ((rscale_.or.cscale_).and.(present(iren))) then
|
||||
info = psb_err_many_optional_arg_
|
||||
call psb_errpush(info,name,a_err='iren (rscale.or.cscale)')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,info,&
|
||||
call csr_getrow(imin,imax,jmin_,jmax_,a,nz,ia,ja,val,nzin_,append_,chksz_,info,&
|
||||
& iren)
|
||||
|
||||
if (rscale_) then
|
||||
@@ -2094,7 +2099,7 @@ subroutine psb_z_csr_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
contains
|
||||
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,info,&
|
||||
subroutine csr_getrow(imin,imax,jmin,jmax,a,nz,ia,ja,val,nzin,append,chksz,info,&
|
||||
& iren)
|
||||
|
||||
use psb_const_mod
|
||||
@@ -2109,7 +2114,7 @@ contains
|
||||
integer(psb_ipk_), allocatable, intent(inout) :: ia(:), ja(:)
|
||||
complex(psb_dpk_), allocatable, intent(inout) :: val(:)
|
||||
integer(psb_ipk_), intent(in) :: nzin
|
||||
logical, intent(in) :: append
|
||||
logical, intent(in) :: append, chksz
|
||||
integer(psb_ipk_) :: info
|
||||
integer(psb_ipk_), optional :: iren(:)
|
||||
integer(psb_ipk_) :: nzin_, nza, idx,i,j,k, nzt, irw, lrw, icl,lcl, nrd, ncd
|
||||
@@ -2142,11 +2147,13 @@ contains
|
||||
nzt = (a%irp(lrw+1)-a%irp(irw))
|
||||
nz = 0
|
||||
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
if (chksz) then
|
||||
call psb_ensure_size(nzin_+nzt,ia,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,ja,info)
|
||||
if (info == psb_success_) call psb_ensure_size(nzin_+nzt,val,info)
|
||||
|
||||
if (info /= psb_success_) return
|
||||
end if
|
||||
|
||||
if (present(iren)) then
|
||||
do i=irw, lrw
|
||||
@@ -2178,60 +2185,60 @@ contains
|
||||
|
||||
end subroutine psb_z_csr_csgetrow
|
||||
|
||||
subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,&
|
||||
& jmin,jmax,iren,append,rscale,cscale)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_csgetblk
|
||||
implicit none
|
||||
|
||||
class(psb_z_csr_sparse_mat), intent(in) :: a
|
||||
class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
integer(psb_ipk_), intent(in) :: imin,imax
|
||||
integer(psb_ipk_),intent(out) :: info
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
integer(psb_ipk_) :: ierr(5)
|
||||
character(len=20) :: name='csget'
|
||||
logical :: append_
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
info = psb_success_
|
||||
|
||||
if (present(append)) then
|
||||
append_ = append
|
||||
else
|
||||
append_ = .false.
|
||||
endif
|
||||
if (append_) then
|
||||
nzin = a%get_nzeros()
|
||||
else
|
||||
nzin = 0
|
||||
endif
|
||||
|
||||
call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
& jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
& nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call b%set_nzeros(nzin+nzout)
|
||||
call b%fix(info)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
|
||||
return
|
||||
|
||||
end subroutine psb_z_csr_csgetblk
|
||||
!!$subroutine psb_z_csr_csgetblk(imin,imax,a,b,info,&
|
||||
!!$ & jmin,jmax,iren,append,rscale,cscale)
|
||||
!!$ ! Output is always in COO format
|
||||
!!$ use psb_error_mod
|
||||
!!$ use psb_const_mod
|
||||
!!$ use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_csgetblk
|
||||
!!$ implicit none
|
||||
!!$
|
||||
!!$ class(psb_z_csr_sparse_mat), intent(in) :: a
|
||||
!!$ class(psb_z_coo_sparse_mat), intent(inout) :: b
|
||||
!!$ integer(psb_ipk_), intent(in) :: imin,imax
|
||||
!!$ integer(psb_ipk_),intent(out) :: info
|
||||
!!$ logical, intent(in), optional :: append
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
!!$ integer(psb_ipk_), intent(in), optional :: jmin,jmax
|
||||
!!$ logical, intent(in), optional :: rscale,cscale
|
||||
!!$ integer(psb_ipk_) :: err_act, nzin, nzout
|
||||
!!$ integer(psb_ipk_) :: ierr(5)
|
||||
!!$ character(len=20) :: name='csget'
|
||||
!!$ logical :: append_
|
||||
!!$ logical, parameter :: debug=.false.
|
||||
!!$
|
||||
!!$ call psb_erractionsave(err_act)
|
||||
!!$ info = psb_success_
|
||||
!!$
|
||||
!!$ if (present(append)) then
|
||||
!!$ append_ = append
|
||||
!!$ else
|
||||
!!$ append_ = .false.
|
||||
!!$ endif
|
||||
!!$ if (append_) then
|
||||
!!$ nzin = a%get_nzeros()
|
||||
!!$ else
|
||||
!!$ nzin = 0
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ call a%csget(imin,imax,nzout,b%ia,b%ja,b%val,info,&
|
||||
!!$ & jmin=jmin, jmax=jmax, iren=iren, append=append_, &
|
||||
!!$ & nzin=nzin, rscale=rscale, cscale=cscale)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call b%set_nzeros(nzin+nzout)
|
||||
!!$ call b%fix(info)
|
||||
!!$ if (info /= psb_success_) goto 9999
|
||||
!!$
|
||||
!!$ call psb_erractionrestore(err_act)
|
||||
!!$ return
|
||||
!!$
|
||||
!!$9999 call psb_error_handler(err_act)
|
||||
!!$
|
||||
!!$ return
|
||||
!!$
|
||||
!!$end subroutine psb_z_csr_csgetblk
|
||||
|
||||
!
|
||||
! CSR implementation of tril/triu
|
||||
|
||||
@@ -793,7 +793,7 @@ end subroutine psb_z_csgetptn
|
||||
|
||||
|
||||
subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
! Output is always in COO format
|
||||
use psb_error_mod
|
||||
use psb_const_mod
|
||||
@@ -810,7 +810,7 @@ subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
logical, intent(in), optional :: append
|
||||
integer(psb_ipk_), intent(in), optional :: iren(:)
|
||||
integer(psb_ipk_), intent(in), optional :: jmin,jmax, nzin
|
||||
logical, intent(in), optional :: rscale,cscale
|
||||
logical, intent(in), optional :: rscale,cscale,chksz
|
||||
|
||||
integer(psb_ipk_) :: err_act
|
||||
character(len=20) :: name='csget'
|
||||
@@ -826,7 +826,7 @@ subroutine psb_z_csgetrow(imin,imax,a,nz,ia,ja,val,info,&
|
||||
|
||||
|
||||
call a%a%csget(imin,imax,nz,ia,ja,val,info,&
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
||||
& jmin,jmax,iren,append,nzin,rscale,cscale,chksz)
|
||||
if (info /= psb_success_) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
Reference in New Issue
Block a user