[petsc-users] How to define blocks for PCFIELDSPLIT?

Lucas Clemente Vella lvella at gmail.com
Wed Mar 1 12:59:40 CST 2017


I have a parallel AIJ matrix and I know exactly which element belongs to
each one of the 4 submatrices blocks I want to use to solve the linear
system. The blocks are not strided, because they have different number of
elements.

I understand that I must use PCFieldSplitSetIS(), since
PCFieldSplitSetFields() is only for strided blocks. What I don't understand
is how to create the IS structure I must pass to it.

Each matrix coefficient is identified by a pair (i, j), but on IS creation
functions, like ISCreateGeneral() and ISCreateBlock(), I am supposed to
provide a one dimension set of indices. How does these indices relates to
the matrix coefficients?

Also, ISCreateGeneral() seems to create a single block, and ISCreateBlock()
seems to create multiple blocks of the same size. How to create multiple
blocks with different sizes?

Thanks.

-- 
Lucas Clemente Vella
lvella at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170301/465e8de0/attachment.html>


More information about the petsc-users mailing list