[petsc-users] assemble block matrices

Matthew Knepley knepley at gmail.com
Wed Oct 27 18:12:14 CDT 2010


On Wed, Oct 27, 2010 at 6:09 PM, Shao-Ching Huang <huangsc at gmail.com> wrote:

> Hi,
>
> I need to solve M*x=f, where matrix M consists of 4 blocks:
> [ A B;
>  C D ]
>
> I already have old code to build petsc sparse matrices A, B, C and D
> and the RHS vectors f1 and f2
> (such that f=[f1; f2]), each having global indices starting from 0.
>
> My question is: is there already API(s) that I can easily assemble
> matrices A,B,C and D into M? Or do I have to build M from scratch?
>

I think the right thing to do is build M from scratch. Its unlikely that you
actually
want the parallel matrix to be partitioned this way.

   Matt


> Thanks,
>
> Shao-Ching
>



-- 
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/20101027/9e155a63/attachment.htm>


More information about the petsc-users mailing list