[petsc-users] why a certain option cannot be used

Jed Brown jed at jedbrown.org
Thu Jul 17 00:16:53 CDT 2014


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

> Dave, and other PETSc users, sorry for bothering you all again. However continuing this topic, I have another question. Within this ex70.c, there is a user defined schur complement StokesSetupApproxSchur, defined as
>
>
> /* Schur complement approximation: myS = A11 - A10 diag(A00)^(-1) A01 */
>
> The preconditioner here can be written out explicitly as a matrix, and
> is not changed between iterations. Each time it is applied to the
> residue is simply matrix times vector. However, if I want to define a
> preconditioner which is allowed to vary between iterations, for
> example, if I need to solve a linear system each time I apply the
> preconditioner to the residue, then is there a way I can do this? Any
> hint will be greatly appreciated. Thank you very much!

You either write your own PCShell or compose a PC from existing
components (perhaps via options).  In any case, the application of this
PC will involve calls to KSPSolve.  You can configure those to be
iterative if that makes sense for your use case.  Note that if you run
an inexact inner solve, the outer solves should use a flexible method
(e.g., FGMRES or GCR).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140716/42f75e92/attachment.pgp>


More information about the petsc-users mailing list