Changes from Pasqua to example files and docs.

stopcriterion
Pasqua D'Ambra 8 years ago
parent 3fc588520f
commit d45c198b48

@ -219,14 +219,15 @@ Furthermore, specifying block-Jacobi as coarsest-level
solver implies that the coarsest-level matrix is distributed
among the processes.
Figure~\ref{fig:ex3} shows how to set a W-cycle preconditioner which
applies 2 Gauss-Seidel sweeps as pre- and post-smoother,
applies 2 hybrid Gauss-Seidel sweeps as pre- and post-smoother,
and solves the coarsest-level system with the multifrontal LU factorization
implemented in MUMPS. It is specified that the coarsest-level
matrix is distributed, since MUMPS can be used on both
replicated and distributed matrices, and by default
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
(see Section~\ref{sec:precset} for more details).
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
%(see Section~\ref{sec:precset} for more details).
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.
@ -281,14 +282,13 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
{\small
\begin{verbatim}
... ...
! build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! build a W-cycle preconditioner with 2 hybrid Gauss-Seidel sweeps
! as pre- and post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
call P%hierarchy_build(A,desc_A,info)

@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@ -231,15 +231,14 @@ program mld_cexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'

@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@ -231,15 +231,14 @@ program mld_dexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'

@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@ -231,15 +231,14 @@ program mld_sexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'

@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@ -231,15 +231,14 @@ program mld_zexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'

@ -1,6 +1,6 @@
mld_mat.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
mld_rhs.mtx ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
MM ! File format: MM (Matrix Market) HB (Harwell-Boeing).
1 ! Preconditioner choice
3 ! Preconditioner choice
0100 ! ITMAX
1.d-6 ! EPS

@ -53,8 +53,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The PDE is a general second order equation in 3d
@ -248,15 +248,14 @@ program mld_dexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'

@ -53,8 +53,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The PDE is a general second order equation in 3d
@ -248,15 +248,14 @@ program mld_sexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'

@ -1,3 +1,3 @@
15 ! IDIM; domain size is idim**3
10 ! ITMAX
100 ! ITMAX
1.d-6 ! EPS

@ -1,4 +1,4 @@
2 ! Preconditioner choice
3 ! Preconditioner choice
10 ! IDIM; domain size is idim**3
500 ! ITMAX
1.d-6 ! EPS

Loading…
Cancel
Save