|
|
@ -107,16 +107,16 @@ subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
|
|
|
|
! Arguments
|
|
|
|
! Arguments
|
|
|
|
type(psb_cspmat_type), intent(in) :: a
|
|
|
|
type(psb_cspmat_type), intent(in) :: a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
integer, intent(inout) :: ilaggr(:), nlaggr(:)
|
|
|
|
integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
|
|
|
|
type(mld_sml_parms), intent(inout) :: parms
|
|
|
|
type(mld_sml_parms), intent(inout) :: parms
|
|
|
|
type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr
|
|
|
|
type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
! Local variables
|
|
|
|
integer(psb_mpik_), allocatable :: nzbr(:), idisp(:)
|
|
|
|
integer(psb_ipk_), allocatable :: nzbr(:), idisp(:)
|
|
|
|
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
|
|
|
|
integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
|
|
|
|
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt
|
|
|
|
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt, err_act
|
|
|
|
integer :: ictxt,np,me, err_act, icomm
|
|
|
|
integer(psb_mpik_) :: ictxt,np,me, icomm
|
|
|
|
character(len=20) :: name
|
|
|
|
character(len=20) :: name
|
|
|
|
type(psb_cspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp
|
|
|
|
type(psb_cspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp
|
|
|
|
type(psb_cspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da
|
|
|
|
type(psb_cspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da
|
|
|
@ -128,8 +128,8 @@ subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
|
|
|
|
complex(psb_spk_), allocatable :: omf(:), omp(:), omi(:), oden(:)
|
|
|
|
complex(psb_spk_), allocatable :: omf(:), omp(:), omi(:), oden(:)
|
|
|
|
logical :: filter_mat
|
|
|
|
logical :: filter_mat
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
integer :: debug_level, debug_unit
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer, parameter :: ncmax=16
|
|
|
|
integer(psb_ipk_), parameter :: ncmax=16
|
|
|
|
real(psb_spk_) :: anorm, theta
|
|
|
|
real(psb_spk_) :: anorm, theta
|
|
|
|
complex(psb_spk_) :: tmp, alpha, beta, ommx
|
|
|
|
complex(psb_spk_) :: tmp, alpha, beta, ommx
|
|
|
|
|
|
|
|
|
|
|
@ -602,11 +602,12 @@ subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
|
|
|
|
contains
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
subroutine csc_mat_col_prod(a,b,v,info)
|
|
|
|
subroutine csc_mat_col_prod(a,b,v,info)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
type(psb_c_csc_sparse_mat), intent(in) :: a, b
|
|
|
|
type(psb_c_csc_sparse_mat), intent(in) :: a, b
|
|
|
|
complex(psb_spk_), intent(out) :: v(:)
|
|
|
|
complex(psb_spk_), intent(out) :: v(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
integer :: i,j,k, nr, nc,iap,nra,ibp,nrb
|
|
|
|
integer(psb_ipk_) :: i,j,k, nr, nc,iap,nra,ibp,nrb
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
|
nc = a%get_ncols()
|
|
|
|
nc = a%get_ncols()
|
|
|
@ -629,11 +630,12 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine csr_mat_row_prod(a,b,v,info)
|
|
|
|
subroutine csr_mat_row_prod(a,b,v,info)
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
type(psb_c_csr_sparse_mat), intent(in) :: a, b
|
|
|
|
type(psb_c_csr_sparse_mat), intent(in) :: a, b
|
|
|
|
complex(psb_spk_), intent(out) :: v(:)
|
|
|
|
complex(psb_spk_), intent(out) :: v(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
integer :: i,j,k, nr, nc,iap,nca,ibp,ncb
|
|
|
|
integer(psb_ipk_) :: i,j,k, nr, nc,iap,nca,ibp,ncb
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
|
nr = a%get_nrows()
|
|
|
|
nr = a%get_nrows()
|
|
|
@ -656,12 +658,13 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot)
|
|
|
|
function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot)
|
|
|
|
integer, intent(in) :: nv1,nv2
|
|
|
|
implicit none
|
|
|
|
integer, intent(in) :: iv1(:), iv2(:)
|
|
|
|
integer(psb_ipk_), intent(in) :: nv1,nv2
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iv1(:), iv2(:)
|
|
|
|
complex(psb_spk_), intent(in) :: v1(:),v2(:)
|
|
|
|
complex(psb_spk_), intent(in) :: v1(:),v2(:)
|
|
|
|
complex(psb_spk_) :: dot
|
|
|
|
complex(psb_spk_) :: dot
|
|
|
|
|
|
|
|
|
|
|
|
integer :: i,j,k, ip1, ip2
|
|
|
|
integer(psb_ipk_) :: i,j,k, ip1, ip2
|
|
|
|
|
|
|
|
|
|
|
|
dot = czero
|
|
|
|
dot = czero
|
|
|
|
ip1 = 1
|
|
|
|
ip1 = 1
|
|
|
@ -685,7 +688,7 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
subroutine local_dump(me,mat,name,header)
|
|
|
|
subroutine local_dump(me,mat,name,header)
|
|
|
|
type(psb_cspmat_type), intent(in) :: mat
|
|
|
|
type(psb_cspmat_type), intent(in) :: mat
|
|
|
|
integer, intent(in) :: me
|
|
|
|
integer(psb_mpik_), intent(in) :: me
|
|
|
|
character(len=*), intent(in) :: name
|
|
|
|
character(len=*), intent(in) :: name
|
|
|
|
character(len=*), intent(in) :: header
|
|
|
|
character(len=*), intent(in) :: header
|
|
|
|
character(len=80) :: filename
|
|
|
|
character(len=80) :: filename
|
|
|
|