[petsc-users] How to use jacobi or Gauss-seilder iteration to solve problem

Barry Smith bsmith at mcs.anl.gov
Thu Aug 15 20:43:53 CDT 2013


On Aug 15, 2013, at 8:40 PM, Karl Rupp <rupp at mcs.anl.gov> wrote:

> Hi,
> 
> > >   KSPSetType(ksp,?);
> 
> Jacobi and Gauss-Seidel are available as preconditioners. To use them as standalone solvers, make the linear solver run the preconditioner only via KSPPREONLY from here:
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPType.html
> and then set the preconditioner (e.g. PCJACOBI) via PCSetType():
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCType.html

  This won't work for jacobi (it will only do one iteration) and will only work for sor if you use PCSetSORIterations() instead of -ksp_max_its

   Barry

> 
> 
> Best regards,
> Karli



More information about the petsc-users mailing list