[petsc-users] On user defined PC of schur complement

Matthew Knepley knepley at gmail.com
Tue Feb 24 04:03:18 CST 2015


On Tue, Feb 24, 2015 at 12:08 AM, Sun, Hui <hus003 at ucsd.edu> wrote:

>  I have a block matrix [A, B; C, D], and I want to use Schur complement
> to solve the linear system  [A, B; C, D] * [x; y] = [c; d].
>
>  I want to apply a preconditioner for solving ( D - C*A^(-1)*B ) y = rhs.
> And it is easy for me to find an A' which is approximate to A, and A'^(-1)
> is easy to get. So for this part, I can easily define a preconditioner
> matrix   P = ( D - C*A'^(-1)*B ) using PCFieldSplitSchurPrecondition. The
> next step is that I want to do incomplete LU factorization for P as my
> left and right preconditioner for solving ( D - C*A^(-1)*B ) y = rhs
> using gmres or bcgs.
>
>  My question is since part of the PC is user defined, and part of it is
> PETSC defined, how can I combine them? Can I do something like:
>
>   ierr = PCFieldSplitSchurPrecondition(pc, PC_FIELDSPLIT_SCHUR_PRE_USER,
> P);CHKERRQ(ierr);
>
Once you specify the preconditioner matrix, you can use a factorization
preconditioner:

  -fieldsplit_1_pc_type ilu

    Matt

> ierr = PCSetType(pc, PCILU);CHKERRQ(ierr);
>
>
>  Hui
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150224/c260128e/attachment.html>


More information about the petsc-users mailing list