mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-16 10:52:09 +00:00
mld2p4-dev:
mlprec/mld_cprecset.f90 mlprec/mld_dprecset.f90 mlprec/mld_prec_mod.f90 mlprec/mld_sprecset.f90 mlprec/mld_zprecset.f90 test/fileread/df_bench.f90 test/fileread/zf_bench.f90 Modified precset, takiong out ilev.
This commit is contained in:
@@ -360,7 +360,7 @@ subroutine mld_cprecsetc(p,what,string,info,ilev)
|
||||
|
||||
|
||||
call mld_stringval(string,val,info)
|
||||
if (info == 0) call mld_precset(p,what,val,info,ilev=ilev)
|
||||
if (info == 0) call mld_inner_precset(p,what,val,info,ilev=ilev)
|
||||
|
||||
|
||||
end subroutine mld_cprecsetc
|
||||
|
||||
@@ -360,7 +360,7 @@ subroutine mld_dprecsetc(p,what,string,info,ilev)
|
||||
|
||||
|
||||
call mld_stringval(string,val,info)
|
||||
if (info == 0) call mld_precset(p,what,val,info,ilev=ilev)
|
||||
if (info == 0) call mld_inner_precset(p,what,val,info,ilev=ilev)
|
||||
|
||||
|
||||
end subroutine mld_dprecsetc
|
||||
|
||||
@@ -83,6 +83,13 @@ module mld_prec_mod
|
||||
end interface
|
||||
|
||||
interface mld_precset
|
||||
module procedure mld_i_sprecseti, mld_i_sprecsetc, mld_i_sprecsetr,&
|
||||
& mld_i_dprecseti, mld_i_dprecsetc, mld_i_dprecsetr,&
|
||||
& mld_i_cprecseti, mld_i_cprecsetc, mld_i_cprecsetr,&
|
||||
& mld_i_zprecseti, mld_i_zprecsetc, mld_i_zprecsetr
|
||||
end interface
|
||||
|
||||
interface mld_inner_precset
|
||||
subroutine mld_sprecseti(p,what,val,info,ilev)
|
||||
use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_sprec_type
|
||||
@@ -346,4 +353,140 @@ module mld_prec_mod
|
||||
end subroutine mld_zprecbld
|
||||
end interface
|
||||
|
||||
contains
|
||||
|
||||
subroutine mld_i_sprecseti(p,what,val,info)
|
||||
use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_sprec_type
|
||||
type(mld_sprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
integer, intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_sprecseti
|
||||
|
||||
subroutine mld_i_sprecsetr(p,what,val,info)
|
||||
use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_sprec_type
|
||||
type(mld_sprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
real(psb_spk_), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_sprecsetr
|
||||
|
||||
subroutine mld_i_sprecsetc(p,what,val,info)
|
||||
use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_sprec_type
|
||||
type(mld_sprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
character(len=*), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_sprecsetc
|
||||
|
||||
subroutine mld_i_dprecseti(p,what,val,info)
|
||||
use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_
|
||||
use mld_prec_type, only : mld_dprec_type
|
||||
type(mld_dprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
integer, intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_dprecseti
|
||||
|
||||
subroutine mld_i_dprecsetr(p,what,val,info)
|
||||
use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_
|
||||
use mld_prec_type, only : mld_dprec_type
|
||||
type(mld_dprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
real(psb_dpk_), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_dprecsetr
|
||||
|
||||
subroutine mld_i_dprecsetc(p,what,val,info)
|
||||
use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_
|
||||
use mld_prec_type, only : mld_dprec_type
|
||||
type(mld_dprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
character(len=*), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_dprecsetc
|
||||
|
||||
subroutine mld_i_cprecseti(p,what,val,info)
|
||||
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_cprec_type
|
||||
type(mld_cprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
integer, intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_cprecseti
|
||||
|
||||
subroutine mld_i_cprecsetr(p,what,val,info)
|
||||
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_cprec_type
|
||||
type(mld_cprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
real(psb_spk_), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_cprecsetr
|
||||
|
||||
subroutine mld_i_cprecsetc(p,what,val,info)
|
||||
use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_
|
||||
use mld_prec_type, only : mld_cprec_type
|
||||
type(mld_cprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
character(len=*), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_cprecsetc
|
||||
|
||||
subroutine mld_i_zprecseti(p,what,val,info)
|
||||
use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_
|
||||
use mld_prec_type, only : mld_zprec_type
|
||||
type(mld_zprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
integer, intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_zprecseti
|
||||
|
||||
subroutine mld_i_zprecsetr(p,what,val,info)
|
||||
use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_
|
||||
use mld_prec_type, only : mld_zprec_type
|
||||
type(mld_zprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
real(psb_dpk_), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_zprecsetr
|
||||
|
||||
subroutine mld_i_zprecsetc(p,what,val,info)
|
||||
use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_
|
||||
use mld_prec_type, only : mld_zprec_type
|
||||
type(mld_zprec_type), intent(inout) :: p
|
||||
integer, intent(in) :: what
|
||||
character(len=*), intent(in) :: val
|
||||
integer, intent(out) :: info
|
||||
|
||||
call mld_inner_precset(p,what,val,info)
|
||||
end subroutine mld_i_zprecsetc
|
||||
|
||||
|
||||
|
||||
end module mld_prec_mod
|
||||
|
||||
@@ -360,7 +360,7 @@ subroutine mld_sprecsetc(p,what,string,info,ilev)
|
||||
|
||||
|
||||
call mld_stringval(string,val,info)
|
||||
if (info == 0) call mld_precset(p,what,val,info,ilev=ilev)
|
||||
if (info == 0) call mld_inner_precset(p,what,val,info,ilev=ilev)
|
||||
|
||||
|
||||
end subroutine mld_sprecsetc
|
||||
|
||||
@@ -360,7 +360,7 @@ subroutine mld_zprecsetc(p,what,string,info,ilev)
|
||||
|
||||
|
||||
call mld_stringval(string,val,info)
|
||||
if (info == 0) call mld_precset(p,what,val,info,ilev=ilev)
|
||||
if (info == 0) call mld_inner_precset(p,what,val,info,ilev=ilev)
|
||||
|
||||
|
||||
end subroutine mld_zprecsetc
|
||||
|
||||
@@ -231,7 +231,7 @@ program df_bench
|
||||
call mld_precinit(pre,precs(pp)%lv2,info,nlev=nlev)
|
||||
! Defaults are OK for all intermediate levels. Only fix last level.
|
||||
if (precs(pp)%omega>=0.0) then
|
||||
call mld_precset(pre,mld_aggr_damp_,precs(pp)%omega,info,ilev=nlev)
|
||||
call mld_precset(pre,mld_aggr_damp_,precs(pp)%omega,info)
|
||||
end if
|
||||
call mld_precset(pre,mld_ml_type_, precs(pp)%mltype, info)
|
||||
call mld_precset(pre,mld_aggr_alg_, precs(pp)%aggr, info)
|
||||
|
||||
@@ -217,7 +217,7 @@ program zf_bench
|
||||
call mld_precinit(pre,precs(pp)%lv2,info,nlev=nlev)
|
||||
! Defaults are OK for all intermediate levels. Only fix last level.
|
||||
if (precs(pp)%omega>=0.0) then
|
||||
call mld_precset(pre,mld_aggr_damp_,precs(pp)%omega,info,ilev=nlev)
|
||||
call mld_precset(pre,mld_aggr_damp_,precs(pp)%omega,info)
|
||||
end if
|
||||
call mld_precset(pre,mld_ml_type_, precs(pp)%mltype, info)
|
||||
call mld_precset(pre,mld_aggr_alg_, precs(pp)%aggr, info)
|
||||
|
||||
Reference in New Issue
Block a user