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

Sun, Hui hus003 at ucsd.edu
Tue Feb 24 10:12:54 CST 2015


Thank you Matt.

Hui


________________________________
From: Matthew Knepley [knepley at gmail.com]
Sent: Tuesday, February 24, 2015 2:03 AM
To: Sun, Hui
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] On user defined PC of schur complement

On Tue, Feb 24, 2015 at 12:08 AM, Sun, Hui <hus003 at ucsd.edu<mailto: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/e9b06c3a/attachment-0001.html>


More information about the petsc-users mailing list