[petsc-users] questions on KSP solver and preconditioning

Jed Brown jed at jedbrown.org
Thu Jun 5 12:36:27 CDT 2014


"Sun, Hui" <hus003 at ucsd.edu> writes:

> Hello, I'm reading ex19.c from examples under directory snes. The version I'm using is 3.3. In the code, a user defined function NonlinearGS is implemented, and is registered thru the command
> ierr = SNESSetGS(snes, NonlinearGS, (void*)&user);CHKERRQ(ierr);
>
> I'm wondering if this only serves as a preconditioner? Because I read
> from the output that the default ksp solver is gmres. I'm also
> wondering what shall I do if I want to make the user defined
> NonlinearGS the actual solver instead of the preconditioner?

NonlinearGS is primarily used as a smoother in nonlinear multigrid
(FAS).  It is not used by the default configuration.

> From the discussion a few days ago, I knew that by specifying option
> -ksp_type gmres or -ksp_type bcgs, you use gmres or bcgs as your
> solvers, where then can I find a database for the ksp solvers?

  ./ex19 -help | grep -A5 ksp_type

this will output a list of available KSPs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140605/f45888da/attachment.pgp>


More information about the petsc-users mailing list