|
|
@ -1,8 +1,8 @@
|
|
|
|
module psbn_d_cxx_mat_mod
|
|
|
|
module psb_d_cxx_mat_mod
|
|
|
|
|
|
|
|
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
|
|
|
|
|
|
|
|
type, extends(psbn_d_base_sparse_mat) :: psbn_d_cxx_sparse_mat
|
|
|
|
type, extends(psb_d_base_sparse_mat) :: psb_d_cxx_sparse_mat
|
|
|
|
|
|
|
|
|
|
|
|
integer, allocatable :: irp(:), ja(:)
|
|
|
|
integer, allocatable :: irp(:), ja(:)
|
|
|
|
real(psb_dpk_), allocatable :: val(:)
|
|
|
|
real(psb_dpk_), allocatable :: val(:)
|
|
|
@ -34,7 +34,7 @@ module psbn_d_cxx_mat_mod
|
|
|
|
procedure, pass(a) :: free => d_cxx_free
|
|
|
|
procedure, pass(a) :: free => d_cxx_free
|
|
|
|
procedure, pass(a) :: trim => d_cxx_trim
|
|
|
|
procedure, pass(a) :: trim => d_cxx_trim
|
|
|
|
procedure, pass(a) :: print => d_cxx_print
|
|
|
|
procedure, pass(a) :: print => d_cxx_print
|
|
|
|
end type psbn_d_cxx_sparse_mat
|
|
|
|
end type psb_d_cxx_sparse_mat
|
|
|
|
private :: d_cxx_get_nzeros, d_cxx_csmm, d_cxx_csmv, d_cxx_cssm, d_cxx_cssv, &
|
|
|
|
private :: d_cxx_get_nzeros, d_cxx_csmm, d_cxx_csmv, d_cxx_cssm, d_cxx_cssv, &
|
|
|
|
& d_cxx_csput, d_cxx_reallocate_nz, d_cxx_allocate_mnnz, &
|
|
|
|
& d_cxx_csput, d_cxx_reallocate_nz, d_cxx_allocate_mnnz, &
|
|
|
|
& d_cxx_free, d_cxx_print, d_cxx_get_fmt, d_cxx_csnmi, get_diag, &
|
|
|
|
& d_cxx_free, d_cxx_print, d_cxx_get_fmt, d_cxx_csnmi, get_diag, &
|
|
|
@ -48,10 +48,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_cp_cxx_to_fmt_impl(a,b,info)
|
|
|
|
subroutine d_cp_cxx_to_fmt_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_cp_cxx_to_fmt_impl
|
|
|
|
end subroutine d_cp_cxx_to_fmt_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -59,10 +59,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_cp_cxx_from_fmt_impl(a,b,info)
|
|
|
|
subroutine d_cp_cxx_from_fmt_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(in) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(in) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_cp_cxx_from_fmt_impl
|
|
|
|
end subroutine d_cp_cxx_from_fmt_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -71,10 +71,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_cp_cxx_to_coo_impl(a,b,info)
|
|
|
|
subroutine d_cp_cxx_to_coo_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_cp_cxx_to_coo_impl
|
|
|
|
end subroutine d_cp_cxx_to_coo_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -82,10 +82,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_cp_cxx_from_coo_impl(a,b,info)
|
|
|
|
subroutine d_cp_cxx_from_coo_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(in) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(in) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_cp_cxx_from_coo_impl
|
|
|
|
end subroutine d_cp_cxx_from_coo_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -93,10 +93,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_mv_cxx_to_fmt_impl(a,b,info)
|
|
|
|
subroutine d_mv_cxx_to_fmt_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_mv_cxx_to_fmt_impl
|
|
|
|
end subroutine d_mv_cxx_to_fmt_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -104,10 +104,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_mv_cxx_from_fmt_impl(a,b,info)
|
|
|
|
subroutine d_mv_cxx_from_fmt_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(inout) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(inout) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_mv_cxx_from_fmt_impl
|
|
|
|
end subroutine d_mv_cxx_from_fmt_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -116,10 +116,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_mv_cxx_to_coo_impl(a,b,info)
|
|
|
|
subroutine d_mv_cxx_to_coo_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_mv_cxx_to_coo_impl
|
|
|
|
end subroutine d_mv_cxx_to_coo_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -127,10 +127,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_mv_cxx_from_coo_impl(a,b,info)
|
|
|
|
subroutine d_mv_cxx_from_coo_impl(a,b,info)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psbn_d_base_mat_mod
|
|
|
|
use psb_d_base_mat_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(inout) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
end subroutine d_mv_cxx_from_coo_impl
|
|
|
|
end subroutine d_mv_cxx_from_coo_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -138,8 +138,8 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface
|
|
|
|
interface
|
|
|
|
subroutine d_cxx_csput_impl(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
|
|
|
|
subroutine d_cxx_csput_impl(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: val(:)
|
|
|
|
real(psb_dpk_), intent(in) :: val(:)
|
|
|
|
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
|
|
|
|
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -151,10 +151,10 @@ module psbn_d_cxx_mat_mod
|
|
|
|
subroutine d_cxx_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
|
|
|
|
subroutine d_cxx_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
|
|
|
|
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
|
|
|
& jmin,jmax,iren,append,nzin,rscale,cscale)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
integer, intent(out) :: nz
|
|
|
|
integer, intent(out) :: nz
|
|
|
|
integer, allocatable, intent(inout) :: ia(:), ja(:)
|
|
|
|
integer, allocatable, intent(inout) :: ia(:), ja(:)
|
|
|
@ -170,8 +170,8 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface d_cxx_cssm_impl
|
|
|
|
interface d_cxx_cssm_impl
|
|
|
|
subroutine d_cxx_cssv_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_cssv_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -179,8 +179,8 @@ module psbn_d_cxx_mat_mod
|
|
|
|
end subroutine d_cxx_cssv_impl
|
|
|
|
end subroutine d_cxx_cssv_impl
|
|
|
|
subroutine d_cxx_cssm_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_cssm_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -191,8 +191,8 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface d_cxx_csmm_impl
|
|
|
|
interface d_cxx_csmm_impl
|
|
|
|
subroutine d_cxx_csmv_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_csmv_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -200,8 +200,8 @@ module psbn_d_cxx_mat_mod
|
|
|
|
end subroutine d_cxx_csmv_impl
|
|
|
|
end subroutine d_cxx_csmv_impl
|
|
|
|
subroutine d_cxx_csmm_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_csmm_impl(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -212,8 +212,8 @@ module psbn_d_cxx_mat_mod
|
|
|
|
interface d_cxx_csnmi_impl
|
|
|
|
interface d_cxx_csnmi_impl
|
|
|
|
function d_cxx_csnmi_impl(a) result(res)
|
|
|
|
function d_cxx_csnmi_impl(a) result(res)
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
import psbn_d_cxx_sparse_mat
|
|
|
|
import psb_d_cxx_sparse_mat
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_) :: res
|
|
|
|
real(psb_dpk_) :: res
|
|
|
|
end function d_cxx_csnmi_impl
|
|
|
|
end function d_cxx_csnmi_impl
|
|
|
|
end interface
|
|
|
|
end interface
|
|
|
@ -236,21 +236,21 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
function d_cxx_get_fmt(a) result(res)
|
|
|
|
function d_cxx_get_fmt(a) result(res)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
character(len=5) :: res
|
|
|
|
character(len=5) :: res
|
|
|
|
res = 'CXX'
|
|
|
|
res = 'CXX'
|
|
|
|
end function d_cxx_get_fmt
|
|
|
|
end function d_cxx_get_fmt
|
|
|
|
|
|
|
|
|
|
|
|
function d_cxx_get_nzeros(a) result(res)
|
|
|
|
function d_cxx_get_nzeros(a) result(res)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
integer :: res
|
|
|
|
integer :: res
|
|
|
|
res = a%irp(a%m+1)-1
|
|
|
|
res = a%irp(a%m+1)-1
|
|
|
|
end function d_cxx_get_nzeros
|
|
|
|
end function d_cxx_get_nzeros
|
|
|
|
|
|
|
|
|
|
|
|
function d_cxx_get_size(a) result(res)
|
|
|
|
function d_cxx_get_size(a) result(res)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
integer :: res
|
|
|
|
integer :: res
|
|
|
|
|
|
|
|
|
|
|
|
res = -1
|
|
|
|
res = -1
|
|
|
@ -290,7 +290,7 @@ contains
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
integer, intent(in) :: nz
|
|
|
|
integer, intent(in) :: nz
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
Integer :: err_act, info
|
|
|
|
Integer :: err_act, info
|
|
|
|
character(len=20) :: name='d_cxx_reallocate_nz'
|
|
|
|
character(len=20) :: name='d_cxx_reallocate_nz'
|
|
|
|
logical, parameter :: debug=.false.
|
|
|
|
logical, parameter :: debug=.false.
|
|
|
@ -323,7 +323,7 @@ contains
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: val(:)
|
|
|
|
real(psb_dpk_), intent(in) :: val(:)
|
|
|
|
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
|
|
|
|
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -389,7 +389,7 @@ contains
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
integer, intent(out) :: nz
|
|
|
|
integer, intent(out) :: nz
|
|
|
|
integer, allocatable, intent(inout) :: ia(:), ja(:)
|
|
|
|
integer, allocatable, intent(inout) :: ia(:), ja(:)
|
|
|
@ -433,8 +433,8 @@ contains
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(inout) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
integer, intent(in) :: imin,imax
|
|
|
|
integer,intent(out) :: info
|
|
|
|
integer,intent(out) :: info
|
|
|
|
logical, intent(in), optional :: append
|
|
|
|
logical, intent(in), optional :: append
|
|
|
@ -492,8 +492,8 @@ contains
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
integer,intent(out) :: info
|
|
|
|
integer,intent(out) :: info
|
|
|
|
integer, intent(in), optional :: imin,imax,jmin,jmax
|
|
|
|
integer, intent(in), optional :: imin,imax,jmin,jmax
|
|
|
|
logical, intent(in), optional :: rscale,cscale
|
|
|
|
logical, intent(in), optional :: rscale,cscale
|
|
|
@ -578,7 +578,7 @@ contains
|
|
|
|
subroutine d_cxx_free(a)
|
|
|
|
subroutine d_cxx_free(a)
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(a%irp)) deallocate(a%irp)
|
|
|
|
if (allocated(a%irp)) deallocate(a%irp)
|
|
|
|
if (allocated(a%ja)) deallocate(a%ja)
|
|
|
|
if (allocated(a%ja)) deallocate(a%ja)
|
|
|
@ -595,7 +595,7 @@ contains
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
Integer :: err_act, info, nz, m
|
|
|
|
Integer :: err_act, info, nz, m
|
|
|
|
character(len=20) :: name='trim'
|
|
|
|
character(len=20) :: name='trim'
|
|
|
|
logical, parameter :: debug=.false.
|
|
|
|
logical, parameter :: debug=.false.
|
|
|
@ -628,8 +628,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -660,8 +660,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(in) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(in) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -693,8 +693,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -725,8 +725,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(in) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(in) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -758,8 +758,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -790,8 +790,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_coo_sparse_mat), intent(inout) :: b
|
|
|
|
class(psb_d_coo_sparse_mat), intent(inout) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -823,8 +823,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(out) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(out) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -855,8 +855,8 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psbn_d_base_sparse_mat), intent(inout) :: b
|
|
|
|
class(psb_d_base_sparse_mat), intent(inout) :: b
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -889,7 +889,7 @@ contains
|
|
|
|
use psb_realloc_mod
|
|
|
|
use psb_realloc_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
integer, intent(in) :: m,n
|
|
|
|
integer, intent(in) :: m,n
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
integer, intent(in), optional :: nz
|
|
|
|
integer, intent(in), optional :: nz
|
|
|
|
Integer :: err_act, info, nz_
|
|
|
|
Integer :: err_act, info, nz_
|
|
|
|
character(len=20) :: name='allocate_mnz'
|
|
|
|
character(len=20) :: name='allocate_mnz'
|
|
|
@ -949,7 +949,7 @@ contains
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
integer, intent(in) :: iout
|
|
|
|
integer, intent(in) :: iout
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
integer, intent(in), optional :: iv(:)
|
|
|
|
integer, intent(in), optional :: iv(:)
|
|
|
|
integer, intent(in), optional :: eirs,eics
|
|
|
|
integer, intent(in), optional :: eirs,eics
|
|
|
|
character(len=*), optional :: head
|
|
|
|
character(len=*), optional :: head
|
|
|
@ -1042,7 +1042,7 @@ contains
|
|
|
|
subroutine d_cxx_csmv(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_csmv(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -1086,7 +1086,7 @@ contains
|
|
|
|
subroutine d_cxx_csmm(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_csmm(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -1126,7 +1126,7 @@ contains
|
|
|
|
subroutine d_cxx_cssv(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_cssv(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -1180,7 +1180,7 @@ contains
|
|
|
|
subroutine d_cxx_cssm(alpha,a,x,beta,y,info,trans)
|
|
|
|
subroutine d_cxx_cssm(alpha,a,x,beta,y,info,trans)
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
real(psb_dpk_), intent(inout) :: y(:,:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -1231,7 +1231,7 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_) :: res
|
|
|
|
real(psb_dpk_) :: res
|
|
|
|
|
|
|
|
|
|
|
|
Integer :: err_act
|
|
|
|
Integer :: err_act
|
|
|
@ -1249,7 +1249,7 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(in) :: a
|
|
|
|
real(psb_dpk_), intent(out) :: d(:)
|
|
|
|
real(psb_dpk_), intent(out) :: d(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
@ -1297,7 +1297,7 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: d(:)
|
|
|
|
real(psb_dpk_), intent(in) :: d(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
@ -1339,7 +1339,7 @@ contains
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_const_mod
|
|
|
|
use psb_const_mod
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
class(psbn_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
class(psb_d_cxx_sparse_mat), intent(inout) :: a
|
|
|
|
real(psb_dpk_), intent(in) :: d
|
|
|
|
real(psb_dpk_), intent(in) :: d
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
@ -1370,4 +1370,4 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end module psbn_d_cxx_mat_mod
|
|
|
|
end module psb_d_cxx_mat_mod
|
|
|
|