mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
Merge latest changes from polysmooth
This commit is contained in:
@@ -323,10 +323,10 @@ module amg_base_prec_type
|
||||
!
|
||||
! Legal values for entry: amg_poly_variant_
|
||||
!
|
||||
integer(psb_ipk_), parameter :: amg_poly_lottes_ = 0
|
||||
integer(psb_ipk_), parameter :: amg_poly_lottes_beta_ = 1
|
||||
integer(psb_ipk_), parameter :: amg_poly_new_ = 2
|
||||
integer(psb_ipk_), parameter :: amg_poly_dbg_ = 8
|
||||
integer(psb_ipk_), parameter :: amg_cheb_4_ = 0
|
||||
integer(psb_ipk_), parameter :: amg_cheb_4_opt_ = 1
|
||||
integer(psb_ipk_), parameter :: amg_cheb_1_opt_ = 2
|
||||
integer(psb_ipk_), parameter :: amg_poly_dbg_ = 8
|
||||
|
||||
integer(psb_ipk_), parameter :: amg_poly_rho_est_power_ = 0
|
||||
|
||||
@@ -570,12 +570,12 @@ contains
|
||||
val = amg_as_
|
||||
case('POLY')
|
||||
val = amg_poly_
|
||||
case('POLY_LOTTES')
|
||||
val = amg_poly_lottes_
|
||||
case('POLY_LOTTES_BETA')
|
||||
val = amg_poly_lottes_beta_
|
||||
case('POLY_NEW')
|
||||
val = amg_poly_new_
|
||||
case('CHEB_4')
|
||||
val = amg_cheb_4_
|
||||
case('CHEB_4_OPT')
|
||||
val = amg_cheb_4_opt_
|
||||
case('CHEB_1_OPT')
|
||||
val = amg_cheb_1_opt_
|
||||
case('POLY_DBG')
|
||||
val = amg_poly_dbg_
|
||||
case('POLY_RHO_EST_POWER')
|
||||
|
||||
@@ -322,7 +322,7 @@ contains
|
||||
!
|
||||
sm%pdegree = 1
|
||||
sm%rho_ba = -done
|
||||
sm%variant = amg_poly_lottes_
|
||||
sm%variant = amg_cheb_4_
|
||||
sm%rho_estimate = amg_poly_rho_est_power_
|
||||
sm%rho_estimate_iterations = 20
|
||||
if (allocated(sm%sv)) then
|
||||
|
||||
@@ -322,7 +322,7 @@ contains
|
||||
!
|
||||
sm%pdegree = 1
|
||||
sm%rho_ba = -sone
|
||||
sm%variant = amg_poly_lottes_
|
||||
sm%variant = amg_cheb_4_
|
||||
sm%rho_estimate = amg_poly_rho_est_power_
|
||||
sm%rho_estimate_iterations = 20
|
||||
if (allocated(sm%sv)) then
|
||||
|
||||
@@ -135,4 +135,4 @@ MilanLongInt computeCandidateMateS(MilanLongInt adj1,
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -53,4 +53,4 @@ void PARALLEL_COMPUTE_CANDIDATE_MATE_BS(MilanLongInt NLVer,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -366,4 +366,4 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_BS(MilanLongInt NLVer,
|
||||
|
||||
} // End of parallel region
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -582,4 +582,4 @@ void processMatchedVerticesS(
|
||||
#endif
|
||||
} // End of parallel region
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -588,4 +588,4 @@ void processMatchedVerticesAndSendMessagesS(
|
||||
cout << myRank<<" Done sending messages"<<endl;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,4 +30,4 @@ void queuesTransfer(vector<MilanLongInt> &U,
|
||||
privateQOwner.clear();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -206,4 +206,3 @@ void sendBundledMessages(MilanLongInt *numGhostEdges,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,6 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_c_base_aggregator_mod
|
||||
use amg_c_dec_aggregator_mod
|
||||
use amg_c_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
use amg_c_jac_smoother
|
||||
use amg_c_as_smoother
|
||||
use amg_c_diag_solver
|
||||
|
||||
@@ -44,6 +44,7 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_d_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#endif
|
||||
use amg_d_poly_smoother
|
||||
use amg_d_jac_smoother
|
||||
use amg_d_as_smoother
|
||||
|
||||
@@ -44,6 +44,7 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_s_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#endif
|
||||
use amg_s_poly_smoother
|
||||
use amg_s_jac_smoother
|
||||
use amg_s_as_smoother
|
||||
|
||||
@@ -42,7 +42,6 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_z_base_aggregator_mod
|
||||
use amg_z_dec_aggregator_mod
|
||||
use amg_z_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
use amg_z_jac_smoother
|
||||
use amg_z_as_smoother
|
||||
use amg_z_diag_solver
|
||||
|
||||
@@ -140,7 +140,7 @@ subroutine amg_d_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
call tz%zero()
|
||||
|
||||
select case(sm%variant)
|
||||
case(amg_poly_lottes_)
|
||||
case(amg_cheb_4_)
|
||||
if (do_timings) call psb_tic(poly_1)
|
||||
block
|
||||
real(psb_dpk_) :: cz, cr
|
||||
@@ -172,7 +172,7 @@ subroutine amg_d_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
end block
|
||||
if (do_timings) call psb_toc(poly_1)
|
||||
|
||||
case(amg_poly_lottes_beta_)
|
||||
case(amg_cheb_4_opt_)
|
||||
if (do_timings) call psb_tic(poly_2)
|
||||
block
|
||||
real(psb_dpk_) :: cz, cr
|
||||
@@ -209,7 +209,7 @@ subroutine amg_d_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
if (do_timings) call psb_toc(poly_vect)
|
||||
end block
|
||||
if (do_timings) call psb_toc(poly_2)
|
||||
case(amg_poly_new_)
|
||||
case(amg_cheb_1_opt_)
|
||||
if (do_timings) call psb_tic(poly_3)
|
||||
block
|
||||
real(psb_dpk_) :: sigma, theta, delta, rho_old, rho
|
||||
|
||||
@@ -75,9 +75,9 @@ subroutine amg_d_poly_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
|
||||
nrow_a = a%get_nrows()
|
||||
nztota = a%get_nzeros()
|
||||
select case(sm%variant)
|
||||
case(amg_poly_lottes_)
|
||||
case(amg_cheb_4_)
|
||||
! do nothing
|
||||
case(amg_poly_lottes_beta_)
|
||||
case(amg_cheb_4_opt_)
|
||||
if ((1<=sm%pdegree).and.(sm%pdegree<=30)) then
|
||||
call psb_realloc(sm%pdegree,sm%poly_beta,info)
|
||||
sm%poly_beta(1:sm%pdegree) = amg_d_poly_beta_mat(1:sm%pdegree,sm%pdegree)
|
||||
@@ -87,7 +87,7 @@ subroutine amg_d_poly_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
|
||||
& a_err='invalid sm%degree for poly_beta')
|
||||
goto 9999
|
||||
end if
|
||||
case(amg_poly_new_)
|
||||
case(amg_cheb_1_opt_)
|
||||
|
||||
if ((1<=sm%pdegree).and.(sm%pdegree<=30)) then
|
||||
!Ok
|
||||
|
||||
@@ -58,11 +58,11 @@ subroutine amg_d_poly_smoother_cseti(sm,what,val,info,idx)
|
||||
sm%pdegree = val
|
||||
case('POLY_VARIANT')
|
||||
select case(val)
|
||||
case(amg_poly_lottes_,amg_poly_lottes_beta_,amg_poly_new_)
|
||||
case(amg_cheb_4_,amg_cheb_4_opt_,amg_cheb_1_opt_)
|
||||
sm%variant = val
|
||||
case default
|
||||
write(0,*) 'Invalid choice for POLY_VARIANT, defaulting to amg_poly_lottes_',val
|
||||
sm%variant = amg_poly_lottes_
|
||||
write(0,*) 'Invalid choice for POLY_VARIANT, defaulting to amg_cheb_4_',val
|
||||
sm%variant = amg_cheb_4_
|
||||
end select
|
||||
case('POLY_RHO_ESTIMATE')
|
||||
select case(val)
|
||||
|
||||
@@ -77,17 +77,17 @@ subroutine amg_d_poly_smoother_descr(sm,info,iout,coarse,prefix)
|
||||
|
||||
write(iout_,*) trim(prefix_), ' Polynomial smoother '
|
||||
select case(sm%variant)
|
||||
case(amg_poly_lottes_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','POLY_LOTTES'
|
||||
case(amg_cheb_4_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','CHEB_4'
|
||||
write(iout_,*) trim(prefix_), ' Degree: ',sm%pdegree
|
||||
write(iout_,*) trim(prefix_), ' rho_ba: ',sm%rho_ba
|
||||
case(amg_poly_lottes_beta_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','POLY_LOTTES_BETA'
|
||||
case(amg_cheb_4_opt_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','CHEB_4_OPT'
|
||||
write(iout_,*) trim(prefix_), ' Degree: ',sm%pdegree
|
||||
write(iout_,*) trim(prefix_), ' rho_ba: ',sm%rho_ba
|
||||
if (allocated(sm%poly_beta)) write(iout_,*) trim(prefix_), ' Coefficients: ',sm%poly_beta(1:sm%pdegree)
|
||||
case(amg_poly_new_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','POLY_NEW'
|
||||
case(amg_cheb_1_opt_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','CHEB_1_OPT'
|
||||
write(iout_,*) trim(prefix_), ' Degree: ',sm%pdegree
|
||||
write(iout_,*) trim(prefix_), ' rho_ba: ',sm%rho_ba
|
||||
write(iout_,*) trim(prefix_), ' Coefficient: ',sm%cf_a
|
||||
|
||||
@@ -140,7 +140,7 @@ subroutine amg_s_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
call tz%zero()
|
||||
|
||||
select case(sm%variant)
|
||||
case(amg_poly_lottes_)
|
||||
case(amg_cheb_4_)
|
||||
if (do_timings) call psb_tic(poly_1)
|
||||
block
|
||||
real(psb_spk_) :: cz, cr
|
||||
@@ -172,7 +172,7 @@ subroutine amg_s_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
end block
|
||||
if (do_timings) call psb_toc(poly_1)
|
||||
|
||||
case(amg_poly_lottes_beta_)
|
||||
case(amg_cheb_4_opt_)
|
||||
if (do_timings) call psb_tic(poly_2)
|
||||
block
|
||||
real(psb_spk_) :: cz, cr
|
||||
@@ -209,7 +209,7 @@ subroutine amg_s_poly_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
if (do_timings) call psb_toc(poly_vect)
|
||||
end block
|
||||
if (do_timings) call psb_toc(poly_2)
|
||||
case(amg_poly_new_)
|
||||
case(amg_cheb_1_opt_)
|
||||
if (do_timings) call psb_tic(poly_3)
|
||||
block
|
||||
real(psb_spk_) :: sigma, theta, delta, rho_old, rho
|
||||
|
||||
@@ -75,9 +75,9 @@ subroutine amg_s_poly_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
|
||||
nrow_a = a%get_nrows()
|
||||
nztota = a%get_nzeros()
|
||||
select case(sm%variant)
|
||||
case(amg_poly_lottes_)
|
||||
case(amg_cheb_4_)
|
||||
! do nothing
|
||||
case(amg_poly_lottes_beta_)
|
||||
case(amg_cheb_4_opt_)
|
||||
if ((1<=sm%pdegree).and.(sm%pdegree<=30)) then
|
||||
call psb_realloc(sm%pdegree,sm%poly_beta,info)
|
||||
sm%poly_beta(1:sm%pdegree) = amg_d_poly_beta_mat(1:sm%pdegree,sm%pdegree)
|
||||
@@ -87,7 +87,7 @@ subroutine amg_s_poly_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
|
||||
& a_err='invalid sm%degree for poly_beta')
|
||||
goto 9999
|
||||
end if
|
||||
case(amg_poly_new_)
|
||||
case(amg_cheb_1_opt_)
|
||||
|
||||
if ((1<=sm%pdegree).and.(sm%pdegree<=30)) then
|
||||
!Ok
|
||||
|
||||
@@ -58,11 +58,11 @@ subroutine amg_s_poly_smoother_cseti(sm,what,val,info,idx)
|
||||
sm%pdegree = val
|
||||
case('POLY_VARIANT')
|
||||
select case(val)
|
||||
case(amg_poly_lottes_,amg_poly_lottes_beta_,amg_poly_new_)
|
||||
case(amg_cheb_4_,amg_cheb_4_opt_,amg_cheb_1_opt_)
|
||||
sm%variant = val
|
||||
case default
|
||||
write(0,*) 'Invalid choice for POLY_VARIANT, defaulting to amg_poly_lottes_',val
|
||||
sm%variant = amg_poly_lottes_
|
||||
write(0,*) 'Invalid choice for POLY_VARIANT, defaulting to amg_cheb_4_',val
|
||||
sm%variant = amg_cheb_4_
|
||||
end select
|
||||
case('POLY_RHO_ESTIMATE')
|
||||
select case(val)
|
||||
|
||||
@@ -77,17 +77,17 @@ subroutine amg_s_poly_smoother_descr(sm,info,iout,coarse,prefix)
|
||||
|
||||
write(iout_,*) trim(prefix_), ' Polynomial smoother '
|
||||
select case(sm%variant)
|
||||
case(amg_poly_lottes_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','POLY_LOTTES'
|
||||
case(amg_cheb_4_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','CHEB_4'
|
||||
write(iout_,*) trim(prefix_), ' Degree: ',sm%pdegree
|
||||
write(iout_,*) trim(prefix_), ' rho_ba: ',sm%rho_ba
|
||||
case(amg_poly_lottes_beta_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','POLY_LOTTES_BETA'
|
||||
case(amg_cheb_4_opt_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','CHEB_4_OPT'
|
||||
write(iout_,*) trim(prefix_), ' Degree: ',sm%pdegree
|
||||
write(iout_,*) trim(prefix_), ' rho_ba: ',sm%rho_ba
|
||||
if (allocated(sm%poly_beta)) write(iout_,*) trim(prefix_), ' Coefficients: ',sm%poly_beta(1:sm%pdegree)
|
||||
case(amg_poly_new_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','POLY_NEW'
|
||||
case(amg_cheb_1_opt_)
|
||||
write(iout_,*) trim(prefix_), ' variant: ','CHEB_1_OPT'
|
||||
write(iout_,*) trim(prefix_), ' Degree: ',sm%pdegree
|
||||
write(iout_,*) trim(prefix_), ' rho_ba: ',sm%rho_ba
|
||||
write(iout_,*) trim(prefix_), ' Coefficient: ',sm%cf_a
|
||||
|
||||
@@ -16,7 +16,7 @@ ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS POLY r 1-level, repeats previous.
|
||||
6 ! Number of sweeps for smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
CHEB_4_OPT ! Polynomial variant
|
||||
% Fields to be added for POLY
|
||||
% POLY_RHO_ESTIMATE Currently only POLY_RHO_EST_POWER
|
||||
% POLY_RHO_ESTIMATE_ITERATIONS default = 20
|
||||
@@ -35,7 +35,7 @@ LLK ! AINV variant
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
6 ! Number of sweeps for (post) smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
CHEB_4_OPT ! Polynomial variant
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
|
||||
@@ -27,7 +27,7 @@ ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS POLY r 1-level, repeats previous.
|
||||
6 ! Number of sweeps for smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
CHEB_4_OPT ! Polynomial variant
|
||||
% Fields to be added for POLY
|
||||
% POLY_RHO_ESTIMATE Currently only POLY_RHO_EST_POWER
|
||||
% POLY_RHO_ESTIMATE_ITERATIONS default = 20
|
||||
@@ -47,7 +47,7 @@ LLK ! AINV variant
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
6 ! Number of sweeps for (post) smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
CHEB_4_OPT ! Polynomial variant
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
|
||||
Reference in New Issue
Block a user