mlprec/impl/mld_c_hierarchy_bld.f90
 mlprec/impl/mld_cprecbld.f90
 mlprec/impl/mld_d_hierarchy_bld.f90
 mlprec/impl/mld_dprecbld.f90
 mlprec/impl/mld_s_hierarchy_bld.f90
 mlprec/impl/mld_sprecbld.f90
 mlprec/impl/mld_z_hierarchy_bld.f90
 mlprec/impl/mld_zprecbld.f90
 mlprec/mld_c_prec_type.f90
 mlprec/mld_d_prec_type.f90
 mlprec/mld_s_prec_type.f90
 mlprec/mld_z_prec_type.f90

Fix operator complexity computation.
stopcriterion
Salvatore Filippone 8 years ago
parent 0ccf29897a
commit 3f7a1d5b38

@ -403,6 +403,8 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info)
iszv = size(p%precv) iszv = size(p%precv)
call p%cmp_complexity()
if (debug_level >= psb_debug_outer_) & if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Exiting with',iszv,' levels' & 'Exiting with',iszv,' levels'

@ -199,8 +199,6 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold)
endif endif
end if end if
call p%cmp_complexity()
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -403,6 +403,8 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info)
iszv = size(p%precv) iszv = size(p%precv)
call p%cmp_complexity()
if (debug_level >= psb_debug_outer_) & if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Exiting with',iszv,' levels' & 'Exiting with',iszv,' levels'

@ -199,8 +199,6 @@ subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold)
endif endif
end if end if
call p%cmp_complexity()
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -403,6 +403,8 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info)
iszv = size(p%precv) iszv = size(p%precv)
call p%cmp_complexity()
if (debug_level >= psb_debug_outer_) & if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Exiting with',iszv,' levels' & 'Exiting with',iszv,' levels'

@ -199,8 +199,6 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold)
endif endif
end if end if
call p%cmp_complexity()
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -403,6 +403,8 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info)
iszv = size(p%precv) iszv = size(p%precv)
call p%cmp_complexity()
if (debug_level >= psb_debug_outer_) & if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Exiting with',iszv,' levels' & 'Exiting with',iszv,' levels'

@ -199,8 +199,6 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold)
endif endif
end if end if
call p%cmp_complexity()
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -391,12 +391,12 @@ contains
implicit none implicit none
class(mld_cprec_type), intent(inout) :: prec class(mld_cprec_type), intent(inout) :: prec
real(psb_spk_) :: num,den real(psb_spk_) :: num, den, nmin
integer(psb_ipk_) :: ictxt integer(psb_ipk_) :: ictxt
integer(psb_ipk_) :: il integer(psb_ipk_) :: il
num = -done num = -sone
den = done den = sone
ictxt = prec%ictxt ictxt = prec%ictxt
if (allocated(prec%precv)) then if (allocated(prec%precv)) then
il = 1 il = 1
@ -408,9 +408,11 @@ contains
end do end do
end if end if
end if end if
call psb_min(ictxt,num) nmin = num
if (num < szero) then call psb_min(ictxt,nmin)
den = done if (nmin < szero) then
num = szero
den = sone
else else
call psb_sum(ictxt,num) call psb_sum(ictxt,num)
call psb_sum(ictxt,den) call psb_sum(ictxt,den)

@ -391,7 +391,7 @@ contains
implicit none implicit none
class(mld_dprec_type), intent(inout) :: prec class(mld_dprec_type), intent(inout) :: prec
real(psb_dpk_) :: num,den real(psb_dpk_) :: num, den, nmin
integer(psb_ipk_) :: ictxt integer(psb_ipk_) :: ictxt
integer(psb_ipk_) :: il integer(psb_ipk_) :: il
@ -408,8 +408,10 @@ contains
end do end do
end if end if
end if end if
call psb_min(ictxt,num) nmin = num
if (num < dzero) then call psb_min(ictxt,nmin)
if (nmin < dzero) then
num = dzero
den = done den = done
else else
call psb_sum(ictxt,num) call psb_sum(ictxt,num)

@ -391,12 +391,12 @@ contains
implicit none implicit none
class(mld_sprec_type), intent(inout) :: prec class(mld_sprec_type), intent(inout) :: prec
real(psb_spk_) :: num,den real(psb_spk_) :: num, den, nmin
integer(psb_ipk_) :: ictxt integer(psb_ipk_) :: ictxt
integer(psb_ipk_) :: il integer(psb_ipk_) :: il
num = -done num = -sone
den = done den = sone
ictxt = prec%ictxt ictxt = prec%ictxt
if (allocated(prec%precv)) then if (allocated(prec%precv)) then
il = 1 il = 1
@ -408,9 +408,11 @@ contains
end do end do
end if end if
end if end if
call psb_min(ictxt,num) nmin = num
if (num < szero) then call psb_min(ictxt,nmin)
den = done if (nmin < szero) then
num = szero
den = sone
else else
call psb_sum(ictxt,num) call psb_sum(ictxt,num)
call psb_sum(ictxt,den) call psb_sum(ictxt,den)

@ -391,7 +391,7 @@ contains
implicit none implicit none
class(mld_zprec_type), intent(inout) :: prec class(mld_zprec_type), intent(inout) :: prec
real(psb_dpk_) :: num,den real(psb_dpk_) :: num, den, nmin
integer(psb_ipk_) :: ictxt integer(psb_ipk_) :: ictxt
integer(psb_ipk_) :: il integer(psb_ipk_) :: il
@ -408,8 +408,10 @@ contains
end do end do
end if end if
end if end if
call psb_min(ictxt,num) nmin = num
if (num < dzero) then call psb_min(ictxt,nmin)
if (nmin < dzero) then
num = dzero
den = done den = done
else else
call psb_sum(ictxt,num) call psb_sum(ictxt,num)

Loading…
Cancel
Save