diff --git a/amgprec/impl/aggregator/amg_c_soc1_map_bld.F90 b/amgprec/impl/aggregator/amg_c_soc1_map_bld.F90 index 24720675..36c4311c 100644 --- a/amgprec/impl/aggregator/amg_c_soc1_map_bld.F90 +++ b/amgprec/impl/aggregator/amg_c_soc1_map_bld.F90 @@ -250,7 +250,7 @@ subroutine amg_c_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in ! we will not reset. if (j>nr) cycle step1 if (ilaggr(j) > 0) cycle step1 - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.czero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -357,7 +357,7 @@ subroutine amg_c_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in do k=1, nz j = icol(k) if ((1<=j).and.(j<=nr)) then - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.czero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -545,4 +545,3 @@ subroutine amg_c_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in return end subroutine amg_c_soc1_map_bld - diff --git a/amgprec/impl/aggregator/amg_d_soc1_map_bld.F90 b/amgprec/impl/aggregator/amg_d_soc1_map_bld.F90 index 200d630c..b38344ed 100644 --- a/amgprec/impl/aggregator/amg_d_soc1_map_bld.F90 +++ b/amgprec/impl/aggregator/amg_d_soc1_map_bld.F90 @@ -250,7 +250,7 @@ subroutine amg_d_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in ! we will not reset. if (j>nr) cycle step1 if (ilaggr(j) > 0) cycle step1 - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.dzero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -357,7 +357,7 @@ subroutine amg_d_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in do k=1, nz j = icol(k) if ((1<=j).and.(j<=nr)) then - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.dzero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -545,4 +545,3 @@ subroutine amg_d_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in return end subroutine amg_d_soc1_map_bld - diff --git a/amgprec/impl/aggregator/amg_s_soc1_map_bld.F90 b/amgprec/impl/aggregator/amg_s_soc1_map_bld.F90 index 0f8bb7dd..d5331992 100644 --- a/amgprec/impl/aggregator/amg_s_soc1_map_bld.F90 +++ b/amgprec/impl/aggregator/amg_s_soc1_map_bld.F90 @@ -250,7 +250,7 @@ subroutine amg_s_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in ! we will not reset. if (j>nr) cycle step1 if (ilaggr(j) > 0) cycle step1 - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.szero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -357,7 +357,7 @@ subroutine amg_s_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in do k=1, nz j = icol(k) if ((1<=j).and.(j<=nr)) then - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.szero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -545,4 +545,3 @@ subroutine amg_s_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in return end subroutine amg_s_soc1_map_bld - diff --git a/amgprec/impl/aggregator/amg_z_soc1_map_bld.F90 b/amgprec/impl/aggregator/amg_z_soc1_map_bld.F90 index 7961921a..de5eb91c 100644 --- a/amgprec/impl/aggregator/amg_z_soc1_map_bld.F90 +++ b/amgprec/impl/aggregator/amg_z_soc1_map_bld.F90 @@ -250,7 +250,7 @@ subroutine amg_z_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in ! we will not reset. if (j>nr) cycle step1 if (ilaggr(j) > 0) cycle step1 - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.zzero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -357,7 +357,7 @@ subroutine amg_z_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in do k=1, nz j = icol(k) if ((1<=j).and.(j<=nr)) then - if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then + if ((abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))).and.(diag(i).ne.zzero)) then ip = ip + 1 icol(ip) = icol(k) end if @@ -545,4 +545,3 @@ subroutine amg_z_soc1_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,in return end subroutine amg_z_soc1_map_bld -