<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><tt>Hi all,</tt><tt><br>
</tt></p>
<p><tt>I have a rectangle MPIAIJ matrix C. I would like to compute
C*Ct explicitly to solve some ksp(C*Ct) problems using direct
solvers or with petsc preconditioners.</tt></p>
<p><tt>If I just create a 'shell' Ct:</tt><tt><br>
</tt></p>
<p><tt>Mat Ct;</tt><tt><br>
</tt><tt>MatCreateTranspose(C, &Ct);</tt><tt><br>
</tt><tt>MatMatMult(C, Ct, MAT_INITIAL_MATRIX, PETSC_DEFAULT,
&CCt);</tt><tt><br>
</tt></p>
<p><tt>Then it does not work. I get: </tt><tt><br>
</tt></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><tt><span
style=" color:#000000;">[0]PETSC ERROR: No support for this
operation for this object type</span></tt></p>
<tt>
</tt>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><tt><span
style=" color:#000000;">[0]PETSC ERROR: MatMatTransposeMult
not supported for A of type mpiaij</span></tt></p>
<p>
<style type="text/css"><tt>
p, li { white-space: pre-wrap; }</tt></style><tt>But if instead of C it
was Ct that I have explicitly, then it would work:</tt></p>
<p><tt>Mat Ct, CC;</tt><tt><br>
</tt><tt>MatTranspose(C, MAT_INITIAL_MATRIX, &Ct);</tt><tt><br>
</tt><tt>MatCreateTranspose(Ct, &CC); // create a 'shell' C
from explicit Ct to test</tt><tt><br>
</tt><tt>MatMatMult(CC, Ct, MAT_INITIAL_MATRIX, PETSC_DEFAULT,
&CCt);</tt><tt> // this is OK</tt></p>
<p><tt>Is there a way to avoid the explicit transposition of the
matrix?</tt></p>
<p><tt>Many thanks,</tt><tt><br>
</tt><tt>Olivier Jamond</tt><br>
</p>
<p><br>
</p>
</body>
</html>