From c75cbc3d324347dd9bc05b2eb2cdb80e8b053bd7 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 4 Jul 2008 14:38:19 +0000 Subject: [PATCH] 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. --- mlprec/mld_cprecset.f90 | 2 +- mlprec/mld_dprecset.f90 | 2 +- mlprec/mld_prec_mod.f90 | 143 +++++++++++++++++++++++++++++++++++++ mlprec/mld_sprecset.f90 | 2 +- mlprec/mld_zprecset.f90 | 2 +- test/fileread/df_bench.f90 | 2 +- test/fileread/zf_bench.f90 | 2 +- 7 files changed, 149 insertions(+), 6 deletions(-) diff --git a/mlprec/mld_cprecset.f90 b/mlprec/mld_cprecset.f90 index 3c392ffd..c3b1f442 100644 --- a/mlprec/mld_cprecset.f90 +++ b/mlprec/mld_cprecset.f90 @@ -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 diff --git a/mlprec/mld_dprecset.f90 b/mlprec/mld_dprecset.f90 index 01df98ae..62264096 100644 --- a/mlprec/mld_dprecset.f90 +++ b/mlprec/mld_dprecset.f90 @@ -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 diff --git a/mlprec/mld_prec_mod.f90 b/mlprec/mld_prec_mod.f90 index eca3068c..a618281a 100644 --- a/mlprec/mld_prec_mod.f90 +++ b/mlprec/mld_prec_mod.f90 @@ -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 diff --git a/mlprec/mld_sprecset.f90 b/mlprec/mld_sprecset.f90 index 3236e5ab..bf22fab4 100644 --- a/mlprec/mld_sprecset.f90 +++ b/mlprec/mld_sprecset.f90 @@ -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 diff --git a/mlprec/mld_zprecset.f90 b/mlprec/mld_zprecset.f90 index ad23daca..01fc511b 100644 --- a/mlprec/mld_zprecset.f90 +++ b/mlprec/mld_zprecset.f90 @@ -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 diff --git a/test/fileread/df_bench.f90 b/test/fileread/df_bench.f90 index 35581b50..3c79baf1 100644 --- a/test/fileread/df_bench.f90 +++ b/test/fileread/df_bench.f90 @@ -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) diff --git a/test/fileread/zf_bench.f90 b/test/fileread/zf_bench.f90 index e5149c16..17de70ff 100644 --- a/test/fileread/zf_bench.f90 +++ b/test/fileread/zf_bench.f90 @@ -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)