Updates in RENUM for fileread. To be completed.

new-context
Salvatore Filippone 4 years ago
parent 96d6260a27
commit 1a61bd04d4

@ -336,7 +336,6 @@ contains
end subroutine psb_c_mat_renum
subroutine psb_c_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_c_cmp_bwpf
@ -386,3 +385,52 @@ subroutine psb_c_cmp_bwpf(mat,bwl,bwu,prf,info)
end select
end subroutine psb_c_cmp_bwpf
subroutine psb_lc_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_lc_cmp_bwpf
implicit none
type(psb_lcspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
!
integer(psb_lpk_), allocatable :: irow(:), icol(:)
complex(psb_spk_), allocatable :: val(:)
integer(psb_lpk_) :: nz, i, j, lrbu, lrbl
info = psb_success_
bwl = 0
bwu = 0
prf = 0
select type (aa=>mat%a)
class is (psb_lc_csr_sparse_mat)
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
do j = aa%irp(i), aa%irp(i+1) - 1
lrbl = max(lrbl,i-aa%ja(j))
lrbu = max(lrbu,aa%ja(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
class default
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
call aa%csget(i,i,nz,irow,icol,val,info)
if (info /= psb_success_) return
do j=1, nz
lrbl = max(lrbl,i-icol(j))
lrbu = max(lrbu,icol(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
end select
end subroutine psb_lc_cmp_bwpf

@ -335,7 +335,6 @@ contains
end subroutine psb_d_mat_renum
subroutine psb_d_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_d_cmp_bwpf
@ -385,3 +384,52 @@ subroutine psb_d_cmp_bwpf(mat,bwl,bwu,prf,info)
end select
end subroutine psb_d_cmp_bwpf
subroutine psb_ld_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_ld_cmp_bwpf
implicit none
type(psb_ldspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
!
integer(psb_lpk_), allocatable :: irow(:), icol(:)
real(psb_dpk_), allocatable :: val(:)
integer(psb_lpk_) :: nz, i, j, lrbu, lrbl
info = psb_success_
bwl = 0
bwu = 0
prf = 0
select type (aa=>mat%a)
class is (psb_ld_csr_sparse_mat)
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
do j = aa%irp(i), aa%irp(i+1) - 1
lrbl = max(lrbl,i-aa%ja(j))
lrbu = max(lrbu,aa%ja(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
class default
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
call aa%csget(i,i,nz,irow,icol,val,info)
if (info /= psb_success_) return
do j=1, nz
lrbl = max(lrbl,i-icol(j))
lrbu = max(lrbu,icol(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
end select
end subroutine psb_ld_cmp_bwpf

@ -126,6 +126,34 @@ module psb_renum_mod
integer(psb_ipk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
end subroutine psb_z_cmp_bwpf
subroutine psb_ls_cmp_bwpf(mat,bwl,bwu,prf,info)
import :: psb_ipk_, psb_lpk_, psb_lsspmat_type
type(psb_lsspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
end subroutine psb_ls_cmp_bwpf
subroutine psb_ld_cmp_bwpf(mat,bwl,bwu,prf,info)
import :: psb_ipk_, psb_lpk_, psb_ldspmat_type
type(psb_ldspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
end subroutine psb_ld_cmp_bwpf
subroutine psb_lc_cmp_bwpf(mat,bwl,bwu,prf,info)
import :: psb_ipk_, psb_lpk_, psb_lcspmat_type
type(psb_lcspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
end subroutine psb_lc_cmp_bwpf
subroutine psb_lz_cmp_bwpf(mat,bwl,bwu,prf,info)
import :: psb_ipk_, psb_lpk_, psb_lzspmat_type
type(psb_lzspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
end subroutine psb_lz_cmp_bwpf
end interface psb_cmp_bwpf

@ -337,7 +337,6 @@ contains
end subroutine psb_s_mat_renum
subroutine psb_s_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_s_cmp_bwpf
@ -387,3 +386,52 @@ subroutine psb_s_cmp_bwpf(mat,bwl,bwu,prf,info)
end select
end subroutine psb_s_cmp_bwpf
subroutine psb_ls_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_ls_cmp_bwpf
implicit none
type(psb_lsspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
!
integer(psb_lpk_), allocatable :: irow(:), icol(:)
real(psb_spk_), allocatable :: val(:)
integer(psb_lpk_) :: nz, i, j, lrbu, lrbl
info = psb_success_
bwl = 0
bwu = 0
prf = 0
select type (aa=>mat%a)
class is (psb_ls_csr_sparse_mat)
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
do j = aa%irp(i), aa%irp(i+1) - 1
lrbl = max(lrbl,i-aa%ja(j))
lrbu = max(lrbu,aa%ja(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
class default
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
call aa%csget(i,i,nz,irow,icol,val,info)
if (info /= psb_success_) return
do j=1, nz
lrbl = max(lrbl,i-icol(j))
lrbu = max(lrbu,icol(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
end select
end subroutine psb_ls_cmp_bwpf

@ -335,7 +335,6 @@ contains
end subroutine psb_z_mat_renum
subroutine psb_z_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_z_cmp_bwpf
@ -385,3 +384,52 @@ subroutine psb_z_cmp_bwpf(mat,bwl,bwu,prf,info)
end select
end subroutine psb_z_cmp_bwpf
subroutine psb_lz_cmp_bwpf(mat,bwl,bwu,prf,info)
use psb_base_mod
use psb_renum_mod, psb_protect_name => psb_lz_cmp_bwpf
implicit none
type(psb_lzspmat_type), intent(in) :: mat
integer(psb_lpk_), intent(out) :: bwl, bwu
integer(psb_lpk_), intent(out) :: prf
integer(psb_ipk_), intent(out) :: info
!
integer(psb_lpk_), allocatable :: irow(:), icol(:)
complex(psb_dpk_), allocatable :: val(:)
integer(psb_lpk_) :: nz, i, j, lrbu, lrbl
info = psb_success_
bwl = 0
bwu = 0
prf = 0
select type (aa=>mat%a)
class is (psb_lz_csr_sparse_mat)
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
do j = aa%irp(i), aa%irp(i+1) - 1
lrbl = max(lrbl,i-aa%ja(j))
lrbu = max(lrbu,aa%ja(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
class default
do i=1, aa%get_nrows()
lrbl = 0
lrbu = 0
call aa%csget(i,i,nz,irow,icol,val,info)
if (info /= psb_success_) return
do j=1, nz
lrbl = max(lrbl,i-icol(j))
lrbu = max(lrbu,icol(j)-i)
end do
prf = prf + lrbl+lrbu
bwu = max(bwu,lrbu)
bwl = max(bwl,lrbu)
end do
end select
end subroutine psb_lz_cmp_bwpf

Loading…
Cancel
Save