newserial/psbn_base_mat_mod.f03
 newserial/psbn_d_base_mat_mod.f03
 newserial/psbn_d_csr_mat_mod.f03
 newserial/psbn_mat_impl.f03
 newserial/psbn_mat_mod.f03

Preparing for switchover to psb_, step 2
This commit is contained in:
Salvatore Filippone
2009-09-16 14:11:07 +00:00
parent 9d8d8d7ad3
commit 108d0b844b
5 changed files with 395 additions and 395 deletions
+63 -63
View File
@@ -1,30 +1,30 @@
module psbn_base_mat_mod
module psb_base_mat_mod
use psb_const_mod
!!$ integer, parameter :: psbn_invalid_ = -1
!!$ integer, parameter :: psbn_spmat_null_=0, psbn_spmat_bld_=1
!!$ integer, parameter :: psbn_spmat_asb_=2, psbn_spmat_upd_=4
!!$ integer, parameter :: psb_invalid_ = -1
!!$ integer, parameter :: psb_spmat_null_=0, psb_spmat_bld_=1
!!$ integer, parameter :: psb_spmat_asb_=2, psb_spmat_upd_=4
!!$
!!$ integer, parameter :: psbn_ireg_flgs_=10, psbn_ip2_=0
!!$ integer, parameter :: psbn_iflag_=2, psbn_ichk_=3
!!$ integer, parameter :: psbn_nnzt_=4, psbn_zero_=5,psbn_ipc_=6
!!$ integer, parameter :: psb_ireg_flgs_=10, psb_ip2_=0
!!$ integer, parameter :: psb_iflag_=2, psb_ichk_=3
!!$ integer, parameter :: psb_nnzt_=4, psb_zero_=5,psb_ipc_=6
!!$ ! Duplicate coefficients handling
!!$ ! These are usually set while calling spcnv as one of its
!!$ ! optional arugments.
!!$ integer, parameter :: psbn_dupl_ovwrt_ = 0
!!$ integer, parameter :: psbn_dupl_add_ = 1
!!$ integer, parameter :: psbn_dupl_err_ = 2
!!$ integer, parameter :: psbn_dupl_def_ = psbn_dupl_ovwrt_
!!$ integer, parameter :: psb_dupl_ovwrt_ = 0
!!$ integer, parameter :: psb_dupl_add_ = 1
!!$ integer, parameter :: psb_dupl_err_ = 2
!!$ integer, parameter :: psb_dupl_def_ = psb_dupl_ovwrt_
!!$ ! Matrix update mode
!!$ integer, parameter :: psbn_upd_srch_ = 98764
!!$ integer, parameter :: psbn_upd_perm_ = 98765
!!$ integer, parameter :: psbn_upd_dflt_ = psbn_upd_srch_
!!$ integer, parameter :: psbn_maxjdrows_=8, psbn_minjdrows_=4
!!$ integer, parameter :: psbn_dbleint_=2
!!$ integer, parameter :: psb_upd_srch_ = 98764
!!$ integer, parameter :: psb_upd_perm_ = 98765
!!$ integer, parameter :: psb_upd_dflt_ = psb_upd_srch_
!!$ integer, parameter :: psb_maxjdrows_=8, psb_minjdrows_=4
!!$ integer, parameter :: psb_dbleint_=2
type :: psbn_base_sparse_mat
type :: psb_base_sparse_mat
integer :: m, n
integer, private :: state, duplicate
logical, private :: triangle, unitd, upper, sorted
@@ -89,7 +89,7 @@ module psbn_base_mat_mod
procedure, pass(a) :: print => sparse_print
procedure, pass(a) :: sizeof
end type psbn_base_sparse_mat
end type psb_base_sparse_mat
private :: set_nrows, set_ncols, set_dupl, set_state, &
& set_null, set_bld, set_upd, set_asb, set_sorted, set_upper, &
@@ -105,7 +105,7 @@ contains
function sizeof(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
end function sizeof
@@ -114,14 +114,14 @@ contains
function get_fmt(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
character(len=5) :: res
res = 'NULL'
end function get_fmt
function get_dupl(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
res = a%duplicate
end function get_dupl
@@ -129,21 +129,21 @@ contains
function get_state(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
res = a%state
end function get_state
function get_nrows(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
res = a%m
end function get_nrows
function get_ncols(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
res = a%n
end function get_ncols
@@ -151,14 +151,14 @@ contains
subroutine set_nrows(m,a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in) :: m
a%m = m
end subroutine set_nrows
subroutine set_ncols(n,a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in) :: n
a%n = n
end subroutine set_ncols
@@ -166,7 +166,7 @@ contains
subroutine set_state(n,a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in) :: n
a%state = n
end subroutine set_state
@@ -174,42 +174,42 @@ contains
subroutine set_dupl(n,a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in) :: n
a%duplicate = n
end subroutine set_dupl
subroutine set_null(a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
a%state = psbn_spmat_null_
a%state = psb_spmat_null_
end subroutine set_null
subroutine set_bld(a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
a%state = psbn_spmat_bld_
a%state = psb_spmat_bld_
end subroutine set_bld
subroutine set_upd(a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
a%state = psbn_spmat_upd_
a%state = psb_spmat_upd_
end subroutine set_upd
subroutine set_asb(a)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
a%state = psbn_spmat_asb_
a%state = psb_spmat_asb_
end subroutine set_asb
subroutine set_sorted(a,val)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
if (present(val)) then
@@ -221,7 +221,7 @@ contains
subroutine set_triangle(a,val)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
if (present(val)) then
@@ -233,7 +233,7 @@ contains
subroutine set_unit(a,val)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
if (present(val)) then
@@ -245,7 +245,7 @@ contains
subroutine set_lower(a,val)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
if (present(val)) then
@@ -257,7 +257,7 @@ contains
subroutine set_upper(a,val)
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
if (present(val)) then
@@ -269,63 +269,63 @@ contains
function is_triangle(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = a%triangle
end function is_triangle
function is_unit(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = a%unitd
end function is_unit
function is_upper(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = a%upper
end function is_upper
function is_lower(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = .not.a%upper
end function is_lower
function is_null(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = (a%state == psbn_spmat_null_)
res = (a%state == psb_spmat_null_)
end function is_null
function is_bld(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = (a%state == psbn_spmat_bld_)
res = (a%state == psb_spmat_bld_)
end function is_bld
function is_upd(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = (a%state == psbn_spmat_upd_)
res = (a%state == psb_spmat_upd_)
end function is_upd
function is_asb(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = (a%state == psbn_spmat_asb_)
res = (a%state == psb_spmat_asb_)
end function is_asb
function is_sorted(a) result(res)
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
logical :: res
res = a%sorted
end function is_sorted
@@ -334,7 +334,7 @@ contains
function get_nzeros(a) result(res)
use psb_error_mod
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act
@@ -358,7 +358,7 @@ contains
function get_size(a) result(res)
use psb_error_mod
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act
@@ -384,7 +384,7 @@ contains
implicit none
integer, intent(in) :: iout
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer, intent(in), optional :: iv(:)
integer, intent(in), optional :: eirs,eics
character(len=*), optional :: head
@@ -412,7 +412,7 @@ contains
subroutine get_neigh(a,idx,neigh,n,info,lev)
use psb_error_mod
implicit none
class(psbn_base_sparse_mat), intent(in) :: a
class(psb_base_sparse_mat), intent(in) :: a
integer, intent(in) :: idx
integer, intent(out) :: n
integer, allocatable, intent(out) :: neigh(:)
@@ -441,7 +441,7 @@ contains
use psb_error_mod
implicit none
integer, intent(in) :: m,n
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
integer, intent(in), optional :: nz
Integer :: err_act
character(len=20) :: name='allocate_mnz'
@@ -464,7 +464,7 @@ contains
use psb_error_mod
implicit none
integer, intent(in) :: nz
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
@@ -485,7 +485,7 @@ contains
subroutine free(a)
use psb_error_mod
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
Integer :: err_act
character(len=20) :: name='free'
logical, parameter :: debug=.false.
@@ -506,7 +506,7 @@ contains
subroutine trim(a)
use psb_error_mod
implicit none
class(psbn_base_sparse_mat), intent(inout) :: a
class(psb_base_sparse_mat), intent(inout) :: a
Integer :: err_act
character(len=20) :: name='trim'
logical, parameter :: debug=.false.
@@ -524,5 +524,5 @@ contains
end subroutine trim
end module psbn_base_mat_mod
end module psb_base_mat_mod
+118 -118
View File
@@ -1,8 +1,8 @@
module psbn_d_base_mat_mod
module psb_d_base_mat_mod
use psbn_base_mat_mod
use psb_base_mat_mod
type, extends(psbn_base_sparse_mat) :: psbn_d_base_sparse_mat
type, extends(psb_base_sparse_mat) :: psb_d_base_sparse_mat
contains
procedure, pass(a) :: d_base_csmv
procedure, pass(a) :: d_base_csmm
@@ -32,7 +32,7 @@ module psbn_d_base_mat_mod
procedure, pass(a) :: mv_from_coo
procedure, pass(a) :: mv_to_fmt
procedure, pass(a) :: mv_from_fmt
end type psbn_d_base_sparse_mat
end type psb_d_base_sparse_mat
private :: d_base_csmv, d_base_csmm, d_base_cssv, d_base_cssm,&
& d_scals, d_scal, csnmi, csput, d_csgetrow, d_csgetblk, &
@@ -41,7 +41,7 @@ module psbn_d_base_mat_mod
& get_diag, csclip, d_cssv, d_cssm
type, extends(psbn_d_base_sparse_mat) :: psbn_d_coo_sparse_mat
type, extends(psb_d_base_sparse_mat) :: psb_d_coo_sparse_mat
integer :: nnz
integer, allocatable :: ia(:), ja(:)
@@ -79,7 +79,7 @@ module psbn_d_base_mat_mod
procedure, pass(a) :: get_fmt => d_coo_get_fmt
procedure, pass(a) :: sizeof => d_coo_sizeof
end type psbn_d_coo_sparse_mat
end type psb_d_coo_sparse_mat
private :: d_coo_get_nzeros, d_coo_set_nzeros, d_coo_get_diag, &
& d_coo_csmm, d_coo_csmv, d_coo_cssm, d_coo_cssv, d_coo_csnmi, &
@@ -104,8 +104,8 @@ module psbn_d_base_mat_mod
interface
subroutine d_fix_coo_impl(a,info,idir)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
integer, intent(out) :: info
integer, intent(in), optional :: idir
end subroutine d_fix_coo_impl
@@ -114,9 +114,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_cp_coo_to_coo_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_cp_coo_to_coo_impl
end interface
@@ -124,9 +124,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_cp_coo_from_coo_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(in) :: b
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(in) :: b
integer, intent(out) :: info
end subroutine d_cp_coo_from_coo_impl
end interface
@@ -134,9 +134,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_cp_coo_to_fmt_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat, psbn_d_base_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
import psb_d_coo_sparse_mat, psb_d_base_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_cp_coo_to_fmt_impl
end interface
@@ -144,9 +144,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_cp_coo_from_fmt_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat, psbn_d_base_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(in) :: b
import psb_d_coo_sparse_mat, psb_d_base_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(in) :: b
integer, intent(out) :: info
end subroutine d_cp_coo_from_fmt_impl
end interface
@@ -154,9 +154,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_mv_coo_to_coo_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_mv_coo_to_coo_impl
end interface
@@ -164,9 +164,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_mv_coo_from_coo_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
end subroutine d_mv_coo_from_coo_impl
end interface
@@ -174,9 +174,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_mv_coo_to_fmt_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat, psbn_d_base_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
import psb_d_coo_sparse_mat, psb_d_base_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_mv_coo_to_fmt_impl
end interface
@@ -184,9 +184,9 @@ module psbn_d_base_mat_mod
interface
subroutine d_mv_coo_from_fmt_impl(a,b,info)
use psb_const_mod
import psbn_d_coo_sparse_mat, psbn_d_base_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(inout) :: b
import psb_d_coo_sparse_mat, psb_d_base_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
end subroutine d_mv_coo_from_fmt_impl
end interface
@@ -195,8 +195,8 @@ module psbn_d_base_mat_mod
interface
subroutine d_coo_csput_impl(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(inout) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz,ia(:), ja(:),&
& imin,imax,jmin,jmax
@@ -209,10 +209,10 @@ module psbn_d_base_mat_mod
subroutine d_coo_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
use psb_const_mod
import psbn_d_coo_sparse_mat
import psb_d_coo_sparse_mat
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -228,8 +228,8 @@ module psbn_d_base_mat_mod
interface d_coo_cssm_impl
subroutine d_coo_cssv_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -237,8 +237,8 @@ module psbn_d_base_mat_mod
end subroutine d_coo_cssv_impl
subroutine d_coo_cssm_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -249,8 +249,8 @@ module psbn_d_base_mat_mod
interface d_coo_csmm_impl
subroutine d_coo_csmv_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -258,8 +258,8 @@ module psbn_d_base_mat_mod
end subroutine d_coo_csmv_impl
subroutine d_coo_csmm_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -271,8 +271,8 @@ module psbn_d_base_mat_mod
interface d_coo_csnmi_impl
function d_coo_csnmi_impl(a) result(res)
use psb_const_mod
import psbn_d_coo_sparse_mat
class(psbn_d_coo_sparse_mat), intent(in) :: a
import psb_d_coo_sparse_mat
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_) :: res
end function d_coo_csnmi_impl
end interface
@@ -298,8 +298,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -324,8 +324,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(in) :: b
class(psb_d_base_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(in) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -351,8 +351,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -377,8 +377,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(in) :: b
class(psb_d_base_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(in) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -404,8 +404,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_base_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -430,8 +430,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
class(psb_d_base_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -457,8 +457,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
class(psb_d_base_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -483,8 +483,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(inout) :: b
class(psb_d_base_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -510,7 +510,7 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_base_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
integer, intent(out) :: info
@@ -541,7 +541,7 @@ contains
use psb_const_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -578,8 +578,8 @@ contains
use psb_const_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(in) :: imin,imax
integer,intent(out) :: info
logical, intent(in), optional :: append
@@ -637,8 +637,8 @@ contains
use psb_const_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer,intent(out) :: info
integer, intent(in), optional :: imin,imax,jmin,jmax
logical, intent(in), optional :: rscale,cscale
@@ -737,7 +737,7 @@ contains
subroutine d_base_csmm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -764,7 +764,7 @@ contains
subroutine d_base_csmv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(kind(1.d0)), intent(in) :: alpha, beta, x(:)
real(kind(1.d0)), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -792,7 +792,7 @@ contains
subroutine d_base_cssm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -819,7 +819,7 @@ contains
subroutine d_base_cssv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -847,7 +847,7 @@ contains
use psb_error_mod
use psb_string_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -981,7 +981,7 @@ contains
use psb_error_mod
use psb_string_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -1106,7 +1106,7 @@ contains
subroutine d_scals(d,a,info)
use psb_error_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: d
integer, intent(out) :: info
@@ -1132,7 +1132,7 @@ contains
subroutine d_scal(d,a,info)
use psb_error_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: d(:)
integer, intent(out) :: info
@@ -1159,7 +1159,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_) :: res
Integer :: err_act, info
@@ -1186,7 +1186,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(out) :: d(:)
integer, intent(out) :: info
@@ -1228,7 +1228,7 @@ contains
function d_coo_sizeof(a) result(res)
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8 + 1
res = res + psb_sizeof_dp * size(a%val)
@@ -1240,7 +1240,7 @@ contains
function d_coo_get_fmt(a) result(res)
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
character(len=5) :: res
res = 'COO'
end function d_coo_get_fmt
@@ -1248,7 +1248,7 @@ contains
function d_coo_get_size(a) result(res)
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
integer :: res
res = -1
@@ -1272,7 +1272,7 @@ contains
function d_coo_get_nzeros(a) result(res)
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
integer :: res
res = a%nnz
end function d_coo_get_nzeros
@@ -1294,7 +1294,7 @@ contains
subroutine d_coo_set_nzeros(nz,a)
implicit none
integer, intent(in) :: nz
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
a%nnz = nz
@@ -1317,7 +1317,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
integer, intent(out) :: info
integer, intent(in), optional :: idir
Integer :: err_act
@@ -1351,8 +1351,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1383,8 +1383,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(in) :: b
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(in) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1415,8 +1415,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
class(psb_d_coo_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1447,8 +1447,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(in) :: b
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(in) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1481,8 +1481,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1513,8 +1513,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1545,8 +1545,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1577,8 +1577,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(inout) :: b
class(psb_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -1612,7 +1612,7 @@ contains
use psb_realloc_mod
implicit none
integer, intent(in) :: nz
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='d_coo_reallocate_nz'
logical, parameter :: debug=.false.
@@ -1645,7 +1645,7 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
integer, intent(out) :: info
@@ -1713,7 +1713,7 @@ contains
use psb_const_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -1757,7 +1757,7 @@ contains
!!$ use psb_const_mod
!!$ implicit none
!!$
!!$ class(psbn_d_coo_sparse_mat), intent(inout) :: a
!!$ class(psb_d_coo_sparse_mat), intent(inout) :: a
!!$ integer, intent(in) :: irw
!!$ integer, intent(out) :: nz
!!$ integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -1795,7 +1795,7 @@ contains
subroutine d_coo_free(a)
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
if (allocated(a%ia)) deallocate(a%ia)
if (allocated(a%ja)) deallocate(a%ja)
@@ -1813,7 +1813,7 @@ contains
use psb_realloc_mod
use psb_error_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
Integer :: err_act, info, nz
character(len=20) :: name='trim'
logical, parameter :: debug=.false.
@@ -1845,7 +1845,7 @@ contains
use psb_realloc_mod
implicit none
integer, intent(in) :: m,n
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
integer, intent(in), optional :: nz
Integer :: err_act, info, nz_
character(len=20) :: name='allocate_mnz'
@@ -1883,7 +1883,7 @@ contains
call a%set_bld()
call a%set_triangle(.false.)
call a%set_unit(.false.)
call a%set_dupl(psbn_dupl_def_)
call a%set_dupl(psb_dupl_def_)
end if
if (info /= 0) goto 9999
call psb_erractionrestore(err_act)
@@ -1906,7 +1906,7 @@ contains
implicit none
integer, intent(in) :: iout
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
integer, intent(in), optional :: iv(:)
integer, intent(in), optional :: eirs,eics
character(len=*), optional :: head
@@ -1990,7 +1990,7 @@ contains
subroutine d_coo_csmv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -2046,7 +2046,7 @@ contains
subroutine d_coo_csmm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -2103,7 +2103,7 @@ contains
subroutine d_coo_cssv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -2169,7 +2169,7 @@ contains
subroutine d_coo_cssm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -2232,7 +2232,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_) :: res
Integer :: err_act
@@ -2250,7 +2250,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(out) :: d(:)
integer, intent(out) :: info
@@ -2293,7 +2293,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: d(:)
integer, intent(out) :: info
@@ -2333,7 +2333,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_coo_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: d
integer, intent(out) :: info
@@ -2363,7 +2363,7 @@ contains
end subroutine d_coo_scals
end module psbn_d_base_mat_mod
end module psb_d_base_mat_mod
+90 -90
View File
@@ -1,8 +1,8 @@
module psbn_d_csr_mat_mod
module psb_d_csr_mat_mod
use psbn_d_base_mat_mod
use psb_d_base_mat_mod
type, extends(psbn_d_base_sparse_mat) :: psbn_d_csr_sparse_mat
type, extends(psb_d_base_sparse_mat) :: psb_d_csr_sparse_mat
integer, allocatable :: irp(:), ja(:)
real(psb_dpk_), allocatable :: val(:)
@@ -35,7 +35,7 @@ module psbn_d_csr_mat_mod
procedure, pass(a) :: trim => d_csr_trim
procedure, pass(a) :: print => d_csr_print
procedure, pass(a) :: sizeof => d_csr_sizeof
end type psbn_d_csr_sparse_mat
end type psb_d_csr_sparse_mat
private :: d_csr_get_nzeros, d_csr_csmm, d_csr_csmv, d_csr_cssm, d_csr_cssv, &
& d_csr_csput, d_csr_reallocate_nz, d_csr_allocate_mnnz, &
& d_csr_free, d_csr_print, d_csr_get_fmt, d_csr_csnmi, get_diag, &
@@ -50,10 +50,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_cp_csr_to_fmt_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_cp_csr_to_fmt_impl
end interface
@@ -61,10 +61,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_cp_csr_from_fmt_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(in) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(in) :: b
integer, intent(out) :: info
end subroutine d_cp_csr_from_fmt_impl
end interface
@@ -73,10 +73,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_cp_csr_to_coo_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_cp_csr_to_coo_impl
end interface
@@ -84,10 +84,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_cp_csr_from_coo_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(in) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(in) :: b
integer, intent(out) :: info
end subroutine d_cp_csr_from_coo_impl
end interface
@@ -95,10 +95,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_mv_csr_to_fmt_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_mv_csr_to_fmt_impl
end interface
@@ -106,10 +106,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_mv_csr_from_fmt_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(inout) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
end subroutine d_mv_csr_from_fmt_impl
end interface
@@ -118,10 +118,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_mv_csr_to_coo_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
end subroutine d_mv_csr_to_coo_impl
end interface
@@ -129,10 +129,10 @@ module psbn_d_csr_mat_mod
interface
subroutine d_mv_csr_from_coo_impl(a,b,info)
use psb_const_mod
use psbn_d_base_mat_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
use psb_d_base_mat_mod
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
end subroutine d_mv_csr_from_coo_impl
end interface
@@ -140,8 +140,8 @@ module psbn_d_csr_mat_mod
interface
subroutine d_csr_csput_impl(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
use psb_const_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(inout) :: a
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
integer, intent(out) :: info
@@ -153,10 +153,10 @@ module psbn_d_csr_mat_mod
subroutine d_csr_csgetrow_impl(imin,imax,a,nz,ia,ja,val,info,&
& jmin,jmax,iren,append,nzin,rscale,cscale)
use psb_const_mod
import psbn_d_csr_sparse_mat
import psb_d_csr_sparse_mat
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -172,8 +172,8 @@ module psbn_d_csr_mat_mod
interface d_csr_cssm_impl
subroutine d_csr_cssv_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -181,8 +181,8 @@ module psbn_d_csr_mat_mod
end subroutine d_csr_cssv_impl
subroutine d_csr_cssm_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -193,8 +193,8 @@ module psbn_d_csr_mat_mod
interface d_csr_csmm_impl
subroutine d_csr_csmv_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -202,8 +202,8 @@ module psbn_d_csr_mat_mod
end subroutine d_csr_csmv_impl
subroutine d_csr_csmm_impl(alpha,a,x,beta,y,info,trans)
use psb_const_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -214,8 +214,8 @@ module psbn_d_csr_mat_mod
interface d_csr_csnmi_impl
function d_csr_csnmi_impl(a) result(res)
use psb_const_mod
import psbn_d_csr_sparse_mat
class(psbn_d_csr_sparse_mat), intent(in) :: a
import psb_d_csr_sparse_mat
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_) :: res
end function d_csr_csnmi_impl
end interface
@@ -239,7 +239,7 @@ contains
function d_csr_sizeof(a) result(res)
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 8
res = res + psb_sizeof_dp * size(a%val)
@@ -250,21 +250,21 @@ contains
function d_csr_get_fmt(a) result(res)
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
character(len=5) :: res
res = 'CSR'
end function d_csr_get_fmt
function d_csr_get_nzeros(a) result(res)
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
integer :: res
res = a%irp(a%m+1)-1
end function d_csr_get_nzeros
function d_csr_get_size(a) result(res)
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
integer :: res
res = -1
@@ -304,7 +304,7 @@ contains
use psb_realloc_mod
implicit none
integer, intent(in) :: nz
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='d_csr_reallocate_nz'
logical, parameter :: debug=.false.
@@ -337,7 +337,7 @@ contains
use psb_const_mod
use psb_error_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
integer, intent(out) :: info
@@ -403,7 +403,7 @@ contains
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -447,8 +447,8 @@ contains
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(in) :: imin,imax
integer,intent(out) :: info
logical, intent(in), optional :: append
@@ -506,8 +506,8 @@ contains
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer,intent(out) :: info
integer, intent(in), optional :: imin,imax,jmin,jmax
logical, intent(in), optional :: rscale,cscale
@@ -592,7 +592,7 @@ contains
subroutine d_csr_free(a)
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
if (allocated(a%irp)) deallocate(a%irp)
if (allocated(a%ja)) deallocate(a%ja)
@@ -609,7 +609,7 @@ contains
use psb_realloc_mod
use psb_error_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
Integer :: err_act, info, nz, m
character(len=20) :: name='trim'
logical, parameter :: debug=.false.
@@ -642,8 +642,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -674,8 +674,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(in) :: b
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(in) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -707,8 +707,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -739,8 +739,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(in) :: b
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(in) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -772,8 +772,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(out) :: b
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -804,8 +804,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_coo_sparse_mat), intent(inout) :: b
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_coo_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -837,8 +837,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(out) :: b
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(out) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -869,8 +869,8 @@ contains
use psb_error_mod
use psb_realloc_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psbn_d_base_sparse_mat), intent(inout) :: b
class(psb_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_base_sparse_mat), intent(inout) :: b
integer, intent(out) :: info
Integer :: err_act
@@ -903,7 +903,7 @@ contains
use psb_realloc_mod
implicit none
integer, intent(in) :: m,n
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
integer, intent(in), optional :: nz
Integer :: err_act, info, nz_
character(len=20) :: name='allocate_mnz'
@@ -964,7 +964,7 @@ contains
implicit none
integer, intent(in) :: iout
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
integer, intent(in), optional :: iv(:)
integer, intent(in), optional :: eirs,eics
character(len=*), optional :: head
@@ -1057,7 +1057,7 @@ contains
subroutine d_csr_csmv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -1101,7 +1101,7 @@ contains
subroutine d_csr_csmm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -1141,7 +1141,7 @@ contains
subroutine d_csr_cssv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:)
real(psb_dpk_), intent(inout) :: y(:)
integer, intent(out) :: info
@@ -1194,7 +1194,7 @@ contains
subroutine d_csr_cssm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(in) :: alpha, beta, x(:,:)
real(psb_dpk_), intent(inout) :: y(:,:)
integer, intent(out) :: info
@@ -1244,7 +1244,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_) :: res
Integer :: err_act
@@ -1262,7 +1262,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(in) :: a
class(psb_d_csr_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(out) :: d(:)
integer, intent(out) :: info
@@ -1310,7 +1310,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: d(:)
integer, intent(out) :: info
@@ -1352,7 +1352,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_csr_sparse_mat), intent(inout) :: a
class(psb_d_csr_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: d
integer, intent(out) :: info
@@ -1383,4 +1383,4 @@ contains
end module psbn_d_csr_mat_mod
end module psb_d_csr_mat_mod
+34 -34
View File
@@ -1,10 +1,10 @@
subroutine psbn_d_csall(nr,nc,a,info,nz)
use psbn_d_base_mat_mod
subroutine psb_d_csall(nr,nc,a,info,nz)
use psb_d_base_mat_mod
use psb_realloc_mod
use psb_sort_mod
use psbn_d_mat_mod, psb_protect_name => psbn_d_csall
use psb_d_mat_mod, psb_protect_name => psb_d_csall
implicit none
type(psbn_d_sparse_mat), intent(out) :: a
type(psb_d_sparse_mat), intent(out) :: a
integer, intent(in) :: nr,nc
integer, intent(out) :: info
integer, intent(in), optional :: nz
@@ -15,22 +15,22 @@ subroutine psbn_d_csall(nr,nc,a,info,nz)
call a%set_bld()
return
end subroutine psbn_d_csall
end subroutine psb_d_csall
subroutine psbn_d_csput(nz,val,ia,ja,a,imin,imax,jmin,jmax,info,gtl)
use psbn_d_base_mat_mod
subroutine psb_d_csput(nz,val,ia,ja,a,imin,imax,jmin,jmax,info,gtl)
use psb_d_base_mat_mod
use psb_error_mod
use psbn_d_mat_mod, psb_protect_name => psbn_d_csput
use psb_d_mat_mod, psb_protect_name => psb_d_csput
implicit none
type(psbn_d_sparse_mat), intent(inout) :: a
type(psb_d_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
integer, intent(out) :: info
integer, intent(in), optional :: gtl(:)
Integer :: err_act
character(len=20) :: name='psbn_csput'
character(len=20) :: name='psb_csput'
logical, parameter :: debug=.false.
info = 0
@@ -56,26 +56,26 @@ subroutine psbn_d_csput(nz,val,ia,ja,a,imin,imax,jmin,jmax,info,gtl)
return
end if
end subroutine psbn_d_csput
end subroutine psb_d_csput
subroutine psbn_d_spcnv(a,b,info,type,mold,upd,dupl)
subroutine psb_d_spcnv(a,b,info,type,mold,upd,dupl)
use psb_error_mod
use psb_string_mod
use psbn_d_mat_mod, psb_protect_name => psbn_d_spcnv
use psb_d_mat_mod, psb_protect_name => psb_d_spcnv
implicit none
type(psbn_d_sparse_mat), intent(in) :: a
type(psbn_d_sparse_mat), intent(out) :: b
type(psb_d_sparse_mat), intent(in) :: a
type(psb_d_sparse_mat), intent(out) :: b
integer, intent(out) :: info
integer,optional, intent(in) :: dupl, upd
character(len=*), optional, intent(in) :: type
class(psbn_d_base_sparse_mat), intent(in), optional :: mold
class(psb_d_base_sparse_mat), intent(in), optional :: mold
class(psbn_d_base_sparse_mat), allocatable :: altmp
class(psb_d_base_sparse_mat), allocatable :: altmp
Integer :: err_act
character(len=20) :: name='psbn_cscnv'
character(len=20) :: name='psb_cscnv'
logical, parameter :: debug=.false.
info = 0
@@ -91,7 +91,7 @@ subroutine psbn_d_spcnv(a,b,info,type,mold,upd,dupl)
call b%set_dupl(dupl)
else if (a%is_bld()) then
! Does this make sense at all?? Who knows..
call b%set_dupl(psbn_dupl_def_)
call b%set_dupl(psb_dupl_def_)
end if
if (count( (/present(mold),present(type) /)) > 1) then
@@ -108,16 +108,16 @@ subroutine psbn_d_spcnv(a,b,info,type,mold,upd,dupl)
select case (psb_toupper(type))
case ('CSR')
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
case ('COO')
allocate(psbn_d_coo_sparse_mat :: altmp, stat=info)
allocate(psb_d_coo_sparse_mat :: altmp, stat=info)
case default
info = 136
call psb_errpush(info,name,a_err=type)
goto 9999
end select
else
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
end if
if (info /= 0) then
@@ -148,24 +148,24 @@ subroutine psbn_d_spcnv(a,b,info,type,mold,upd,dupl)
return
end if
end subroutine psbn_d_spcnv
end subroutine psb_d_spcnv
subroutine psbn_d_spcnv_ip(a,info,type,mold,dupl)
subroutine psb_d_spcnv_ip(a,info,type,mold,dupl)
use psb_error_mod
use psb_string_mod
use psbn_d_mat_mod, psb_protect_name => psbn_d_spcnv_ip
use psb_d_mat_mod, psb_protect_name => psb_d_spcnv_ip
implicit none
type(psbn_d_sparse_mat), intent(inout) :: a
type(psb_d_sparse_mat), intent(inout) :: a
integer, intent(out) :: info
integer,optional, intent(in) :: dupl
character(len=*), optional, intent(in) :: type
class(psbn_d_base_sparse_mat), intent(in), optional :: mold
class(psb_d_base_sparse_mat), intent(in), optional :: mold
class(psbn_d_base_sparse_mat), allocatable :: altmp
class(psb_d_base_sparse_mat), allocatable :: altmp
Integer :: err_act
character(len=20) :: name='psbn_cscnv'
character(len=20) :: name='psb_cscnv'
logical, parameter :: debug=.false.
info = 0
@@ -180,7 +180,7 @@ subroutine psbn_d_spcnv_ip(a,info,type,mold,dupl)
if (present(dupl)) then
call a%set_dupl(dupl)
else if (a%is_bld()) then
call a%set_dupl(psbn_dupl_def_)
call a%set_dupl(psb_dupl_def_)
end if
if (count( (/present(mold),present(type) /)) > 1) then
@@ -197,16 +197,16 @@ subroutine psbn_d_spcnv_ip(a,info,type,mold,dupl)
select case (psb_toupper(type))
case ('CSR')
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
case ('COO')
allocate(psbn_d_coo_sparse_mat :: altmp, stat=info)
allocate(psb_d_coo_sparse_mat :: altmp, stat=info)
case default
info = 136
call psb_errpush(info,name,a_err=type)
goto 9999
end select
else
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
end if
@@ -242,4 +242,4 @@ subroutine psbn_d_spcnv_ip(a,info,type,mold,dupl)
return
end if
end subroutine psbn_d_spcnv_ip
end subroutine psb_d_spcnv_ip
+90 -90
View File
@@ -1,12 +1,12 @@
module psbn_d_mat_mod
module psb_d_mat_mod
use psbn_d_base_mat_mod
use psbn_d_csr_mat_mod
use psb_d_base_mat_mod
use psb_d_csr_mat_mod
type :: psbn_d_sparse_mat
type :: psb_d_sparse_mat
class(psbn_d_base_sparse_mat), allocatable :: a
class(psb_d_base_sparse_mat), allocatable :: a
contains
! Setters
@@ -72,7 +72,7 @@ module psbn_d_mat_mod
procedure, pass(a) :: d_cssm
generic, public :: cssm => d_cssm, d_cssv
end type psbn_d_sparse_mat
end type psb_d_sparse_mat
private :: get_nrows, get_ncols, get_nzeros, get_size, &
& get_state, get_dupl, is_null, is_bld, is_upd, &
@@ -91,19 +91,19 @@ module psbn_d_mat_mod
module procedure d_sizeof
end interface
interface psbn_csmm
interface psb_csmm
module procedure d_csmm, d_csmv
end interface
interface psbn_cssm
interface psb_cssm
module procedure d_cssm, d_cssv
end interface
interface psbn_csnmi
interface psb_csnmi
module procedure csnmi
end interface
interface psbn_scal
interface psb_scal
module procedure d_scals, d_scal
end interface
@@ -125,7 +125,7 @@ contains
function d_sizeof(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer(psb_long_int_k_) :: res
res = 0
@@ -139,7 +139,7 @@ contains
function sparse_get_fmt(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
character(len=5) :: res
if (allocated(a%a)) then
@@ -155,32 +155,32 @@ contains
function get_dupl(a) result(res)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer :: res
if (allocated(a%a)) then
res = a%a%get_dupl()
else
res = psbn_invalid_
res = psb_invalid_
end if
end function get_dupl
function get_state(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer :: res
if (allocated(a%a)) then
res = a%a%get_state()
else
res = psbn_spmat_null_
res = psb_spmat_null_
end if
end function get_state
function get_nrows(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer :: res
if (allocated(a%a)) then
@@ -193,7 +193,7 @@ contains
function get_ncols(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer :: res
if (allocated(a%a)) then
@@ -206,7 +206,7 @@ contains
function is_triangle(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -219,7 +219,7 @@ contains
function is_unit(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -232,7 +232,7 @@ contains
function is_upper(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -245,7 +245,7 @@ contains
function is_lower(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -258,7 +258,7 @@ contains
function is_null(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -271,7 +271,7 @@ contains
function is_bld(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -284,7 +284,7 @@ contains
function is_upd(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -297,7 +297,7 @@ contains
function is_asb(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -310,7 +310,7 @@ contains
function is_sorted(a) result(res)
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
logical :: res
if (allocated(a%a)) then
@@ -326,7 +326,7 @@ contains
function get_nzeros(a) result(res)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act, info
@@ -358,7 +358,7 @@ contains
function get_size(a) result(res)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer :: res
Integer :: err_act, info
@@ -407,7 +407,7 @@ contains
subroutine set_nrows(m,a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
integer, intent(in) :: m
Integer :: err_act, info
character(len=20) :: name='set_nrows'
@@ -439,7 +439,7 @@ contains
subroutine set_ncols(n,a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
integer, intent(in) :: n
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -471,7 +471,7 @@ contains
subroutine set_state(n,a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
integer, intent(in) :: n
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -503,7 +503,7 @@ contains
subroutine set_dupl(n,a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
integer, intent(in) :: n
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -535,7 +535,7 @@ contains
subroutine set_null(a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
@@ -566,7 +566,7 @@ contains
subroutine set_bld(a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
@@ -596,7 +596,7 @@ contains
subroutine set_upd(a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
@@ -627,7 +627,7 @@ contains
subroutine set_asb(a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
logical, parameter :: debug=.false.
@@ -657,7 +657,7 @@ contains
subroutine set_sorted(a,val)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -688,7 +688,7 @@ contains
subroutine set_triangle(a,val)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -719,7 +719,7 @@ contains
subroutine set_unit(a,val)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -750,7 +750,7 @@ contains
subroutine set_lower(a,val)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -781,7 +781,7 @@ contains
subroutine set_upper(a,val)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
logical, intent(in), optional :: val
Integer :: err_act, info
character(len=20) :: name='get_nzeros'
@@ -830,7 +830,7 @@ contains
implicit none
integer, intent(in) :: iout
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer, intent(in), optional :: iv(:)
integer, intent(in), optional :: eirs,eics
character(len=*), optional :: head
@@ -867,7 +867,7 @@ contains
subroutine get_neigh(a,idx,neigh,n,info,lev)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer, intent(in) :: idx
integer, intent(out) :: n
integer, allocatable, intent(out) :: neigh(:)
@@ -906,10 +906,10 @@ contains
subroutine csall(nr,nc,a,info,nz)
use psbn_d_base_mat_mod
use psb_d_base_mat_mod
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(out) :: a
class(psb_d_sparse_mat), intent(out) :: a
integer, intent(in) :: nr,nc
integer, intent(out) :: info
integer, intent(in), optional :: nz
@@ -921,7 +921,7 @@ contains
call psb_get_erraction(err_act)
info = 0
allocate(psbn_d_coo_sparse_mat :: a%a, stat=info)
allocate(psb_d_coo_sparse_mat :: a%a, stat=info)
if (info /= 0) then
info = 4000
call psb_errpush(info, name)
@@ -946,7 +946,7 @@ contains
use psb_error_mod
implicit none
integer, intent(in) :: nz
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
@@ -976,7 +976,7 @@ contains
subroutine free(a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='free'
logical, parameter :: debug=.false.
@@ -1005,7 +1005,7 @@ contains
subroutine trim(a)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
Integer :: err_act, info
character(len=20) :: name='trim'
logical, parameter :: debug=.false.
@@ -1033,10 +1033,10 @@ contains
subroutine csput(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl)
use psbn_d_base_mat_mod
use psb_d_base_mat_mod
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: val(:)
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
integer, intent(out) :: info
@@ -1076,10 +1076,10 @@ contains
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psbn_d_base_mat_mod
use psb_d_base_mat_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
integer, intent(in) :: imin,imax
integer, intent(out) :: nz
integer, allocatable, intent(inout) :: ia(:), ja(:)
@@ -1127,11 +1127,11 @@ contains
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psbn_d_base_mat_mod
use psb_d_base_mat_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psbn_d_sparse_mat), intent(out) :: b
class(psb_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(out) :: b
integer, intent(in) :: imin,imax
integer,intent(out) :: info
logical, intent(in), optional :: append
@@ -1142,7 +1142,7 @@ contains
Integer :: err_act
character(len=20) :: name='csget'
logical, parameter :: debug=.false.
type(psbn_d_coo_sparse_mat), allocatable :: acoo
type(psb_d_coo_sparse_mat), allocatable :: acoo
info = 0
@@ -1180,11 +1180,11 @@ contains
! Output is always in COO format
use psb_error_mod
use psb_const_mod
use psbn_d_base_mat_mod
use psb_d_base_mat_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psbn_d_sparse_mat), intent(out) :: b
class(psb_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(out) :: b
integer,intent(out) :: info
integer, intent(in), optional :: imin,imax,jmin,jmax
logical, intent(in), optional :: rscale,cscale
@@ -1192,7 +1192,7 @@ contains
Integer :: err_act
character(len=20) :: name='csclip'
logical, parameter :: debug=.false.
type(psbn_d_coo_sparse_mat), allocatable :: acoo
type(psb_d_coo_sparse_mat), allocatable :: acoo
info = 0
call psb_erractionsave(err_act)
@@ -1227,15 +1227,15 @@ contains
use psb_error_mod
use psb_string_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psbn_d_sparse_mat), intent(out) :: b
class(psb_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(out) :: b
integer, intent(out) :: info
integer,optional, intent(in) :: dupl, upd
character(len=*), optional, intent(in) :: type
class(psbn_d_base_sparse_mat), intent(in), optional :: mold
class(psb_d_base_sparse_mat), intent(in), optional :: mold
class(psbn_d_base_sparse_mat), allocatable :: altmp
class(psb_d_base_sparse_mat), allocatable :: altmp
Integer :: err_act
character(len=20) :: name='cscnv'
logical, parameter :: debug=.false.
@@ -1253,7 +1253,7 @@ contains
call b%set_dupl(dupl)
else if (a%is_bld()) then
! Does this make sense at all?? Who knows..
call b%set_dupl(psbn_dupl_def_)
call b%set_dupl(psb_dupl_def_)
end if
if (count( (/present(mold),present(type) /)) > 1) then
@@ -1270,16 +1270,16 @@ contains
select case (psb_toupper(type))
case ('CSR')
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
case ('COO')
allocate(psbn_d_coo_sparse_mat :: altmp, stat=info)
allocate(psb_d_coo_sparse_mat :: altmp, stat=info)
case default
info = 136
call psb_errpush(info,name,a_err=type)
goto 9999
end select
else
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
end if
if (info /= 0) then
@@ -1321,14 +1321,14 @@ contains
use psb_string_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
integer, intent(out) :: info
integer,optional, intent(in) :: dupl
character(len=*), optional, intent(in) :: type
class(psbn_d_base_sparse_mat), intent(in), optional :: mold
class(psb_d_base_sparse_mat), intent(in), optional :: mold
class(psbn_d_base_sparse_mat), allocatable :: altmp
class(psb_d_base_sparse_mat), allocatable :: altmp
Integer :: err_act
character(len=20) :: name='cscnv_ip'
logical, parameter :: debug=.false.
@@ -1345,7 +1345,7 @@ contains
if (present(dupl)) then
call a%set_dupl(dupl)
else if (a%is_bld()) then
call a%set_dupl(psbn_dupl_def_)
call a%set_dupl(psb_dupl_def_)
end if
if (count( (/present(mold),present(type) /)) > 1) then
@@ -1362,16 +1362,16 @@ contains
select case (psb_toupper(type))
case ('CSR')
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
case ('COO')
allocate(psbn_d_coo_sparse_mat :: altmp, stat=info)
allocate(psb_d_coo_sparse_mat :: altmp, stat=info)
case default
info = 136
call psb_errpush(info,name,a_err=type)
goto 9999
end select
else
allocate(psbn_d_csr_sparse_mat :: altmp, stat=info)
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
end if
if (info /= 0) then
@@ -1427,13 +1427,13 @@ contains
subroutine d_csmm(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
real(kind(1.d0)), intent(in) :: alpha, beta, x(:,:)
real(kind(1.d0)), intent(inout) :: y(:,:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
Integer :: err_act
character(len=20) :: name='psbn_csmm'
character(len=20) :: name='psb_csmm'
logical, parameter :: debug=.false.
info = 0
@@ -1463,13 +1463,13 @@ contains
subroutine d_csmv(alpha,a,x,beta,y,info,trans)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
real(kind(1.d0)), intent(in) :: alpha, beta, x(:)
real(kind(1.d0)), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans
Integer :: err_act
character(len=20) :: name='psbn_csmv'
character(len=20) :: name='psb_csmv'
logical, parameter :: debug=.false.
info = 0
@@ -1499,14 +1499,14 @@ contains
subroutine d_cssm(alpha,a,x,beta,y,info,trans,side,d)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
real(kind(1.d0)), intent(in) :: alpha, beta, x(:,:)
real(kind(1.d0)), intent(inout) :: y(:,:)
integer, intent(out) :: info
character, optional, intent(in) :: trans, side
real(psb_dpk_), intent(in), optional :: d(:)
Integer :: err_act
character(len=20) :: name='psbn_cssm'
character(len=20) :: name='psb_cssm'
logical, parameter :: debug=.false.
info = 0
@@ -1537,14 +1537,14 @@ contains
subroutine d_cssv(alpha,a,x,beta,y,info,trans,side,d)
use psb_error_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
real(kind(1.d0)), intent(in) :: alpha, beta, x(:)
real(kind(1.d0)), intent(inout) :: y(:)
integer, intent(out) :: info
character, optional, intent(in) :: trans, side
real(psb_dpk_), intent(in), optional :: d(:)
Integer :: err_act
character(len=20) :: name='psbn_cssv'
character(len=20) :: name='psb_cssv'
logical, parameter :: debug=.false.
info = 0
@@ -1578,7 +1578,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
real(psb_dpk_) :: res
Integer :: err_act, info
@@ -1613,7 +1613,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_sparse_mat), intent(in) :: a
class(psb_d_sparse_mat), intent(in) :: a
real(psb_dpk_), intent(out) :: d(:)
integer, intent(out) :: info
@@ -1649,7 +1649,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: d(:)
integer, intent(out) :: info
@@ -1685,7 +1685,7 @@ contains
use psb_error_mod
use psb_const_mod
implicit none
class(psbn_d_sparse_mat), intent(inout) :: a
class(psb_d_sparse_mat), intent(inout) :: a
real(psb_dpk_), intent(in) :: d
integer, intent(out) :: info
@@ -1718,5 +1718,5 @@ contains
end subroutine d_scals
end module psbn_d_mat_mod
end module psb_d_mat_mod