mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-20 21:02:35 +00:00
mld2p4:
docs/html/img92.png docs/html/node18.html docs/mld2p4-1.0.pdf docs/src/userinterface.tex mlprec/mld_caggrmat_smth_asb.F90 mlprec/mld_cmlprec_bld.f90 mlprec/mld_cprecinit.F90 mlprec/mld_cprecset.f90 mlprec/mld_daggrmat_smth_asb.F90 mlprec/mld_dmlprec_bld.f90 mlprec/mld_dprecinit.F90 mlprec/mld_dprecset.f90 mlprec/mld_prec_type.f90 mlprec/mld_saggrmat_smth_asb.F90 mlprec/mld_smlprec_bld.f90 mlprec/mld_sprecinit.F90 mlprec/mld_sprecset.f90 mlprec/mld_zaggrmat_smth_asb.F90 mlprec/mld_zmlprec_bld.f90 mlprec/mld_zprecinit.F90 mlprec/mld_zprecset.f90 test/fileread/cf_sample.f90 test/fileread/df_sample.f90 test/fileread/runs/cfs.inp test/fileread/runs/dfs.inp test/fileread/runs/sfs.inp test/fileread/runs/zfs.inp test/fileread/sf_sample.f90 test/fileread/zf_sample.f90 test/pdegen/ppde.f90 test/pdegen/runs/ppde.inp test/pdegen/spde.f90 Fixed proposal for aggr_omega_Alg aggr_omega_val.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 695 B After Width: | Height: | Size: 813 B |
+32
-30
@@ -137,7 +137,7 @@ refer to Section <A HREF="node11.html#sec:background">4</A>.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1246"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1251"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 2:</STRONG>
|
||||
Parameters defining the type of multi-level preconditioner.
|
||||
@@ -181,7 +181,7 @@ Parameters defining the type of multi-level preconditioner.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1248"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1253"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 3:</STRONG>
|
||||
Parameters defining the one-level preconditioner used as smoother.
|
||||
@@ -281,7 +281,7 @@ Parameters defining the one-level preconditioner used as smoother.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1250"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1255"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 4:</STRONG>
|
||||
Parameters defining the aggregation algorithm.
|
||||
@@ -319,49 +319,51 @@ Parameters defining the aggregation algorithm.
|
||||
SRC="img91.png"
|
||||
ALT="$\theta$"> in the aggregation algorithm.</TD>
|
||||
</TR>
|
||||
<TR><TD ALIGN="LEFT"><code>mld_aggr_omega_alg_</code></TD>
|
||||
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=65><TT>'USER_CHOICE'</TT> <TT>'EIG_EST'</TT></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=74><TT>'EIG_EST'</TT></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=198>How the damping parameter <IMG
|
||||
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img84.png"
|
||||
ALT="$\omega$"> in the
|
||||
smoothed aggregation should be computed:
|
||||
either via an estimate of the eigenvalue
|
||||
<IMG
|
||||
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img85.png"
|
||||
ALT="$D^{-1}A$"> with largest modulus, or explicily
|
||||
specified by the user.</TD>
|
||||
</TR>
|
||||
<TR><TD ALIGN="LEFT"><code>mld_aggr_eig_</code></TD>
|
||||
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=65><TT>'A_NORMI'</TT></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=74><TT>'A_NORMI'</TT></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=198>Estimate of the eigenvalue <IMG
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=198>How to estimate the eigenvalue <IMG
|
||||
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img85.png"
|
||||
ALT="$D^{-1}A$"> with largest modulus,
|
||||
to build the damping parameter <IMG
|
||||
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img84.png"
|
||||
ALT="$\omega$"> in the smoothed aggregation.
|
||||
Currently, only the infinity norm of
|
||||
the matrix is available.</TD>
|
||||
ALT="$D^{-1}A$"> with largest modulus.
|
||||
Currently only the infinity norm estimate
|
||||
is available.</TD>
|
||||
</TR>
|
||||
<TR><TD ALIGN="LEFT"><code>mld_aggr_damp_</code></TD>
|
||||
<TD ALIGN="LEFT"><code>real(</code><I>kind_parameter</I><code>)</code></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=65>Any real num.</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=65>Any nonnegative real num.</TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=74><!-- MATH
|
||||
$4/(3||D^{-1}A||_\infty)$
|
||||
$4/(3|\lambda_{max}(D^{-1}A)|)$
|
||||
-->
|
||||
<IMG
|
||||
WIDTH="124" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
|
||||
WIDTH="151" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
|
||||
SRC="img92.png"
|
||||
ALT="$4/(3\vert\vert D^{-1}A\vert\vert _\infty)$"></TD>
|
||||
ALT="$4/(3\vert\lambda_{max}(D^{-1}A)\vert)$"></TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=198>Damping parameter <IMG
|
||||
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img84.png"
|
||||
ALT="$\omega$"> in the smoothed aggregation algorithm.
|
||||
If the user specifies a negative value, then <IMG
|
||||
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img84.png"
|
||||
ALT="$\omega$">
|
||||
is set to its default value;
|
||||
otherwise, <IMG
|
||||
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img84.png"
|
||||
ALT="$\omega$"> is set to the value provided by the
|
||||
user. In the latter case no estimate of the eigenvalue of
|
||||
<IMG
|
||||
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
|
||||
SRC="img85.png"
|
||||
ALT="$D^{-1}A$"> with largest modulus is computed.</TD>
|
||||
Must be set by the user if
|
||||
<code>USER_CHOICE</code> was specified for
|
||||
<code>mld_aggr_omega_alg_</code>,
|
||||
otherwise it is computed by the library.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
@@ -372,7 +374,7 @@ Parameters defining the aggregation algorithm.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1252"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1257"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 5:</STRONG>
|
||||
Parameters defining the coarse-space correction at the coarsest
|
||||
|
||||
+455
-392
File diff suppressed because it is too large
Load Diff
+17
-11
@@ -234,22 +234,28 @@ refer to Section~\ref{sec:background}.
|
||||
& Any~real~num. $\in [0, 1]$
|
||||
& 0
|
||||
& Threshold $\theta$ in the aggregation algorithm. \\ \hline
|
||||
\verb|mld_aggr_omega_alg_| & \verb|character(len=*)|
|
||||
& \texttt{'USER\_CHOICE'} \hspace{2.5cm} \texttt{'EIG\_EST'}
|
||||
& \texttt{'EIG\_EST'}
|
||||
& How the damping parameter $\omega$ in the
|
||||
smoothed aggregation should be computed:
|
||||
either via an estimate of the eigenvalue
|
||||
$D^{-1}A$ with largest modulus, or explicily
|
||||
specified by the user. \\ \hline
|
||||
\verb|mld_aggr_eig_| & \verb|character(len=*)|
|
||||
& \texttt{'A\_NORMI'}
|
||||
& \texttt{'A\_NORMI'}
|
||||
& Estimate of the eigenvalue $D^{-1}A$ with largest modulus,
|
||||
to build the damping parameter $\omega$ in the smoothed aggregation.
|
||||
Currently, only the infinity norm of
|
||||
the matrix is available. \\ \hline
|
||||
& How to estimate the eigenvalue $D^{-1}A$ with largest modulus.
|
||||
Currently only the infinity norm estimate
|
||||
is available. \\ \hline
|
||||
\verb|mld_aggr_damp_| & \verb|real(|\emph{kind\_parameter}\verb|)|
|
||||
& Any~real~num.
|
||||
& $4/(3||D^{-1}A||_\infty)$
|
||||
& Any~nonnegative~real~num.
|
||||
& $4/(3|\lambda_{max}(D^{-1}A)|)$
|
||||
& Damping parameter $\omega$ in the smoothed aggregation algorithm.
|
||||
If the user specifies a negative value, then $\omega$
|
||||
is set to its default value;
|
||||
otherwise, $\omega$ is set to the value provided by the
|
||||
user. In the latter case no estimate of the eigenvalue of
|
||||
$D^{-1}A$ with largest modulus is computed.\\
|
||||
Must be set by the user if
|
||||
\verb|USER_CHOICE| was specified for
|
||||
\verb|mld_aggr_omega_alg_|,
|
||||
otherwise it is computed by the library.\\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
! where D is the diagonal matrix with main diagonal equal to the main diagonal
|
||||
! of A, and omega is a suitable smoothing parameter. An estimate of the spectral
|
||||
! radius of D^(-1)A, to be used in the computation of omega, is provided,
|
||||
! according to the value of p%iprcparm(mld_aggr_eig_), specified by the user
|
||||
! according to the value of p%iprcparm(mld_aggr_omega_alg_), specified by the user
|
||||
! through mld_dprecinit and mld_dprecset.
|
||||
!
|
||||
! This routine can also build A_C according to a "bizarre" aggregation algorithm,
|
||||
@@ -106,7 +106,7 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
include 'mpif.h'
|
||||
#endif
|
||||
|
||||
! Arguments
|
||||
! Arguments
|
||||
type(psb_cspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
type(psb_cspmat_type), intent(out) :: ac
|
||||
@@ -114,7 +114,7 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
type(mld_cbaseprc_type), intent(inout), target :: p
|
||||
integer, intent(out) :: info
|
||||
|
||||
! Local variables
|
||||
! Local variables
|
||||
type(psb_cspmat_type) :: b
|
||||
integer, pointer :: nzbr(:), idisp(:)
|
||||
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
|
||||
@@ -261,50 +261,61 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
call psb_sp_scal(am3,adiag,info)
|
||||
if (info /= 0) goto 9999
|
||||
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
if (p%iprcparm(mld_aggr_omega_alg_) == mld_eig_est_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = dzero
|
||||
dg = done
|
||||
do i=1,am3%m
|
||||
tmp = dzero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + abs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = abs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = szero
|
||||
dg = sone
|
||||
do i=1,am3%m
|
||||
tmp = szero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + abs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = abs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='this section only CSR')
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
else
|
||||
info = 4001
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
else
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_omega_val_) = omega
|
||||
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_damp_) = omega
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) == mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) == mld_user_choice_) then
|
||||
|
||||
omega = p%rprcparm(mld_aggr_damp_)
|
||||
omega = p%rprcparm(mld_aggr_omega_val_)
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) /= mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) /= mld_user_choice_) then
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_omega_alg_')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
@@ -368,7 +379,7 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
call psb_errpush(4001,name,a_err='Halo of am1')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
call psb_symbmm(a,am1,am3,info)
|
||||
if(info /= 0) then
|
||||
call psb_errpush(4010,name,a_err='symbmm 2')
|
||||
|
||||
@@ -100,7 +100,11 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info)
|
||||
& mld_distr_mat_,is_legal_ml_coarse_mat)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_pos_),'smooth_pos',&
|
||||
& mld_pre_smooth_,is_legal_ml_smooth_pos)
|
||||
|
||||
call mld_check_def(p%iprcparm(mld_aggr_omega_alg_),'Omega Alg.',&
|
||||
& mld_eig_est_,is_legal_ml_aggr_omega_alg)
|
||||
call mld_check_def(p%iprcparm(mld_aggr_eig_),'Eigenvalue estimate',&
|
||||
& mld_max_norm_,is_legal_ml_aggr_eig)
|
||||
|
||||
|
||||
select case(p%iprcparm(mld_sub_solve_))
|
||||
case(mld_ilu_n_,mld_milu_n_)
|
||||
@@ -108,7 +112,7 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info)
|
||||
case(mld_ilu_t_)
|
||||
call mld_check_def(p%rprcparm(mld_sub_iluthrs_),'Eps',szero,is_legal_s_fact_thrs)
|
||||
end select
|
||||
call mld_check_def(p%rprcparm(mld_aggr_damp_),'Omega',szero,is_legal_s_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_omega_val_),'Omega',szero,is_legal_s_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_thresh_),'Aggr_Thresh',szero,is_legal_s_aggr_thrs)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_sweeps_),'Jacobi sweeps',&
|
||||
& 1,is_legal_jac_sweeps)
|
||||
|
||||
@@ -219,11 +219,12 @@ subroutine mld_cprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 1
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.e0/3.e0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = szero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = szero
|
||||
end do
|
||||
ilev_ = nlev_
|
||||
@@ -248,10 +249,11 @@ subroutine mld_cprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_alg_) = mld_dec_aggr_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 4
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.e0/3.e0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = szero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = szero
|
||||
case default
|
||||
write(0,*) name,': Warning: Unknown preconditioner type request "',ptype,'"'
|
||||
|
||||
@@ -145,7 +145,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
|
||||
case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
|
||||
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
|
||||
& mld_smoother_sweeps_,mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
case(mld_coarse_mat_)
|
||||
if (ilev_ /= nlev_ .and. val /= mld_distr_mat_) then
|
||||
@@ -220,8 +220,8 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
end do
|
||||
case(mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_-1
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
|
||||
write(0,*) name,&
|
||||
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
@@ -487,7 +487,7 @@ subroutine mld_cprecsetr(p,what,val,info,ilev)
|
||||
|
||||
else if (ilev_ > 1) then
|
||||
select case(what)
|
||||
case(mld_aggr_damp_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
case(mld_aggr_omega_val_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
p%baseprecv(ilev_)%rprcparm(what) = val
|
||||
case default
|
||||
write(0,*) name,': Error: invalid WHAT'
|
||||
@@ -518,7 +518,7 @@ subroutine mld_cprecsetr(p,what,val,info,ilev)
|
||||
return
|
||||
endif
|
||||
p%baseprecv(ilev_)%rprcparm(mld_sub_iluthrs_) = val
|
||||
case(mld_aggr_damp_)
|
||||
case(mld_aggr_omega_val_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
|
||||
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
! where D is the diagonal matrix with main diagonal equal to the main diagonal
|
||||
! of A, and omega is a suitable smoothing parameter. An estimate of the spectral
|
||||
! radius of D^(-1)A, to be used in the computation of omega, is provided,
|
||||
! according to the value of p%iprcparm(mld_aggr_eig_), specified by the user
|
||||
! according to the value of p%iprcparm(mld_aggr_omega_alg_), specified by the user
|
||||
! through mld_dprecinit and mld_dprecset.
|
||||
!
|
||||
! This routine can also build A_C according to a "bizarre" aggregation algorithm,
|
||||
@@ -261,50 +261,60 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
call psb_sp_scal(am3,adiag,info)
|
||||
if (info /= 0) goto 9999
|
||||
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
if (p%iprcparm(mld_aggr_omega_alg_) == mld_eig_est_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = dzero
|
||||
dg = done
|
||||
do i=1,am3%m
|
||||
tmp = dzero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + dabs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = dabs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = dzero
|
||||
dg = done
|
||||
do i=1,am3%m
|
||||
tmp = dzero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + dabs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = dabs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='this section only CSR')
|
||||
goto 9999
|
||||
endif
|
||||
else
|
||||
info = 4001
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
else
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_omega_val_) = omega
|
||||
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_damp_) = omega
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) == mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) == mld_user_choice_) then
|
||||
|
||||
omega = p%rprcparm(mld_aggr_damp_)
|
||||
omega = p%rprcparm(mld_aggr_omega_val_)
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) /= mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) /= mld_user_choice_) then
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_omega_alg_')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
@@ -100,7 +100,11 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info)
|
||||
& mld_distr_mat_,is_legal_ml_coarse_mat)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_pos_),'smooth_pos',&
|
||||
& mld_pre_smooth_,is_legal_ml_smooth_pos)
|
||||
|
||||
call mld_check_def(p%iprcparm(mld_aggr_omega_alg_),'Omega Alg.',&
|
||||
& mld_eig_est_,is_legal_ml_aggr_omega_alg)
|
||||
call mld_check_def(p%iprcparm(mld_aggr_eig_),'Eigenvalue estimate',&
|
||||
& mld_max_norm_,is_legal_ml_aggr_eig)
|
||||
|
||||
|
||||
select case(p%iprcparm(mld_sub_solve_))
|
||||
case(mld_ilu_n_,mld_milu_n_)
|
||||
@@ -108,7 +112,7 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info)
|
||||
case(mld_ilu_t_)
|
||||
call mld_check_def(p%rprcparm(mld_sub_iluthrs_),'Eps',dzero,is_legal_fact_thrs)
|
||||
end select
|
||||
call mld_check_def(p%rprcparm(mld_aggr_damp_),'Omega',dzero,is_legal_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_omega_val_),'Omega',dzero,is_legal_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_thresh_),'Aggr_Thresh',dzero,is_legal_aggr_thrs)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_sweeps_),'Jacobi sweeps',&
|
||||
& 1,is_legal_jac_sweeps)
|
||||
|
||||
@@ -219,11 +219,12 @@ subroutine mld_dprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 1
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.d0/3.d0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = dzero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = dzero
|
||||
end do
|
||||
ilev_ = nlev_
|
||||
@@ -250,10 +251,11 @@ subroutine mld_dprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_alg_) = mld_dec_aggr_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 4
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.d0/3.d0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = dzero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = dzero
|
||||
|
||||
case default
|
||||
|
||||
@@ -144,7 +144,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
|
||||
case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
|
||||
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
|
||||
& mld_smoother_sweeps_,mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
case(mld_coarse_mat_)
|
||||
if (ilev_ /= nlev_ .and. val /= mld_distr_mat_) then
|
||||
@@ -219,8 +219,8 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
end do
|
||||
case(mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_-1
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
|
||||
write(0,*) name,&
|
||||
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
@@ -483,7 +483,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
|
||||
|
||||
else if (ilev_ > 1) then
|
||||
select case(what)
|
||||
case(mld_aggr_damp_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
case(mld_aggr_omega_val_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
p%baseprecv(ilev_)%rprcparm(what) = val
|
||||
case default
|
||||
write(0,*) name,': Error: invalid WHAT'
|
||||
@@ -514,7 +514,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
|
||||
return
|
||||
endif
|
||||
p%baseprecv(ilev_)%rprcparm(mld_sub_iluthrs_) = val
|
||||
case(mld_aggr_damp_)
|
||||
case(mld_aggr_omega_val_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
|
||||
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
|
||||
+36
-14
@@ -248,7 +248,8 @@ module mld_prec_type
|
||||
integer, parameter :: mld_smoother_pos_ = 11
|
||||
integer, parameter :: mld_aggr_kind_ = 12
|
||||
integer, parameter :: mld_aggr_alg_ = 13
|
||||
integer, parameter :: mld_aggr_eig_ = 14
|
||||
integer, parameter :: mld_aggr_omega_alg_ = 14
|
||||
integer, parameter :: mld_aggr_eig_ = 15
|
||||
integer, parameter :: mld_coarse_mat_ = 16
|
||||
!! 2 ints for 64 bit versions
|
||||
integer, parameter :: mld_slu_ptr_ = 17
|
||||
@@ -301,10 +302,15 @@ module mld_prec_type
|
||||
integer, parameter :: mld_glb_aggr_=2, mld_new_dec_aggr_=3
|
||||
integer, parameter :: mld_new_glb_aggr_=4
|
||||
integer, parameter :: mld_max_aggr_alg_=mld_new_glb_aggr_
|
||||
|
||||
!
|
||||
! Legal values for entry: mld_aggr_eig_
|
||||
! Legal values for entry: mld_aggr_omega_alg_
|
||||
!
|
||||
integer, parameter :: mld_max_norm_=0, mld_user_choice_=999
|
||||
integer, parameter :: mld_eig_est_=0, mld_user_choice_=999
|
||||
!
|
||||
! Legal values for entry: mld_aggr_omega_eig_
|
||||
!
|
||||
integer, parameter :: mld_max_norm_=0
|
||||
!
|
||||
! Legal values for entry: mld_coarse_mat_
|
||||
!
|
||||
@@ -319,10 +325,10 @@ module mld_prec_type
|
||||
! Entries in rprcparm: ILU(k,t) threshold, smoothed aggregation omega
|
||||
!
|
||||
integer, parameter :: mld_sub_iluthrs_ = 1
|
||||
integer, parameter :: mld_aggr_damp_ = 2
|
||||
integer, parameter :: mld_aggr_thresh_ = 3
|
||||
integer, parameter :: mld_aggr_omega_val_ = 2
|
||||
integer, parameter :: mld_aggr_thresh_ = 3
|
||||
integer, parameter :: mld_coarse_iluthrs_ = 4
|
||||
integer, parameter :: mld_rfpsz_ = 8
|
||||
integer, parameter :: mld_rfpsz_ = 8
|
||||
|
||||
!
|
||||
! Fields for sparse matrices ensembles stored in av()
|
||||
@@ -484,6 +490,8 @@ contains
|
||||
val = mld_max_norm_
|
||||
case('USER_CHOICE')
|
||||
val = mld_user_choice_
|
||||
case('EIG_EST')
|
||||
val = mld_eig_est_
|
||||
case default
|
||||
val = -1
|
||||
info = -1
|
||||
@@ -866,7 +874,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
end if
|
||||
end do
|
||||
@@ -890,7 +898,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_coarse_mat_) == mld_distr_mat_ .and. &
|
||||
& p%baseprecv(ilev)%iprcparm(mld_sub_solve_) /= mld_sludist_) then
|
||||
@@ -1076,7 +1084,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
end do
|
||||
|
||||
@@ -1099,7 +1107,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_coarse_mat_) == mld_distr_mat_ .and. &
|
||||
& p%baseprecv(ilev)%iprcparm(mld_sub_solve_) /= mld_sludist_) then
|
||||
@@ -1306,7 +1314,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
end do
|
||||
|
||||
@@ -1329,7 +1337,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_coarse_mat_) == mld_distr_mat_ .and. &
|
||||
& p%baseprecv(ilev)%iprcparm(mld_sub_solve_) /= mld_sludist_) then
|
||||
@@ -1515,7 +1523,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
end do
|
||||
|
||||
@@ -1538,7 +1546,7 @@ contains
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
||||
write(iout_,*) ' Damping omega: ', &
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
||||
& p%baseprecv(ilev)%rprcparm(mld_aggr_omega_val_)
|
||||
end if
|
||||
if (p%baseprecv(ilev)%iprcparm(mld_coarse_mat_) == mld_distr_mat_ .and. &
|
||||
& p%baseprecv(ilev)%iprcparm(mld_sub_solve_) /= mld_sludist_) then
|
||||
@@ -1642,6 +1650,20 @@ contains
|
||||
is_legal_ml_aggr_alg = ((ip>=mld_dec_aggr_).and.(ip<=mld_max_aggr_alg_))
|
||||
return
|
||||
end function is_legal_ml_aggr_alg
|
||||
function is_legal_ml_aggr_omega_alg(ip)
|
||||
integer, intent(in) :: ip
|
||||
logical :: is_legal_ml_aggr_omega_alg
|
||||
|
||||
is_legal_ml_aggr_omega_alg = ((ip==mld_eig_est_).or.(ip==mld_user_choice_))
|
||||
return
|
||||
end function is_legal_ml_aggr_omega_alg
|
||||
function is_legal_ml_aggr_eig(ip)
|
||||
integer, intent(in) :: ip
|
||||
logical :: is_legal_ml_aggr_eig
|
||||
|
||||
is_legal_ml_aggr_eig = (ip==mld_max_norm_)
|
||||
return
|
||||
end function is_legal_ml_aggr_eig
|
||||
function is_legal_ml_smooth_pos(ip)
|
||||
integer, intent(in) :: ip
|
||||
logical :: is_legal_ml_smooth_pos
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
! where D is the diagonal matrix with main diagonal equal to the main diagonal
|
||||
! of A, and omega is a suitable smoothing parameter. An estimate of the spectral
|
||||
! radius of D^(-1)A, to be used in the computation of omega, is provided,
|
||||
! according to the value of p%iprcparm(mld_aggr_eig_), specified by the user
|
||||
! according to the value of p%iprcparm(mld_aggr_omega_alg_), specified by the user
|
||||
! through mld_sprecinit and mld_sprecset.
|
||||
!
|
||||
! This routine can also build A_C according to a "bizarre" aggregation algorithm,
|
||||
@@ -106,7 +106,7 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
include 'mpif.h'
|
||||
#endif
|
||||
|
||||
! Arguments
|
||||
! Arguments
|
||||
type(psb_sspmat_type), intent(in) :: a
|
||||
type(psb_desc_type), intent(in) :: desc_a
|
||||
type(psb_sspmat_type), intent(out) :: ac
|
||||
@@ -114,7 +114,7 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
type(mld_sbaseprc_type), intent(inout), target :: p
|
||||
integer, intent(out) :: info
|
||||
|
||||
! Local variables
|
||||
! Local variables
|
||||
type(psb_sspmat_type) :: b
|
||||
integer, pointer :: nzbr(:), idisp(:)
|
||||
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
|
||||
@@ -261,50 +261,62 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
call psb_sp_scal(am3,adiag,info)
|
||||
if (info /= 0) goto 9999
|
||||
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
if (p%iprcparm(mld_aggr_omega_alg_) == mld_eig_est_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = szero
|
||||
dg = sone
|
||||
do i=1,am3%m
|
||||
tmp = szero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + abs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = abs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = szero
|
||||
dg = sone
|
||||
do i=1,am3%m
|
||||
tmp = szero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + abs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = abs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='this section only CSR')
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
else
|
||||
info = 4001
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
else
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_omega_val_) = omega
|
||||
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_damp_) = omega
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) == mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) == mld_user_choice_) then
|
||||
|
||||
omega = p%rprcparm(mld_aggr_damp_)
|
||||
omega = p%rprcparm(mld_aggr_omega_val_)
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) /= mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) /= mld_user_choice_) then
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_omega_alg_')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
@@ -368,7 +380,7 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
call psb_errpush(4001,name,a_err='Halo of am1')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
call psb_symbmm(a,am1,am3,info)
|
||||
if(info /= 0) then
|
||||
call psb_errpush(4010,name,a_err='symbmm 2')
|
||||
|
||||
@@ -100,7 +100,11 @@ subroutine mld_smlprec_bld(a,desc_a,p,info)
|
||||
& mld_distr_mat_,is_legal_ml_coarse_mat)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_pos_),'smooth_pos',&
|
||||
& mld_pre_smooth_,is_legal_ml_smooth_pos)
|
||||
|
||||
call mld_check_def(p%iprcparm(mld_aggr_omega_alg_),'Omega Alg.',&
|
||||
& mld_eig_est_,is_legal_ml_aggr_omega_alg)
|
||||
call mld_check_def(p%iprcparm(mld_aggr_eig_),'Eigenvalue estimate',&
|
||||
& mld_max_norm_,is_legal_ml_aggr_eig)
|
||||
|
||||
|
||||
select case(p%iprcparm(mld_sub_solve_))
|
||||
case(mld_ilu_n_,mld_milu_n_)
|
||||
@@ -108,7 +112,7 @@ subroutine mld_smlprec_bld(a,desc_a,p,info)
|
||||
case(mld_ilu_t_)
|
||||
call mld_check_def(p%rprcparm(mld_sub_iluthrs_),'Eps',szero,is_legal_s_fact_thrs)
|
||||
end select
|
||||
call mld_check_def(p%rprcparm(mld_aggr_damp_),'Omega',szero,is_legal_s_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_omega_val_),'Omega',szero,is_legal_s_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_thresh_),'Aggr_Thresh',szero,is_legal_s_aggr_thrs)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_sweeps_),'Jacobi sweeps',&
|
||||
& 1,is_legal_jac_sweeps)
|
||||
|
||||
@@ -219,11 +219,12 @@ subroutine mld_sprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 1
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.e0/3.e0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = szero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = szero
|
||||
end do
|
||||
ilev_ = nlev_
|
||||
@@ -248,10 +249,11 @@ subroutine mld_sprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_alg_) = mld_dec_aggr_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 4
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.e0/3.e0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = szero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = szero
|
||||
|
||||
case default
|
||||
|
||||
@@ -145,7 +145,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
|
||||
case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
|
||||
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
|
||||
& mld_smoother_sweeps_,mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
case(mld_coarse_mat_)
|
||||
if (ilev_ /= nlev_ .and. val /= mld_distr_mat_) then
|
||||
@@ -220,8 +220,8 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
end do
|
||||
case(mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_-1
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
|
||||
write(0,*) name,&
|
||||
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
@@ -486,7 +486,7 @@ subroutine mld_sprecsetr(p,what,val,info,ilev)
|
||||
|
||||
else if (ilev_ > 1) then
|
||||
select case(what)
|
||||
case(mld_aggr_damp_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
case(mld_aggr_omega_val_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
p%baseprecv(ilev_)%rprcparm(what) = val
|
||||
case default
|
||||
write(0,*) name,': Error: invalid WHAT'
|
||||
@@ -517,7 +517,7 @@ subroutine mld_sprecsetr(p,what,val,info,ilev)
|
||||
return
|
||||
endif
|
||||
p%baseprecv(ilev_)%rprcparm(mld_sub_iluthrs_) = val
|
||||
case(mld_aggr_damp_)
|
||||
case(mld_aggr_omega_val_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
|
||||
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
! where D is the diagonal matrix with main diagonal equal to the main diagonal
|
||||
! of A, and omega is a suitable smoothing parameter. An estimate of the spectral
|
||||
! radius of D^(-1)A, to be used in the computation of omega, is provided,
|
||||
! according to the value of p%iprcparm(mld_aggr_eig_), specified by the user
|
||||
! according to the value of p%iprcparm(mld_aggr_omega_alg_), specified by the user
|
||||
! through mld_dprecinit and mld_dprecset.
|
||||
!
|
||||
! This routine can also build A_C according to a "bizarre" aggregation algorithm,
|
||||
@@ -261,50 +261,60 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ac,desc_ac,p,info)
|
||||
call psb_sp_scal(am3,adiag,info)
|
||||
if (info /= 0) goto 9999
|
||||
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
if (p%iprcparm(mld_aggr_omega_alg_) == mld_eig_est_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = dzero
|
||||
dg = done
|
||||
do i=1,am3%m
|
||||
tmp = dzero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + abs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = abs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
if (p%iprcparm(mld_aggr_eig_) == mld_max_norm_) then
|
||||
|
||||
if (p%iprcparm(mld_aggr_kind_) == mld_biz_prol_) then
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
!
|
||||
! This only works with CSR.
|
||||
!
|
||||
if (psb_toupper(am3%fida)=='CSR') then
|
||||
anorm = dzero
|
||||
dg = done
|
||||
do i=1,am3%m
|
||||
tmp = dzero
|
||||
do j=am3%ia2(i),am3%ia2(i+1)-1
|
||||
if (am3%ia1(j) <= am3%m) then
|
||||
tmp = tmp + abs(am3%aspk(j))
|
||||
endif
|
||||
if (am3%ia1(j) == i ) then
|
||||
dg = abs(am3%aspk(j))
|
||||
end if
|
||||
end do
|
||||
anorm = max(anorm,tmp/dg)
|
||||
enddo
|
||||
|
||||
call psb_amx(ictxt,anorm)
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='this section only CSR')
|
||||
goto 9999
|
||||
endif
|
||||
else
|
||||
info = 4001
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
else
|
||||
anorm = psb_spnrmi(am3,desc_a,info)
|
||||
endif
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
if (info /= 0) then
|
||||
call psb_errpush(4001,name,a_err='Invalid AM3 storage format')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_omega_val_) = omega
|
||||
|
||||
else
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
goto 9999
|
||||
end if
|
||||
omega = 4.d0/(3.d0*anorm)
|
||||
p%rprcparm(mld_aggr_damp_) = omega
|
||||
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) == mld_user_choice_) then
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) == mld_user_choice_) then
|
||||
omega = p%rprcparm(mld_aggr_omega_val_)
|
||||
|
||||
omega = p%rprcparm(mld_aggr_damp_)
|
||||
|
||||
else if (p%iprcparm(mld_aggr_eig_) /= mld_user_choice_) then
|
||||
else if (p%iprcparm(mld_aggr_omega_alg_) /= mld_user_choice_) then
|
||||
info = 4001
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_eig_')
|
||||
call psb_errpush(info,name,a_err='invalid mld_aggr_omega_alg_')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
@@ -100,7 +100,11 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info)
|
||||
& mld_distr_mat_,is_legal_ml_coarse_mat)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_pos_),'smooth_pos',&
|
||||
& mld_pre_smooth_,is_legal_ml_smooth_pos)
|
||||
|
||||
call mld_check_def(p%iprcparm(mld_aggr_omega_alg_),'Omega Alg.',&
|
||||
& mld_eig_est_,is_legal_ml_aggr_omega_alg)
|
||||
call mld_check_def(p%iprcparm(mld_aggr_eig_),'Eigenvalue estimate',&
|
||||
& mld_max_norm_,is_legal_ml_aggr_eig)
|
||||
|
||||
|
||||
select case(p%iprcparm(mld_sub_solve_))
|
||||
case(mld_ilu_n_,mld_milu_n_)
|
||||
@@ -108,7 +112,7 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info)
|
||||
case(mld_ilu_t_)
|
||||
call mld_check_def(p%rprcparm(mld_sub_iluthrs_),'Eps',dzero,is_legal_fact_thrs)
|
||||
end select
|
||||
call mld_check_def(p%rprcparm(mld_aggr_damp_),'Omega',dzero,is_legal_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_omega_val_),'Omega',dzero,is_legal_omega)
|
||||
call mld_check_def(p%rprcparm(mld_aggr_thresh_),'Aggr_Thresh',dzero,is_legal_aggr_thrs)
|
||||
call mld_check_def(p%iprcparm(mld_smoother_sweeps_),'Jacobi sweeps',&
|
||||
& 1,is_legal_jac_sweeps)
|
||||
|
||||
@@ -219,11 +219,12 @@ subroutine mld_zprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 1
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.d0/3.d0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = dzero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = dzero
|
||||
end do
|
||||
ilev_ = nlev_
|
||||
@@ -250,12 +251,13 @@ subroutine mld_zprecinit(p,ptype,info,nlev)
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_alg_) = mld_dec_aggr_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_kind_) = mld_smooth_prol_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_pos_) = mld_post_smooth_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_omega_alg_) = mld_eig_est_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_aggr_eig_) = mld_max_norm_
|
||||
p%baseprecv(ilev_)%iprcparm(mld_sub_fillin_) = 0
|
||||
p%baseprecv(ilev_)%iprcparm(mld_smoother_sweeps_) = 4
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_damp_) = 4.d0/3.d0
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_omega_val_) = dzero
|
||||
p%baseprecv(ilev_)%rprcparm(mld_aggr_thresh_) = dzero
|
||||
|
||||
|
||||
case default
|
||||
write(0,*) name,': Warning: Unknown preconditioner type request "',ptype,'"'
|
||||
info = 2
|
||||
|
||||
@@ -145,7 +145,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
|
||||
case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
|
||||
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
|
||||
& mld_smoother_sweeps_,mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
case(mld_coarse_mat_)
|
||||
if (ilev_ /= nlev_ .and. val /= mld_distr_mat_) then
|
||||
@@ -220,8 +220,8 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
|
||||
p%baseprecv(ilev_)%iprcparm(what) = val
|
||||
end do
|
||||
case(mld_ml_type_,mld_aggr_alg_,mld_aggr_kind_,&
|
||||
& mld_smoother_pos_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_-1
|
||||
& mld_smoother_pos_,mld_aggr_omega_alg_,mld_aggr_eig_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
|
||||
write(0,*) name,&
|
||||
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
@@ -487,7 +487,7 @@ subroutine mld_zprecsetr(p,what,val,info,ilev)
|
||||
|
||||
else if (ilev_ > 1) then
|
||||
select case(what)
|
||||
case(mld_aggr_damp_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
case(mld_aggr_omega_val_,mld_aggr_thresh_,mld_sub_iluthrs_)
|
||||
p%baseprecv(ilev_)%rprcparm(what) = val
|
||||
case default
|
||||
write(0,*) name,': Error: invalid WHAT'
|
||||
@@ -518,7 +518,7 @@ subroutine mld_zprecsetr(p,what,val,info,ilev)
|
||||
return
|
||||
endif
|
||||
p%baseprecv(ilev_)%rprcparm(mld_sub_iluthrs_) = val
|
||||
case(mld_aggr_damp_)
|
||||
case(mld_aggr_omega_val_)
|
||||
do ilev_=2,nlev_
|
||||
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
|
||||
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
|
||||
|
||||
@@ -68,7 +68,6 @@ program cf_sample
|
||||
integer :: cfill ! Fill-in for factorization 1
|
||||
real(psb_spk_) :: cthres ! Threshold for fact. 1 ILU(T)
|
||||
integer :: cjswp ! Jacobi sweeps
|
||||
real(psb_spk_) :: omega ! smoother omega
|
||||
real(psb_spk_) :: athres ! smoother aggregation threshold
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
@@ -267,9 +266,6 @@ program cf_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)
|
||||
if (prec_choice%omega>=0.0) then
|
||||
call mld_precset(prec,mld_aggr_damp_,prec_choice%omega,info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
@@ -377,8 +373,8 @@ contains
|
||||
integer :: icontxt
|
||||
character(len=*) :: kmethd, mtrx, rhs, afmt,filefmt
|
||||
type(precdata) :: prec
|
||||
real(psb_spk_) :: eps
|
||||
integer :: iret, istopc,itmax,itrace, ipart, irst
|
||||
real(psb_spk_) :: eps, omega,thr1,thr2
|
||||
integer :: iam, nm, np, i
|
||||
|
||||
call psb_info(icontxt,iam,np)
|
||||
@@ -416,7 +412,6 @@ contains
|
||||
call read_data(prec%cfill,5) ! Fill-in for factorization 1
|
||||
call read_data(prec%cthres,5) ! Threshold for fact. 1 ILU(T)
|
||||
call read_data(prec%cjswp,5) ! Jacobi sweeps
|
||||
call read_data(prec%omega,5) ! smoother omega
|
||||
call read_data(prec%athres,5) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
@@ -453,7 +448,6 @@ contains
|
||||
call psb_bcast(icontxt,prec%cfill) ! Fill-in for factorization 1
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. 1 ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%omega) ! smoother omega
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
end if
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ program df_sample
|
||||
integer :: cfill ! fillin for coarse factorization
|
||||
real(psb_dpk_) :: cthres ! threshold for coarse fact. ILU(T)
|
||||
integer :: cjswp ! block-Jacobi sweeps
|
||||
real(psb_dpk_) :: omega ! damping parameter omega
|
||||
real(psb_dpk_) :: athres ! smoothed aggregation threshold
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
@@ -267,9 +266,6 @@ 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)
|
||||
if (prec_choice%omega>=0.0) then
|
||||
call mld_precset(prec,mld_aggr_damp_,prec_choice%omega,info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
@@ -377,8 +373,8 @@ contains
|
||||
integer :: icontxt
|
||||
character(len=*) :: kmethd, mtrx, rhs, afmt,filefmt
|
||||
type(precdata) :: prec
|
||||
real(psb_dpk_) :: eps
|
||||
integer :: iret, istopc,itmax,itrace, ipart, irst
|
||||
real(psb_dpk_) :: eps, omega,thr
|
||||
integer :: iam, nm, np, i
|
||||
|
||||
call psb_info(icontxt,iam,np)
|
||||
@@ -416,7 +412,6 @@ contains
|
||||
call read_data(prec%cfill,5) ! Fill-in for factorization
|
||||
call read_data(prec%cthres,5) ! Threshold for fact. ILU(T)
|
||||
call read_data(prec%cjswp,5) ! Jacobi sweeps
|
||||
call read_data(prec%omega,5) ! smoother omega
|
||||
call read_data(prec%athres,5) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
@@ -453,7 +448,6 @@ contains
|
||||
call psb_bcast(icontxt,prec%cfill) ! Fill-in for factorization
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%omega) ! smoother omega
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
end if
|
||||
|
||||
|
||||
@@ -28,5 +28,4 @@ ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
-1.0d0 ! Damping parameter omega: if < 0 means library choice
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
|
||||
@@ -28,5 +28,4 @@ ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
-1.0d0 ! Damping parameter omega: if < 0 means library choice
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
|
||||
@@ -28,5 +28,4 @@ ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
-1.0d0 ! Damping parameter omega: if < 0 means library choice
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
|
||||
@@ -28,5 +28,4 @@ ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
-1.0d0 ! Damping parameter omega: if < 0 means library choice
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
|
||||
@@ -68,7 +68,6 @@ program sf_sample
|
||||
integer :: cfill ! Fill-in for factorization 1
|
||||
real(psb_spk_) :: cthres ! Threshold for fact. 1 ILU(T)
|
||||
integer :: cjswp ! Jacobi sweeps
|
||||
real(psb_spk_) :: omega ! smoother omega
|
||||
real(psb_spk_) :: athres ! smoother aggregation threshold
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
@@ -267,9 +266,6 @@ program sf_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)
|
||||
if (prec_choice%omega>=0.0) then
|
||||
call mld_precset(prec,mld_aggr_damp_,prec_choice%omega,info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
@@ -377,8 +373,8 @@ contains
|
||||
integer :: icontxt
|
||||
character(len=*) :: kmethd, mtrx, rhs, afmt,filefmt
|
||||
type(precdata) :: prec
|
||||
real(psb_spk_) :: eps
|
||||
integer :: iret, istopc,itmax,itrace, ipart, irst
|
||||
real(psb_spk_) :: eps, omega,thr1,thr2
|
||||
integer :: iam, nm, np, i
|
||||
|
||||
call psb_info(icontxt,iam,np)
|
||||
@@ -416,7 +412,6 @@ contains
|
||||
call read_data(prec%cfill,5) ! Fill-in for factorization 1
|
||||
call read_data(prec%cthres,5) ! Threshold for fact. 1 ILU(T)
|
||||
call read_data(prec%cjswp,5) ! Jacobi sweeps
|
||||
call read_data(prec%omega,5) ! smoother omega
|
||||
call read_data(prec%athres,5) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
@@ -453,7 +448,6 @@ contains
|
||||
call psb_bcast(icontxt,prec%cfill) ! Fill-in for factorization 1
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. 1 ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%omega) ! smoother omega
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
end if
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ program zf_sample
|
||||
integer :: cfill ! Fill-in for factorization 1
|
||||
real(psb_dpk_) :: cthres ! Threshold for fact. 1 ILU(T)
|
||||
integer :: cjswp ! Jacobi sweeps
|
||||
real(psb_dpk_) :: omega ! smoother omega
|
||||
real(psb_dpk_) :: athres ! smoother aggregation threshold
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
@@ -267,9 +266,6 @@ program zf_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)
|
||||
if (prec_choice%omega>=0.0) then
|
||||
call mld_precset(prec,mld_aggr_damp_,prec_choice%omega,info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
@@ -377,8 +373,8 @@ contains
|
||||
integer :: icontxt
|
||||
character(len=*) :: kmethd, mtrx, rhs, afmt,filefmt
|
||||
type(precdata) :: prec
|
||||
real(psb_dpk_) :: eps
|
||||
integer :: iret, istopc,itmax,itrace, ipart, irst
|
||||
real(psb_dpk_) :: eps, omega,thr1,thr2
|
||||
integer :: iam, nm, np, i
|
||||
|
||||
call psb_info(icontxt,iam,np)
|
||||
@@ -416,7 +412,6 @@ contains
|
||||
call read_data(prec%cfill,5) ! Fill-in for factorization 1
|
||||
call read_data(prec%cthres,5) ! Threshold for fact. 1 ILU(T)
|
||||
call read_data(prec%cjswp,5) ! Jacobi sweeps
|
||||
call read_data(prec%omega,5) ! smoother omega
|
||||
call read_data(prec%athres,5) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
@@ -453,7 +448,6 @@ contains
|
||||
call psb_bcast(icontxt,prec%cfill) ! Fill-in for factorization 1
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. 1 ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%omega) ! smoother omega
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
end if
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ program ppde
|
||||
integer :: cfill ! Fill-in for factorization 1
|
||||
real(psb_dpk_) :: cthres ! Threshold for fact. 1 ILU(T)
|
||||
integer :: cjswp ! Jacobi sweeps
|
||||
real(psb_dpk_) :: omega ! smoother omega
|
||||
real(psb_dpk_) :: athres ! smoother aggregation threshold
|
||||
end type precdata
|
||||
type(precdata) :: prectype
|
||||
@@ -192,9 +191,6 @@ program ppde
|
||||
call mld_precset(prec,mld_coarse_fillin_, prectype%cfill, info)
|
||||
call mld_precset(prec,mld_coarse_iluthrs_, prectype%cthres, info)
|
||||
call mld_precset(prec,mld_coarse_sweeps_, prectype%cjswp, info)
|
||||
if (prectype%omega>=0.0) then
|
||||
call mld_precset(prec,mld_aggr_damp_,prectype%omega,info)
|
||||
end if
|
||||
end if
|
||||
|
||||
call psb_barrier(ictxt)
|
||||
@@ -310,7 +306,6 @@ contains
|
||||
call read_data(prectype%cfill,5) ! Fill-in for factorization 1
|
||||
call read_data(prectype%cthres,5) ! Threshold for fact. 1 ILU(T)
|
||||
call read_data(prectype%cjswp,5) ! Jacobi sweeps
|
||||
call read_data(prectype%omega,5) ! smoother omega
|
||||
call read_data(prectype%athres,5) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
@@ -345,7 +340,6 @@ contains
|
||||
call psb_bcast(ictxt,prectype%cfill) ! Fill-in for factorization 1
|
||||
call psb_bcast(ictxt,prectype%cthres) ! Threshold for fact. 1 ILU(T)
|
||||
call psb_bcast(ictxt,prectype%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(ictxt,prectype%omega) ! smoother omega
|
||||
call psb_bcast(ictxt,prectype%athres) ! smoother aggr thresh
|
||||
end if
|
||||
|
||||
|
||||
@@ -25,5 +25,4 @@ ILU ! Coarse level: subsolver ILU UMF SLU SLUDIST
|
||||
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
|
||||
-1.0d0 ! Smoother Omega: if < 0 means library choice.
|
||||
0.10d0 ! Smoother Aggregation Threshold: >= 0.0
|
||||
|
||||
@@ -118,7 +118,6 @@ program spde
|
||||
integer :: cfill ! Fill-in for factorization 1
|
||||
real(psb_spk_) :: cthres ! Threshold for fact. 1 ILU(T)
|
||||
integer :: cjswp ! Jacobi sweeps
|
||||
real(psb_spk_) :: omega ! smoother omega
|
||||
real(psb_spk_) :: athres ! smoother aggregation threshold
|
||||
end type precdata
|
||||
type(precdata) :: prectype
|
||||
@@ -192,9 +191,6 @@ program spde
|
||||
call mld_precset(prec,mld_coarse_fillin_, prectype%cfill, info)
|
||||
call mld_precset(prec,mld_coarse_iluthrs_, prectype%cthres, info)
|
||||
call mld_precset(prec,mld_coarse_sweeps_, prectype%cjswp, info)
|
||||
if (prectype%omega>=0.0) then
|
||||
call mld_precset(prec,mld_aggr_damp_,prectype%omega,info)
|
||||
end if
|
||||
end if
|
||||
|
||||
call psb_barrier(ictxt)
|
||||
@@ -310,7 +306,6 @@ contains
|
||||
call read_data(prectype%cfill,5) ! Fill-in for factorization 1
|
||||
call read_data(prectype%cthres,5) ! Threshold for fact. 1 ILU(T)
|
||||
call read_data(prectype%cjswp,5) ! Jacobi sweeps
|
||||
call read_data(prectype%omega,5) ! smoother omega
|
||||
call read_data(prectype%athres,5) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
@@ -345,7 +340,6 @@ contains
|
||||
call psb_bcast(ictxt,prectype%cfill) ! Fill-in for factorization 1
|
||||
call psb_bcast(ictxt,prectype%cthres) ! Threshold for fact. 1 ILU(T)
|
||||
call psb_bcast(ictxt,prectype%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(ictxt,prectype%omega) ! smoother omega
|
||||
call psb_bcast(ictxt,prectype%athres) ! smoother aggr thresh
|
||||
end if
|
||||
|
||||
|
||||
Reference in New Issue
Block a user