|
|
@ -219,7 +219,7 @@ Furthermore, specifying block-Jacobi as coarsest-level
|
|
|
|
solver implies that the coarsest-level matrix is distributed
|
|
|
|
solver implies that the coarsest-level matrix is distributed
|
|
|
|
among the processes.
|
|
|
|
among the processes.
|
|
|
|
Figure~\ref{fig:ex3} shows how to set a W-cycle preconditioner which
|
|
|
|
Figure~\ref{fig:ex3} shows how to set a W-cycle preconditioner which
|
|
|
|
applies no pre-smoother and 2 Gauss-Seidel sweeps as post-smoother,
|
|
|
|
applies 2 Gauss-Seidel sweeps as pre- and post-smoother,
|
|
|
|
and solves the coarsest-level system with the multifrontal LU factorization
|
|
|
|
and solves the coarsest-level system with the multifrontal LU factorization
|
|
|
|
implemented in MUMPS. It is specified that the coarsest-level
|
|
|
|
implemented in MUMPS. It is specified that the coarsest-level
|
|
|
|
matrix is distributed, since MUMPS can be used on both
|
|
|
|
matrix is distributed, since MUMPS can be used on both
|
|
|
@ -227,14 +227,14 @@ replicated and distributed matrices, and by default
|
|
|
|
it is used on replicated ones. Note the use of the parameter \verb|pos|
|
|
|
|
it is used on replicated ones. Note the use of the parameter \verb|pos|
|
|
|
|
to specify a property only for the pre-smoother or the post-smoother
|
|
|
|
to specify a property only for the pre-smoother or the post-smoother
|
|
|
|
(see Section~\ref{sec:precset} for more details).
|
|
|
|
(see Section~\ref{sec:precset} for more details).
|
|
|
|
Note also that a Krylov method different from CG must be used to solve
|
|
|
|
|
|
|
|
the preconditioned system, since the preconditione in nonsymmetric.
|
|
|
|
|
|
|
|
The code fragments shown in Figures~\ref{fig:ex2} and \ref{fig:ex3} are
|
|
|
|
The code fragments shown in Figures~\ref{fig:ex2} and \ref{fig:ex3} are
|
|
|
|
included in the example program file \verb|mld_dexample_ml.f90| too.
|
|
|
|
included in the example program file \verb|mld_dexample_ml.f90| too.
|
|
|
|
|
|
|
|
|
|
|
|
Finally, Figure~\ref{fig:ex4} shows the setup of a one-level
|
|
|
|
Finally, Figure~\ref{fig:ex4} shows the setup of a one-level
|
|
|
|
additive Schwarz preconditioner, i.e., RAS with overlap 2. The
|
|
|
|
additive Schwarz preconditioner, i.e., RAS with overlap 2.
|
|
|
|
corresponding example program is available in the file
|
|
|
|
Note also that a Krylov method different from CG must be used to solve
|
|
|
|
|
|
|
|
the preconditioned system, since the preconditione in nonsymmetric.
|
|
|
|
|
|
|
|
The corresponding example program is available in the file
|
|
|
|
\verb|mld_dexample_1lev.f90|.
|
|
|
|
\verb|mld_dexample_1lev.f90|.
|
|
|
|
|
|
|
|
|
|
|
|
For all the previous preconditioners, example programs where the sparse matrix and
|
|
|
|
For all the previous preconditioners, example programs where the sparse matrix and
|
|
|
@ -282,20 +282,18 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
|
|
|
|
\begin{verbatim}
|
|
|
|
\begin{verbatim}
|
|
|
|
... ...
|
|
|
|
... ...
|
|
|
|
! build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
|
|
|
|
! build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
|
|
|
|
! post-smoother (and no pre-smoother), a distributed coarsest
|
|
|
|
! pre- and post-smoother, a distributed coarsest
|
|
|
|
! matrix, and MUMPS as coarsest-level solver
|
|
|
|
! matrix, and MUMPS as coarsest-level solver
|
|
|
|
call P%init('ML',info)
|
|
|
|
call P%init('ML',info)
|
|
|
|
call P%set('ML_TYPE','WCYCLE',info)
|
|
|
|
call P%set('ML_TYPE','WCYCLE',info)
|
|
|
|
call P%set('SMOOTHER_TYPE','GS',info)
|
|
|
|
call P%set('SMOOTHER_TYPE','GS',info)
|
|
|
|
call P%set('SMOOTHER_SWEEPS',0,info,pos='PRE')
|
|
|
|
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
|
|
|
|
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
|
|
|
|
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
|
|
|
|
call P%set('COARSE_SOLVE','MUMPS',info)
|
|
|
|
call P%set('COARSE_SOLVE','MUMPS',info)
|
|
|
|
call P%set('COARSE_MAT','DIST',info)
|
|
|
|
call P%set('COARSE_MAT','DIST',info)
|
|
|
|
call P%hierarchy_build(A,desc_A,info)
|
|
|
|
call P%hierarchy_build(A,desc_A,info)
|
|
|
|
call P%smoothers_build(A,desc_A,info)
|
|
|
|
call P%smoothers_build(A,desc_A,info)
|
|
|
|
... ...
|
|
|
|
... ...
|
|
|
|
! solve Ax=b with preconditioned BiCGSTAB
|
|
|
|
|
|
|
|
call psb_krylov('BICGSTAB',A,P,b,x,tol,desc_A,info)
|
|
|
|
|
|
|
|
\end{verbatim}
|
|
|
|
\end{verbatim}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\end{minipage}
|
|
|
|
\end{minipage}
|
|
|
@ -314,6 +312,8 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
|
|
|
|
call P%set('SUB_OVR',2,info)
|
|
|
|
call P%set('SUB_OVR',2,info)
|
|
|
|
call P%bld(A,desc_A,info)
|
|
|
|
call P%bld(A,desc_A,info)
|
|
|
|
... ...
|
|
|
|
... ...
|
|
|
|
|
|
|
|
! solve Ax=b with preconditioned BiCGSTAB
|
|
|
|
|
|
|
|
call psb_krylov('BICGSTAB',A,P,b,x,tol,desc_A,info)
|
|
|
|
\end{verbatim}
|
|
|
|
\end{verbatim}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\end{minipage}
|
|
|
|
\end{minipage}
|
|
|
|