From a1d88c2bbfb4ff849df1753b3ee08b84d11d348d Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 16 May 2016 15:08:53 +0000 Subject: [PATCH] mld2p4-smooth-2side: mlprec/impl/mld_dprecset.F90 tests/fileread/df_sample.f90 tests/fileread/runs/dfs.inp tests/pdegen/runs/ppde.inp Fixed bug in precset. Adapted df_sample. --- mlprec/impl/mld_dprecset.F90 | 2 +- tests/fileread/df_sample.f90 | 7 ++++++- tests/fileread/runs/dfs.inp | 20 ++++++++++---------- tests/pdegen/runs/ppde.inp | 4 ++-- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/mlprec/impl/mld_dprecset.F90 b/mlprec/impl/mld_dprecset.F90 index c11ba37d..4143932e 100644 --- a/mlprec/impl/mld_dprecset.F90 +++ b/mlprec/impl/mld_dprecset.F90 @@ -243,7 +243,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev,pos) & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_smoother_sweeps_,mld_smoother_type_) do ilev_=1,max(1,nlev_-1) - call p%precv(ilev_)%set(mld_smoother_type_,val,info,pos=pos) + call p%precv(ilev_)%set(what,val,info,pos=pos) if (info /= 0) return end do diff --git a/tests/fileread/df_sample.f90 b/tests/fileread/df_sample.f90 index ee732223..de0fd840 100644 --- a/tests/fileread/df_sample.f90 +++ b/tests/fileread/df_sample.f90 @@ -74,6 +74,8 @@ program df_sample real(psb_dpk_) :: ascale ! smoothed aggregation scale factor end type precdata type(precdata) :: prec_choice + type(mld_d_jac_smoother_type) :: dbsmth + type(mld_d_bwgs_solver_type) :: dbwgs ! sparse matrices type(psb_dspmat_type) :: a, aux_a @@ -305,7 +307,10 @@ program df_sample call mld_precset(prec,mld_coarse_fillin_, prec_choice%cfill, info) call mld_precset(prec,mld_coarse_iluthrs_, prec_choice%cthres, info) call mld_precset(prec,mld_coarse_sweeps_, prec_choice%cjswp, info) - + call prec%set(dbsmth,info,pos='post') + call prec%set(dbwgs,info,pos='post') + call mld_precset(prec,'solver_sweeps', 4, info, pos='pre') + call mld_precset(prec,'solver_sweeps', 4, info, pos='post') else nlv = 1 call mld_precinit(prec,prec_choice%prec,info) diff --git a/tests/fileread/runs/dfs.inp b/tests/fileread/runs/dfs.inp index 31255d23..ed274e1d 100644 --- a/tests/fileread/runs/dfs.inp +++ b/tests/fileread/runs/dfs.inp @@ -1,26 +1,26 @@ -pressmat.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or -pressrhs.mtx ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html +DATIAMBRA/matrix.mm ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or +DATIAMBRA/rhs.mm ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html MM ! -RGMRES ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG +CG ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG CSR ! Storage format: CSR COO JAD 0 ! IPART (partition method): 0 (block) 2 (graph, with Metis) 2 ! ISTOPC -01000 ! ITMAX -02 ! ITRACE +01500 ! ITMAX +10 ! ITRACE 30 ! IRST (restart for RGMRES and BiCGSTABL) -1.d-9 ! EPS +1.d-6 ! EPS 4L-M-RAS-I-UR ! Longer descriptive name for preconditioner (up to 20 chars) ML ! Preconditioner type: NONE JACOBI BJAC AS ML 1 ! Number of overlap layers for AS preconditioner HALO ! AS restriction operator: NONE HALO NONE ! AS prolongation operator: NONE SUM AVG -ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU MUMPS -0 ! Fill level P for ILU(P) and ILU(T,P) +GS ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU MUMPS +4 ! Fill level P for ILU(P) and ILU(T,P) 1.d-4 ! Threshold T for ILU(T,P) 1 ! Number of Jacobi sweeps for base smoother -4 ! Number of levels in a multilevel preconditioner +5 ! Number of levels in a multilevel preconditioner AS ! Smoother type JACOBI BJAC AS ignored for non-ML -SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED +UNSMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED DEC ! Type of aggregation: DEC MULT ! Type of multilevel correction: ADD MULT TWOSIDE ! Side of correction PRE POST TWOSIDE (ignored for ADD) diff --git a/tests/pdegen/runs/ppde.inp b/tests/pdegen/runs/ppde.inp index 8282eec6..869bb17d 100644 --- a/tests/pdegen/runs/ppde.inp +++ b/tests/pdegen/runs/ppde.inp @@ -1,8 +1,8 @@ BICGSTAB ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG CSR ! Storage format CSR COO JAD -0030 ! IDIM; domain size is idim**3 +0040 ! IDIM; domain size is idim**3 2 ! ISTOPC -0500 ! ITMAX +2000 ! ITMAX 10 ! ITRACE 30 ! IRST (restart for RGMRES and BiCGSTABL) 1.d-6 ! EPS