prec/psb_c_base_prec_mod.f90
 prec/psb_c_bjacprec.f90
 prec/psb_c_diagprec.f90
 prec/psb_d_base_prec_mod.f90
 prec/psb_d_bjacprec.f90
 prec/psb_d_diagprec.f90
 prec/psb_s_base_prec_mod.f90
 prec/psb_s_bjacprec.f90
 prec/psb_s_diagprec.f90
 prec/psb_z_base_prec_mod.f90
 prec/psb_z_bjacprec.f90
 prec/psb_z_diagprec.f90

Merged get_nzeros() method for preconditioners.
psblas3-type-indexed
Salvatore Filippone 13 years ago
parent 49b895aeb0
commit 8e450ee69c

@ -61,13 +61,14 @@ module psb_c_base_prec_mod
procedure, pass(prec) :: precfree => psb_c_base_precfree
procedure, pass(prec) :: precdescr => psb_c_base_precdescr
procedure, pass(prec) :: dump => psb_c_base_precdump
procedure, pass(prec) :: get_nzeros => psb_c_base_get_nzeros
end type psb_c_base_prec_type
private :: psb_c_base_apply, psb_c_base_precbld, psb_c_base_precseti,&
& psb_c_base_precsetr, psb_c_base_precsetc, psb_c_base_sizeof,&
& psb_c_base_precinit, psb_c_base_precfree, psb_c_base_precdescr,&
& psb_c_base_precdump, psb_c_base_set_ctxt, psb_c_base_get_ctxt, &
& psb_c_base_apply_vect
& psb_c_base_apply_vect, psb_c_base_get_nzeros
contains
@ -444,4 +445,12 @@ contains
return
end function psb_c_base_get_ctxt
function psb_c_base_get_nzeros(prec) result(res)
class(psb_c_base_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: res
res = 0
end function psb_c_base_get_nzeros
end module psb_c_base_prec_mod

@ -19,12 +19,13 @@ module psb_c_bjacprec
procedure, pass(prec) :: precdescr => psb_c_bjac_precdescr
procedure, pass(prec) :: dump => psb_c_bjac_dump
procedure, pass(prec) :: sizeof => psb_c_bjac_sizeof
procedure, pass(prec) :: get_nzeros => psb_c_bjac_get_nzeros
end type psb_c_bjac_prec_type
private :: psb_c_bjac_apply, psb_c_bjac_precbld, psb_c_bjac_precseti,&
& psb_c_bjac_precsetr, psb_c_bjac_precsetc, psb_c_bjac_sizeof,&
& psb_c_bjac_precinit, psb_c_bjac_precfree, psb_c_bjac_precdescr,&
& psb_c_bjac_dump, psb_c_bjac_apply_vect
& psb_c_bjac_dump, psb_c_bjac_apply_vect, psb_c_bjac_get_nzeros
character(len=15), parameter, private :: &
@ -773,7 +774,7 @@ contains
end subroutine psb_c_bjac_dump
function psb_c_bjac_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_c_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -788,4 +789,20 @@ contains
return
end function psb_c_bjac_sizeof
function psb_c_bjac_get_nzeros(prec) result(val)
use psb_base_mod, only : psb_long_int_k_
class(psb_c_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) then
val = val + prec%dv%get_nrows()
endif
if (allocated(prec%av)) then
val = val + prec%av(psb_l_pr_)%get_nzeros()
val = val + prec%av(psb_u_pr_)%get_nzeros()
endif
return
end function psb_c_bjac_get_nzeros
end module psb_c_bjacprec

@ -16,12 +16,13 @@ module psb_c_diagprec
procedure, pass(prec) :: precfree => psb_c_diag_precfree
procedure, pass(prec) :: precdescr => psb_c_diag_precdescr
procedure, pass(prec) :: sizeof => psb_c_diag_sizeof
procedure, pass(prec) :: get_nzeros => psb_c_diag_get_nzeros
end type psb_c_diag_prec_type
private :: psb_c_diag_apply, psb_c_diag_precbld, psb_c_diag_precseti,&
& psb_c_diag_precsetr, psb_c_diag_precsetc, psb_c_diag_sizeof,&
& psb_c_diag_precinit, psb_c_diag_precfree, psb_c_diag_precdescr,&
& psb_c_diag_apply_vect
& psb_c_diag_apply_vect, psb_c_diag_get_nzeros
contains
@ -464,7 +465,7 @@ contains
end subroutine psb_c_diag_precdescr
function psb_c_diag_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_c_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -473,4 +474,15 @@ contains
return
end function psb_c_diag_sizeof
function psb_c_diag_get_nzeros(prec) result(val)
use psb_base_mod, only: psb_long_int_k_
class(psb_c_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) val = val + prec%dv%get_nrows()
return
end function psb_c_diag_get_nzeros
end module psb_c_diagprec

@ -62,13 +62,14 @@ module psb_d_base_prec_mod
procedure, pass(prec) :: precfree => psb_d_base_precfree
procedure, pass(prec) :: precdescr => psb_d_base_precdescr
procedure, pass(prec) :: dump => psb_d_base_precdump
procedure, pass(prec) :: get_nzeros => psb_d_base_get_nzeros
end type psb_d_base_prec_type
private :: psb_d_base_apply, psb_d_base_precbld, psb_d_base_precseti,&
& psb_d_base_precsetr, psb_d_base_precsetc, psb_d_base_sizeof,&
& psb_d_base_precinit, psb_d_base_precfree, psb_d_base_precdescr,&
& psb_d_base_precdump, psb_d_base_set_ctxt, psb_d_base_get_ctxt, &
& psb_d_base_apply_vect
& psb_d_base_apply_vect, psb_d_base_get_nzeros
contains
@ -445,4 +446,13 @@ contains
return
end function psb_d_base_get_ctxt
function psb_d_base_get_nzeros(prec) result(res)
class(psb_d_base_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: res
res = 0
end function psb_d_base_get_nzeros
end module psb_d_base_prec_mod

@ -18,12 +18,13 @@ module psb_d_bjacprec
procedure, pass(prec) :: precdescr => psb_d_bjac_precdescr
procedure, pass(prec) :: dump => psb_d_bjac_dump
procedure, pass(prec) :: sizeof => psb_d_bjac_sizeof
procedure, pass(prec) :: get_nzeros => psb_d_bjac_get_nzeros
end type psb_d_bjac_prec_type
private :: psb_d_bjac_apply, psb_d_bjac_precbld, psb_d_bjac_precseti,&
& psb_d_bjac_precsetr, psb_d_bjac_precsetc, psb_d_bjac_sizeof,&
& psb_d_bjac_precinit, psb_d_bjac_precfree, psb_d_bjac_precdescr,&
& psb_d_bjac_dump, psb_d_bjac_apply_vect
& psb_d_bjac_dump, psb_d_bjac_apply_vect, psb_d_bjac_get_nzeros
character(len=15), parameter, private :: &
@ -762,7 +763,7 @@ contains
end subroutine psb_d_bjac_dump
function psb_d_bjac_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_d_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -777,4 +778,20 @@ contains
return
end function psb_d_bjac_sizeof
function psb_d_bjac_get_nzeros(prec) result(val)
use psb_base_mod, only : psb_long_int_k_
class(psb_d_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) then
val = val + prec%dv%get_nrows()
endif
if (allocated(prec%av)) then
val = val + prec%av(psb_l_pr_)%get_nzeros()
val = val + prec%av(psb_u_pr_)%get_nzeros()
endif
return
end function psb_d_bjac_get_nzeros
end module psb_d_bjacprec

@ -17,12 +17,13 @@ module psb_d_diagprec
procedure, pass(prec) :: precfree => psb_d_diag_precfree
procedure, pass(prec) :: precdescr => psb_d_diag_precdescr
procedure, pass(prec) :: sizeof => psb_d_diag_sizeof
procedure, pass(prec) :: get_nzeros => psb_d_diag_get_nzeros
end type psb_d_diag_prec_type
private :: psb_d_diag_apply, psb_d_diag_precbld, psb_d_diag_precseti,&
& psb_d_diag_precsetr, psb_d_diag_precsetc, psb_d_diag_sizeof,&
& psb_d_diag_precinit, psb_d_diag_precfree, psb_d_diag_precdescr,&
& psb_d_diag_apply_vect
& psb_d_diag_apply_vect, psb_d_diag_get_nzeros
contains
@ -464,7 +465,7 @@ contains
end subroutine psb_d_diag_precdescr
function psb_d_diag_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only: psb_long_int_k_
class(psb_d_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -473,4 +474,14 @@ contains
return
end function psb_d_diag_sizeof
function psb_d_diag_get_nzeros(prec) result(val)
use psb_base_mod, only: psb_long_int_k_
class(psb_d_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) val = val + prec%dv%get_nrows()
return
end function psb_d_diag_get_nzeros
end module psb_d_diagprec

@ -62,13 +62,14 @@ module psb_s_base_prec_mod
procedure, pass(prec) :: precfree => psb_s_base_precfree
procedure, pass(prec) :: precdescr => psb_s_base_precdescr
procedure, pass(prec) :: dump => psb_s_base_precdump
procedure, pass(prec) :: get_nzeros => psb_s_base_get_nzeros
end type psb_s_base_prec_type
private :: psb_s_base_apply, psb_s_base_precbld, psb_s_base_precseti,&
& psb_s_base_precsetr, psb_s_base_precsetc, psb_s_base_sizeof,&
& psb_s_base_precinit, psb_s_base_precfree, psb_s_base_precdescr,&
& psb_s_base_precdump, psb_s_base_set_ctxt, psb_s_base_get_ctxt, &
& psb_s_base_apply_vect
& psb_s_base_apply_vect, psb_s_base_get_nzeros
contains
@ -445,4 +446,12 @@ contains
return
end function psb_s_base_get_ctxt
function psb_s_base_get_nzeros(prec) result(res)
class(psb_s_base_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: res
res = 0
end function psb_s_base_get_nzeros
end module psb_s_base_prec_mod

@ -19,12 +19,13 @@ module psb_s_bjacprec
procedure, pass(prec) :: precdescr => psb_s_bjac_precdescr
procedure, pass(prec) :: dump => psb_s_bjac_dump
procedure, pass(prec) :: sizeof => psb_s_bjac_sizeof
procedure, pass(prec) :: get_nzeros => psb_s_bjac_get_nzeros
end type psb_s_bjac_prec_type
private :: psb_s_bjac_apply, psb_s_bjac_precbld, psb_s_bjac_precseti,&
& psb_s_bjac_precsetr, psb_s_bjac_precsetc, psb_s_bjac_sizeof,&
& psb_s_bjac_precinit, psb_s_bjac_precfree, psb_s_bjac_precdescr,&
& psb_s_bjac_dump, psb_s_bjac_apply_vect
& psb_s_bjac_dump, psb_s_bjac_apply_vect, psb_s_bjac_get_nzeros
character(len=15), parameter, private :: &
@ -771,7 +772,7 @@ contains
end subroutine psb_s_bjac_dump
function psb_s_bjac_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_s_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -786,4 +787,20 @@ contains
return
end function psb_s_bjac_sizeof
function psb_s_bjac_get_nzeros(prec) result(val)
use psb_base_mod, only : psb_long_int_k_
class(psb_s_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) then
val = val + prec%dv%get_nrows()
endif
if (allocated(prec%av)) then
val = val + prec%av(psb_l_pr_)%get_nzeros()
val = val + prec%av(psb_u_pr_)%get_nzeros()
endif
return
end function psb_s_bjac_get_nzeros
end module psb_s_bjacprec

@ -16,12 +16,13 @@ module psb_s_diagprec
procedure, pass(prec) :: precfree => psb_s_diag_precfree
procedure, pass(prec) :: precdescr => psb_s_diag_precdescr
procedure, pass(prec) :: sizeof => psb_s_diag_sizeof
procedure, pass(prec) :: get_nzeros => psb_s_diag_get_nzeros
end type psb_s_diag_prec_type
private :: psb_s_diag_apply, psb_s_diag_precbld, psb_s_diag_precseti,&
& psb_s_diag_precsetr, psb_s_diag_precsetc, psb_s_diag_sizeof,&
& psb_s_diag_precinit, psb_s_diag_precfree, psb_s_diag_precdescr,&
& psb_s_diag_apply_vect
& psb_s_diag_apply_vect, psb_s_diag_get_nzeros
contains
@ -481,7 +482,7 @@ contains
end subroutine psb_s_diag_precdescr
function psb_s_diag_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_s_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -490,4 +491,14 @@ contains
return
end function psb_s_diag_sizeof
function psb_s_diag_get_nzeros(prec) result(val)
use psb_base_mod, only: psb_long_int_k_
class(psb_s_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) val = val + prec%dv%get_nrows()
return
end function psb_s_diag_get_nzeros
end module psb_s_diagprec

@ -61,13 +61,14 @@ module psb_z_base_prec_mod
procedure, pass(prec) :: precfree => psb_z_base_precfree
procedure, pass(prec) :: precdescr => psb_z_base_precdescr
procedure, pass(prec) :: dump => psb_z_base_precdump
procedure, pass(prec) :: get_nzeros => psb_z_base_get_nzeros
end type psb_z_base_prec_type
private :: psb_z_base_apply, psb_z_base_precbld, psb_z_base_precseti,&
& psb_z_base_precsetr, psb_z_base_precsetc, psb_z_base_sizeof,&
& psb_z_base_precinit, psb_z_base_precfree, psb_z_base_precdescr,&
& psb_z_base_precdump, psb_z_base_set_ctxt, psb_z_base_get_ctxt, &
& psb_z_base_apply_vect
& psb_z_base_apply_vect, psb_z_base_get_nzeros
contains
@ -444,4 +445,12 @@ contains
return
end function psb_z_base_get_ctxt
function psb_z_base_get_nzeros(prec) result(res)
class(psb_z_base_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: res
res = 0
end function psb_z_base_get_nzeros
end module psb_z_base_prec_mod

@ -19,12 +19,13 @@ module psb_z_bjacprec
procedure, pass(prec) :: precdescr => psb_z_bjac_precdescr
procedure, pass(prec) :: dump => psb_z_bjac_dump
procedure, pass(prec) :: sizeof => psb_z_bjac_sizeof
procedure, pass(prec) :: get_nzeros => psb_z_bjac_get_nzeros
end type psb_z_bjac_prec_type
private :: psb_z_bjac_apply, psb_z_bjac_precbld, psb_z_bjac_precseti,&
& psb_z_bjac_precsetr, psb_z_bjac_precsetc, psb_z_bjac_sizeof,&
& psb_z_bjac_precinit, psb_z_bjac_precfree, psb_z_bjac_precdescr,&
& psb_z_bjac_dump, psb_z_bjac_apply_vect
& psb_z_bjac_dump, psb_z_bjac_apply_vect, psb_z_bjac_get_nzeros
character(len=15), parameter, private :: &
@ -763,7 +764,7 @@ contains
end subroutine psb_z_bjac_dump
function psb_z_bjac_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_z_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -778,4 +779,20 @@ contains
return
end function psb_z_bjac_sizeof
function psb_z_bjac_get_nzeros(prec) result(val)
use psb_base_mod, only : psb_long_int_k_
class(psb_z_bjac_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) then
val = val + prec%dv%get_nrows()
endif
if (allocated(prec%av)) then
val = val + prec%av(psb_l_pr_)%get_nzeros()
val = val + prec%av(psb_u_pr_)%get_nzeros()
endif
return
end function psb_z_bjac_get_nzeros
end module psb_z_bjacprec

@ -16,12 +16,13 @@ module psb_z_diagprec
procedure, pass(prec) :: precfree => psb_z_diag_precfree
procedure, pass(prec) :: precdescr => psb_z_diag_precdescr
procedure, pass(prec) :: sizeof => psb_z_diag_sizeof
procedure, pass(prec) :: get_nzeros => psb_z_diag_get_nzeros
end type psb_z_diag_prec_type
private :: psb_z_diag_apply, psb_z_diag_precbld, psb_z_diag_precseti,&
& psb_z_diag_precsetr, psb_z_diag_precsetc, psb_z_diag_sizeof,&
& psb_z_diag_precinit, psb_z_diag_precfree, psb_z_diag_precdescr,&
& psb_z_diag_apply_vect
& psb_z_diag_apply_vect, psb_z_diag_get_nzeros
contains
@ -464,7 +465,7 @@ contains
end subroutine psb_z_diag_precdescr
function psb_z_diag_sizeof(prec) result(val)
use psb_base_mod
use psb_base_mod, only : psb_long_int_k_
class(psb_z_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
@ -473,4 +474,14 @@ contains
return
end function psb_z_diag_sizeof
function psb_z_diag_get_nzeros(prec) result(val)
use psb_base_mod, only: psb_long_int_k_
class(psb_z_diag_prec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
val = 0
if (allocated(prec%dv)) val = val + prec%dv%get_nrows()
return
end function psb_z_diag_get_nzeros
end module psb_z_diagprec

Loading…
Cancel
Save