exact MPI-based matrix using MatGetSubMatrix()

Yujie recrusader at gmail.com
Wed Dec 24 14:10:58 CST 2008


Dear Barry:

thank you for your reply. if the distribution of A11 and B is different, it
will not work if I do B*A11?

Happy holiday:).

Regards,

Yujie

On Wed, Dec 24, 2008 at 11:15 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>  If you want the resulting A11, etc to have the same distribution as B then
> when you construct A you will
> have to construct it with the rows/columns from the 1 block interlaced with
> the 2 block.  This means
> you would form A it would look
> a00 a0,n a0,1 a0,n+1 ...
> an,0 an,n an,1 an,n+1 ..
> a1,0 a1,n ...
> ....
>
>  Barry
>
>
> On Dec 23, 2008, at 7:49 PM, Yujie wrote:
>
>  Hi, PETSc Developer
>>
>> Now, I have two matrices, A and B. A (its dimension is 2N*2N) is MPIDense
>> format. B (N*N) is MPIAIJ.
>>
>> I want to exact four matrices from A, like this
>>
>>     A11 A12
>>
>> A=
>>
>>     A21 A22
>>
>> each submatrices is multplied by B. My question is if A11, A12, A21, A22
>> have same distribution with B, how to do it with MatGetSubMatrix()?
>>
>> Thanks a lot.
>>
>> Regards,
>>
>> Yujie
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20081224/b005e085/attachment.htm>


More information about the petsc-users mailing list