[petsc-users] Transpose of Block Matrix with aij type
Choi240
choi240 at purdue.edu
Tue Apr 23 17:17:07 CDT 2013
Hi,
I have to compute multiplication between two block matrices. It should be as follows:
B1 | B2 A1 B1A1+B2A2
---------- * --- = ---------------
B3 | B4 A2 B3A1+B4A2
However, I just have A = [A1 A2]. So, I need to get A^T. Is there a way I can get the transpose of this block matrix with the MatTranspose()? Or do I have to use another function such as MatGetSubMatrices()?
Thank you,
Joon
-------- Original message --------
Subject: Re: [petsc-users] Transpose of Block Matrix with aij type
From: Karl Rupp <rupp at mcs.anl.gov>
To: petsc-users at mcs.anl.gov
CC: choi240 at purdue.edu
Hi,
why would you expect that the transpose of a 3x8 matrix is not a 8x3-matrix?
Best regards,
Karli
On 04/23/2013 03:27 PM, Joon hee Choi wrote:
> Hello,
>
> I tried to get transpose of block matrix(just with aij type), but the result was not a block matrix. For example,
>
> A =
> 1 2 3 4 | 4 3 2 1
> 2 3 4 5 | 5 4 3 2
> 3 4 5 6 | 6 5 4 3
>
>
> AT(expected) =
> 1 2 3 4
> 2 3 4 5
> 3 4 5 6
> -------
> 4 3 2 1
> 5 4 3 2
> 6 5 4 3
>
>
> AT(result) =
> 1 2 3
> 2 3 4
> 3 4 5
> 4 5 6
> 4 5 6
> 3 4 5
> 2 3 4
> 1 2 3
>
> If someone knows about this problem, please let me know it.
>
> Thank you
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130423/683b4a86/attachment.html>
More information about the petsc-users
mailing list