[petsc-users] PCFIELDSPLIT and Block Matrices
Alfredo J Duarte Gomez
aduarteg at utexas.edu
Fri Aug 6 17:26:07 CDT 2021
Good morning,
I am currently working on a PETSC application that will require a
preconditioner that uses several block matrices.
For now, I have a simple problem that I am solving with a dmda
structured grid with two fields. For presentation purposes (I know petsc
does not use this ordering), lets assume a vector ordering
[u1,u2,...,uN,v1,v2,...vN] where u and v are my two fields with N number of
grid points. The coupling between these two fields is weak enough that an
efficient preconditioner can be formed as the matrix P = [A1, 0;0,A2] where
A1 (dependent on u only) and A2 (dependent on v only) are block matrices of
size NxN. Therefore, I only require two linear solves of the reduced
systems.
I am passing the preconditioner matrix P in the Jacobian function, and I
hope this strategy is what I am telling PETSC to do with the following
block of code:
ierr = KSPGetPC(snes,&pc);CHKERRQ(ierr);CHKERRQ(ierr);
ierr = PCSetType(pc,PCFIELDSPLIT);CHKERRQ(ierr);
ierr =
DMCreateFieldDecomposition(dau,NULL,NULL,&fields,NULL);CHKERRQ(ierr);
ierr = PCFieldSplitSetIS(pc,NULL,fields[0]);CHKERRQ(ierr);
ierr = PCFieldSplitSetIS(pc,NULL,fields[1]);CHKERRQ(ierr);
Is this what is actually happening, or is the split also including some of
the zero blocks on P?
Second, for a future application, I will need a slightly more complicated
strategy. It will require solving a similar matrix to P as specified above
with more fields (Block diagonal for the fields), and then using the answer
to those independent systems for a smaller local solves. In summary, if i
have M fields and N grid points, I will solve M systems of size N then
followed by using solution as the right hand side to solve N systems of
size M.
Is this something that the PCFIELDSPLIT can accomodate? Or will I have to
implement my own PCSHELL?
Thank you,
-Alfredo
--
Alfredo Duarte
Graduate Research Assistant
The University of Texas at Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210806/661450ca/attachment.html>
More information about the petsc-users
mailing list