From 28a271208528df62e8ac9bb8b5357659e8059f6d Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 20 Aug 2016 19:07:28 +0000 Subject: [PATCH] mld2p4-2: mlprec/impl/mld_c_dec_map_bld.f90 mlprec/impl/mld_d_dec_map_bld.f90 mlprec/impl/mld_s_dec_map_bld.f90 mlprec/impl/mld_z_dec_map_bld.f90 Cosmetic changes. --- mlprec/impl/mld_c_dec_map_bld.f90 | 17 +++++++---------- mlprec/impl/mld_d_dec_map_bld.f90 | 17 +++++++---------- mlprec/impl/mld_s_dec_map_bld.f90 | 17 +++++++---------- mlprec/impl/mld_z_dec_map_bld.f90 | 17 +++++++---------- 4 files changed, 28 insertions(+), 40 deletions(-) diff --git a/mlprec/impl/mld_c_dec_map_bld.f90 b/mlprec/impl/mld_c_dec_map_bld.f90 index 35452b80..a9922e48 100644 --- a/mlprec/impl/mld_c_dec_map_bld.f90 +++ b/mlprec/impl/mld_c_dec_map_bld.f90 @@ -59,7 +59,7 @@ subroutine mld_c_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip type(psb_c_csr_sparse_mat) :: acsr real(psb_spk_) :: cpling, tcl - logical :: recovery, candidate + logical :: recovery, disjoint integer(psb_ipk_) :: debug_level, debug_unit,err_act integer(psb_ipk_) :: ictxt,np,me integer(psb_ipk_) :: nrow, ncol, n_ne @@ -143,15 +143,12 @@ subroutine mld_c_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) cycle step1 end if - candidate = .true. - do k=1, ip - candidate = candidate .and. (ilaggr(icol(k)) == -(nr+1)) - end do - if (candidate) then - ! - ! If the whole strongly coupled neighborhood of I is - ! as yet unconnected, turn it into the next aggregate - ! + ! + ! If the whole strongly coupled neighborhood of I is + ! as yet unconnected, turn it into the next aggregate + ! + disjoint = all(ilaggr(icol(1:ip)) == -(nr+1)) + if (disjoint) then icnt = icnt + 1 naggr = naggr + 1 do k=1, ip diff --git a/mlprec/impl/mld_d_dec_map_bld.f90 b/mlprec/impl/mld_d_dec_map_bld.f90 index fe263c2a..8adb56a9 100644 --- a/mlprec/impl/mld_d_dec_map_bld.f90 +++ b/mlprec/impl/mld_d_dec_map_bld.f90 @@ -59,7 +59,7 @@ subroutine mld_d_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip type(psb_d_csr_sparse_mat) :: acsr real(psb_dpk_) :: cpling, tcl - logical :: recovery, candidate + logical :: recovery, disjoint integer(psb_ipk_) :: debug_level, debug_unit,err_act integer(psb_ipk_) :: ictxt,np,me integer(psb_ipk_) :: nrow, ncol, n_ne @@ -143,15 +143,12 @@ subroutine mld_d_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) cycle step1 end if - candidate = .true. - do k=1, ip - candidate = candidate .and. (ilaggr(icol(k)) == -(nr+1)) - end do - if (candidate) then - ! - ! If the whole strongly coupled neighborhood of I is - ! as yet unconnected, turn it into the next aggregate - ! + ! + ! If the whole strongly coupled neighborhood of I is + ! as yet unconnected, turn it into the next aggregate + ! + disjoint = all(ilaggr(icol(1:ip)) == -(nr+1)) + if (disjoint) then icnt = icnt + 1 naggr = naggr + 1 do k=1, ip diff --git a/mlprec/impl/mld_s_dec_map_bld.f90 b/mlprec/impl/mld_s_dec_map_bld.f90 index 10be26e0..490b7986 100644 --- a/mlprec/impl/mld_s_dec_map_bld.f90 +++ b/mlprec/impl/mld_s_dec_map_bld.f90 @@ -59,7 +59,7 @@ subroutine mld_s_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip type(psb_s_csr_sparse_mat) :: acsr real(psb_spk_) :: cpling, tcl - logical :: recovery, candidate + logical :: recovery, disjoint integer(psb_ipk_) :: debug_level, debug_unit,err_act integer(psb_ipk_) :: ictxt,np,me integer(psb_ipk_) :: nrow, ncol, n_ne @@ -143,15 +143,12 @@ subroutine mld_s_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) cycle step1 end if - candidate = .true. - do k=1, ip - candidate = candidate .and. (ilaggr(icol(k)) == -(nr+1)) - end do - if (candidate) then - ! - ! If the whole strongly coupled neighborhood of I is - ! as yet unconnected, turn it into the next aggregate - ! + ! + ! If the whole strongly coupled neighborhood of I is + ! as yet unconnected, turn it into the next aggregate + ! + disjoint = all(ilaggr(icol(1:ip)) == -(nr+1)) + if (disjoint) then icnt = icnt + 1 naggr = naggr + 1 do k=1, ip diff --git a/mlprec/impl/mld_z_dec_map_bld.f90 b/mlprec/impl/mld_z_dec_map_bld.f90 index 876b8a7e..bf004df5 100644 --- a/mlprec/impl/mld_z_dec_map_bld.f90 +++ b/mlprec/impl/mld_z_dec_map_bld.f90 @@ -59,7 +59,7 @@ subroutine mld_z_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) integer(psb_ipk_) :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz, ilg, ii, ip type(psb_z_csr_sparse_mat) :: acsr real(psb_dpk_) :: cpling, tcl - logical :: recovery, candidate + logical :: recovery, disjoint integer(psb_ipk_) :: debug_level, debug_unit,err_act integer(psb_ipk_) :: ictxt,np,me integer(psb_ipk_) :: nrow, ncol, n_ne @@ -143,15 +143,12 @@ subroutine mld_z_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) cycle step1 end if - candidate = .true. - do k=1, ip - candidate = candidate .and. (ilaggr(icol(k)) == -(nr+1)) - end do - if (candidate) then - ! - ! If the whole strongly coupled neighborhood of I is - ! as yet unconnected, turn it into the next aggregate - ! + ! + ! If the whole strongly coupled neighborhood of I is + ! as yet unconnected, turn it into the next aggregate + ! + disjoint = all(ilaggr(icol(1:ip)) == -(nr+1)) + if (disjoint) then icnt = icnt + 1 naggr = naggr + 1 do k=1, ip