mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-20 21:02:35 +00:00
mld2p4-2:
mlprec/mld_daggrmat_smth_asb.F90 mlprec/mld_dcoarse_bld.f90 mlprec/mld_dilu_bld.f90 mlprec/mld_dsub_solve.f90 tests/pdegen/runs/ppde.inp Found and fixed bugs in building. Some preconditioners work, testing not complete yet.
This commit is contained in:
@@ -222,14 +222,14 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info)
|
||||
call acoo4%set_nzeros(nrow)
|
||||
endif
|
||||
call acoo4%set_dupl(psb_dupl_add_)
|
||||
|
||||
|
||||
call acsr4%mv_from_coo(acoo4,info)
|
||||
if (info==0) call a%cscnv(acsr3,info,dupl=psb_dupl_add_)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& ' Initial copies done.'
|
||||
|
||||
|
||||
if (filter_mat) then
|
||||
!
|
||||
! Build the filtered matrix Af from A
|
||||
@@ -265,6 +265,7 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info)
|
||||
end if
|
||||
end do
|
||||
call acoof%set_nzeros(k)
|
||||
call acoof%set_dupl(psb_dupl_add_)
|
||||
call acsrf%mv_from_coo(acoof,info)
|
||||
end if
|
||||
|
||||
@@ -369,6 +370,7 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info)
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done NUMBMM 1'
|
||||
|
||||
else
|
||||
!
|
||||
! Build the smoothed prolongator using the original matrix
|
||||
@@ -407,6 +409,7 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info)
|
||||
|
||||
end if
|
||||
call acsr4%free()
|
||||
call acsr1%set_dupl(psb_dupl_add_)
|
||||
|
||||
call am1%mv_from(acsr1)
|
||||
if (ml_global_nmb) then
|
||||
@@ -435,7 +438,7 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,p,info)
|
||||
call psb_numbmm(a,am1,am3)
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done NUMBMM 2'
|
||||
& 'Done NUMBMM 2',p%iprcparm(mld_aggr_kind_), mld_smooth_prol_
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_smooth_prol_) then
|
||||
call am2%transp(am1)
|
||||
|
||||
@@ -123,7 +123,8 @@ subroutine mld_dcoarse_bld(a,desc_a,p,info)
|
||||
!
|
||||
call mld_aggrmap_bld(p%iprcparm(mld_aggr_alg_),p%rprcparm(mld_aggr_thresh_),&
|
||||
& a,desc_a,ilaggr,nlaggr,info)
|
||||
if(info /= 0) then
|
||||
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4010,name,a_err='mld_aggrmap_bld')
|
||||
goto 9999
|
||||
end if
|
||||
@@ -134,6 +135,7 @@ subroutine mld_dcoarse_bld(a,desc_a,p,info)
|
||||
! algorithm specified by p%iprcparm(mld_aggr_kind_)
|
||||
!
|
||||
call mld_aggrmat_asb(a,desc_a,ilaggr,nlaggr,p,info)
|
||||
|
||||
if(info /= 0) then
|
||||
call psb_errpush(4010,name,a_err='mld_aggrmat_asb')
|
||||
goto 9999
|
||||
|
||||
@@ -263,7 +263,9 @@ subroutine mld_dilu_bld(a,p,upd,info,blck)
|
||||
|
||||
end if
|
||||
|
||||
call p%av(mld_l_pr_)%set_asb()
|
||||
call p%av(mld_l_pr_)%trim()
|
||||
call p%av(mld_u_pr_)%set_asb()
|
||||
call p%av(mld_u_pr_)%trim()
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
|
||||
@@ -195,12 +195,12 @@ subroutine mld_dsub_solve(alpha,prec,x,beta,y,desc_data,trans,work,info)
|
||||
! factorization of the blocks (distributed matrix) or approximately
|
||||
! solve a system through ILU(k)/MILU(k)/ILU(k,t) (replicated matrix).
|
||||
!
|
||||
|
||||
|
||||
select case(trans_)
|
||||
case('N')
|
||||
|
||||
call psb_spsm(done,prec%av(mld_l_pr_),x,dzero,ww,desc_data,info,&
|
||||
& trans=trans_,scale='L',diag=prec%d,choice=psb_none_,work=aux)
|
||||
|
||||
if (info == 0) call psb_spsm(alpha,prec%av(mld_u_pr_),ww,beta,y,desc_data,info,&
|
||||
& trans=trans_,scale='U',choice=psb_none_, work=aux)
|
||||
|
||||
@@ -283,6 +283,7 @@ subroutine mld_dsub_solve(alpha,prec,x,beta,y,desc_data,trans,work,info)
|
||||
end select
|
||||
|
||||
if (info /= 0) then
|
||||
|
||||
call psb_errpush(4001,name,a_err='Error in subsolve')
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
BICGSTAB ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
|
||||
CSR ! Storage format CSR COO JAD
|
||||
50 ! IDIM; domain size is idim**3
|
||||
40 ! IDIM; domain size is idim**3
|
||||
2 ! ISTOPC
|
||||
00100 ! ITMAX
|
||||
01 ! ITRACE
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
3L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
2L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner NONE DIAG BJAC AS ML
|
||||
0 ! Number of overlap layers for AS preconditioner at finest level
|
||||
1 ! Number of overlap layers for AS preconditioner at finest level
|
||||
HALO ! Restriction operator NONE HALO
|
||||
NONE ! Prolongation operator NONE SUM AVG
|
||||
ILU ! Subdomain solver ILU MILU ILUT UMF SLU
|
||||
0 ! Level-set N for ILU(N)
|
||||
1 ! Level-set N for ILU(N)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
3 ! Number of levels in a multilevel preconditioner
|
||||
MINENERGY ! Kind of aggregation: SMOOTHED, NONSMOOTHED, MINENERGY
|
||||
2 ! Number of levels in a multilevel preconditioner
|
||||
SMOOTHED ! Kind of aggregation: SMOOTHED, NONSMOOTHED, MINENERGY
|
||||
DEC ! Type of aggregation DEC SYMDEC GLB
|
||||
MULT ! Type of multilevel correction: ADD MULT
|
||||
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
|
||||
DIST ! Coarse level: matrix distribution DIST REPL
|
||||
BJAC ! Coarse level: solver BJAC UMF SLU SLUDIST
|
||||
ILU ! Coarse level: subsolver ILU UMF SLU SLUDIST
|
||||
1 ! Coarse level: Level-set N for ILU(N)
|
||||
0 ! Coarse level: Level-set N for ILU(N)
|
||||
1.d-4 ! Coarse level: Threshold T for ILU(T,P)
|
||||
4 ! Coarse level: Number of Jacobi sweeps
|
||||
0.10d0 ! Smoother Aggregation Threshold: >= 0.0
|
||||
|
||||
Reference in New Issue
Block a user