@ -3,8 +3,8 @@
< html >
< head > < title > Examples< / title >
< meta http-equiv = "Content-Type" content = "text/html; charset=iso-8859-1" >
< meta name = "generator" content = "TeX4ht (http ://www. tug.org/tex4ht/)">
< meta name = "originator" content = "TeX4ht (http ://www. tug.org/tex4ht/)">
< meta name = "generator" content = "TeX4ht (http s ://tug.org/tex4ht/)">
< meta name = "originator" content = "TeX4ht (http s ://tug.org/tex4ht/)">
<!-- html,3 -->
< meta name = "src" content = "userhtml.tex" >
< link rel = "stylesheet" type = "text/css" href = "userhtml.css" >
@ -128,59 +128,58 @@ class="cmr-12">.</span>
< div class = "minipage" > < div class = "verbatim" id = "verbatim-6" >
< div class = "minipage" > < pre class = "verbatim" id = "verbatim-6" >
    use  psb_base_mod
  < br / >     use  amg_prec_mod
  < br / >     use  psb_krylov_mod
  < br / > ...  ...
  < br / > !
  < br / > !  sparse  matrix
  < br / >     type(psb_dspmat_type)  ::  A
  < br / > !  sparse  matrix  descriptor
  < br / >     type(psb_desc_type)      ::  desc_A
  < br / > !  preconditioner
  < br / >     type(amg_dprec_type)    ::  P
  < br / > !  right-hand  side  and  solution  vectors
  < br / >     type(psb_d_vect_type)  ::  b,  x
  < br / > ...  ...
  < br / > !
  < br / > !  initialize  the  parallel  environment
  < br / >     call  psb_init(ctxt)
  < br / >     call  psb_info(ctxt,iam,np)
  < br / > ...  ...
  < br / > !
  < br / > !  read  and  assemble  the  spd  matrix  A  and  the  right-hand  side  b
  < br / > !  using  PSBLAS  routines  for  sparse  matrix  /  vector  management
  < br / > ...  ...
  < br / > !
  < br / > !  initialize  the  default  multilevel  preconditioner,  i.e.  V-cycle
  < br / > !  with  basic  smoothed  aggregation,  1  hybrid  forward/backward
  < br / > !  GS  sweep  as  pre/post-smoother  and  UMFPACK  as  coarsest-level
  < br / > !  solver
  < br / >     call  P%init(’ ML’ ,info)
  < br / > !
  < br / > !  build  the  preconditioner
  < br / >     call  P%hierarchy_build(A,desc_A,info)
  < br / >     call  P%smoothers_build(A,desc_A,info)
  < br / >
  < br / > !
  < br / > !  set  the  solver  parameters  and  the  initial  guess
  < br / >     ...  ...
  < br / > !
  < br / > !  solve  Ax=b  with  preconditioned  CG
  < br / >     call  psb_krylov(’ CG’ ,A,P,b,x,tol,desc_A,info)
  < br / >     ...  ...
  < br / > !
  < br / > !  deallocate  the  preconditioner
  < br / >     call  P%free(info)
  < br / > !
  < br / > !  deallocate  other  data  structures
  < br / >     ...  ...
  < br / > !
  < br / > !  exit  the  parallel  environment
  < br / >     call  psb_exit(ctxt)
  < br / >     stop
< / div >
    use  amg_prec_mod
    use  psb_krylov_mod
...  ...
!
!  sparse  matrix
    type(psb_dspmat_type)  ::  A
!  sparse  matrix  descriptor
    type(psb_desc_type)      ::  desc_A
!  preconditioner
    type(amg_dprec_type)    ::  P
!  right-hand  side  and  solution  vectors
    type(psb_d_vect_type)  ::  b,  x
...  ...
!
!  initialize  the  parallel  environment
    call  psb_init(ctxt)
    call  psb_info(ctxt,iam,np)
...  ...
!
!  read  and  assemble  the  spd  matrix  A  and  the  right-hand  side  b
!  using  PSBLAS  routines  for  sparse  matrix  /  vector  management
...  ...
!
!  initialize  the  default  multilevel  preconditioner,  i.e.  V-cycle
!  with  basic  smoothed  aggregation,  1  hybrid  forward/backward
!  GS  sweep  as  pre/post-smoother  and  UMFPACK  as  coarsest-level
!  solver
    call  P%init(’ ML’ ,info)
!
!  build  the  preconditioner
    call  P%hierarchy_build(A,desc_A,info)
    call  P%smoothers_build(A,desc_A,info)
!
!  set  the  solver  parameters  and  the  initial  guess
    ...  ...
!
!  solve  Ax=b  with  preconditioned  CG
    call  psb_krylov(’ CG’ ,A,P,b,x,tol,desc_A,info)
    ...  ...
!
!  deallocate  the  preconditioner
    call  P%free(info)
!
!  deallocate  other  data  structures
    ...  ...
!
!  exit  the  parallel  environment
    call  psb_exit(ctxt)
    stop
< / pre >
<!-- l. 255 --> < p class = "nopar" >
@ -289,19 +288,19 @@ class="cmr-12">.</span>
< div class = "center"
>
<!-- l. 318 --> < p class = "noindent" >
< div class = "minipage" > < div class = "verbatim" id = "verbatim-7" >
< div class = "minipage" > < pre class = "verbatim" id = "verbatim-7" >
...  ...
  < br / > !  build  a  V-cycle  preconditioner  with  1  block-Jacobi  sweep  (with
  < br / > !  ILU(0)  on  the  blocks)  as  pre-  and  post-smoother,  and  8    block-Jacobi
  < br / > !  sweeps  (with  ILU(0)  on  the  blocks)  as  coarsest-level  solver
  < br / >     call  P%init(’ ML’ ,info)
  < br / >     call  P%set(’ SMOOTHER_TYPE’ ,’ BJAC’ ,info)
  < br / >     call  P%set(’ COARSE_SOLVE’ ,’ BJAC’ ,info)
  < br / >     call  P%set(’ COARSE_SWEEPS’ ,8,info)
  < br / >     call  P%hierarchy_build(A,desc_A,info)
  < br / >     call  P%smoothers_build(A,desc_A,info)
  < br / > ...  ...
< / div >
!  build  a  V-cycle  preconditioner  with  1  block-Jacobi  sweep  (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
    call  P%init(’ ML’ ,info)
    call  P%set(’ SMOOTHER_TYPE’ ,’ BJAC’ ,info)
    call  P%set(’ COARSE_SOLVE’ ,’ BJAC’ ,info)
    call  P%set(’ COARSE_SWEEPS’ ,8,info)
    call  P%hierarchy_build(A,desc_A,info)
    call  P%smoothers_build(A,desc_A,info)
...  ...
< / pre >
<!-- l. 333 --> < p class = "nopar" > < / div > < / div >
< br / > < div class = "caption"
>< span class = "id" > Listing 2: < / span > < span
@ -322,23 +321,23 @@ class="content">setup of a multilevel preconditioner based on the default decoup
< div class = "center"
>
<!-- l. 360 --> < p class = "noindent" >
< div class = "minipage" > < div class = "verbatim" id = "verbatim-8" >
< div class = "minipage" > < pre class = "verbatim" id = "verbatim-8" >
...  ...
  < br / > !  build  a  W-cycle  preconditioner  with  2  hybrid  Gauss-Seidel  sweeps
  < br / > !  as  pre-  and  post-smoother,  a  distributed  coarsest
  < br / > !  matrix,  and  MUMPS  as  coarsest-level  solver
  < br / >     call  P%init(’ ML’ ,info)
  < br / >     call  P%set(’ PAR_AGGR_ALG’ ,’ COUPLED’ ,info)
  < br / > call  P%set(’ AGGR_TYPE’ ,’ MATCHBOXP’ ,info)
  < br / > call  P%set(’ AGGR_SIZE’ ,8,info)
  < br / >     call  P%set(’ ML_CYCLE’ ,’ WCYCLE’ ,info)
  < br / >     call  P%set(’ SMOOTHER_TYPE’ ,’ FBGS’ ,info)
  < br / >     call  P%set(’ SMOOTHER_SWEEPS’ ,2,info)
  < br / >     call  P%set(’ COARSE_SOLVE’ ,’ KRM’ ,info)
  < br / >     call  P%hierarchy_build(A,desc_A,info)
  < br / >     call  P%smoothers_build(A,desc_A,info)
  < br / > ...  ...
< / div >
!  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(’ PAR_AGGR_ALG’ ,’ COUPLED’ ,info)
call  P%set(’ AGGR_TYPE’ ,’ MATCHBOXP’ ,info)
call  P%set(’ AGGR_SIZE’ ,8,info)
    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’ ,’ KRM’ ,info)
    call  P%hierarchy_build(A,desc_A,info)
    call  P%smoothers_build(A,desc_A,info)
...  ...
< / pre >
<!-- l. 379 --> < p class = "nopar" > < / div > < / div >
< br / > < div class = "caption"
>< span class = "id" > Listing 3: < / span > < span
@ -360,16 +359,16 @@ weighted matching</span></div><!--tex4ht:label?: x15-14003r3 -->
< div class = "center"
>
<!-- l. 398 --> < p class = "noindent" >
< div class = "minipage" > < div class = "verbatim" id = "verbatim-9" >
< div class = "minipage" > < pre class = "verbatim" id = "verbatim-9" >
...  ...
  < br / > !  set  RAS  with  overlap  2  and  ILU(0)  on  the  local  blocks
  < br / >     call  P%init(’ AS’ ,info)
  < br / >     call  P%set(’ SUB_OVR’ ,2,info)
  < br / >     call  P%bld(A,desc_A,info)
  < br / > ...  ...
  < br / > !  solve  Ax=b  with  preconditioned  BiCGSTAB
  < br / >     call  psb_krylov(’ BICGSTAB’ ,A,P,b,x,tol,desc_A,info)
< / div >
!  set  RAS  with  overlap  2  and  ILU(0)  on  the  local  blocks
    call  P%init(’ AS’ ,info)
    call  P%set(’ SUB_OVR’ ,2,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)
< / pre >
<!-- l. 410 --> < p class = "nopar" > < / div > < / div >
< br / > < div class = "caption"
>< span class = "id" > Listing 4: < / span > < span