<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>Hi,<div><br></div><div>I have to compute multiplication between two block matrices. It should be as follows:</div><div><br></div><div>B1 | B2 A1 B1A1+B2A2</div><div>---------- * --- = ---------------</div><div>B3 | B4 A2 B3A1+B4A2</div><div><br></div><div>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()?</div><div><br></div><div>Thank you,</div><div>Joon</div><br><br><br>-------- Original message --------<br>Subject: Re: [petsc-users] Transpose of Block Matrix with aij type <br>From: Karl Rupp <rupp@mcs.anl.gov> <br>To: petsc-users@mcs.anl.gov <br>CC: choi240@purdue.edu <br><br><br><div style="word-break:break-all;">Hi,<br><br>why would you expect that the transpose of a 3x8 matrix is not a 8x3-matrix?<br><br>Best regards,<br>Karli<br><br><br>On 04/23/2013 03:27 PM, Joon hee Choi wrote:<br>> Hello,<br>><br>> I tried to get transpose of block matrix(just with aij type), but the result was not a block matrix. For example,<br>><br>> A =<br>> 1 2 3 4 | 4 3 2 1<br>> 2 3 4 5 | 5 4 3 2<br>> 3 4 5 6 | 6 5 4 3<br>><br>><br>> AT(expected) =<br>> 1 2 3 4<br>> 2 3 4 5<br>> 3 4 5 6<br>> -------<br>> 4 3 2 1<br>> 5 4 3 2<br>> 6 5 4 3<br>><br>><br>> AT(result) =<br>> 1 2 3<br>> 2 3 4<br>> 3 4 5<br>> 4 5 6<br>> 4 5 6<br>> 3 4 5<br>> 2 3 4<br>> 1 2 3<br>><br>> If someone knows about this problem, please let me know it.<br>><br>> Thank you<br>><br><br></div> </body>