block matrices

Manav Bhatia bhatiamanav at gmail.com
Sun Sep 21 11:11:29 CDT 2008


Hi,

   I have an application in which I have multiple sparse matrices,  
which together form one bigger matrix. For example: if S1, S2, S3, S4  
and S5 are my sparse matrices, I need to create a matrix B of the  
following form

B = 3 x 3 blocks

row 1 of B = 0, S1, 0
row 2 of B = S2, 0 , S3
row 3 of B = S4, S5, 0

If I build the S1... S5 independently, is there a way for me to  
directly embed these matrices into B without having to explicitly copy  
the values from each matrix?
I would appreciate any help. Please also, let me know if there is an  
example code somewhere about this.

Regards,
Manav






More information about the petsc-users mailing list