[petsc-users] Compute C*Ct using MatCreateTranspose for Ct
Olivier Jamond
olivier.jamond at cea.fr
Wed Sep 23 11:56:27 CDT 2020
Hi all,
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.
If I just create a 'shell' Ct:
Mat Ct;
MatCreateTranspose(C, &Ct);
MatMatMult(C, Ct, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &CCt);
Then it does not work. I get:
[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: MatMatTransposeMult not supported for A of type mpiaij
But if instead of C it was Ct that I have explicitly, then it would work:
Mat Ct, CC;
MatTranspose(C, MAT_INITIAL_MATRIX, &Ct);
MatCreateTranspose(Ct, &CC); // create a 'shell' C from explicit Ct to test
MatMatMult(CC, Ct, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &CCt);// this is OK
Is there a way to avoid the explicit transposition of the matrix?
Many thanks,
Olivier Jamond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200923/1743aa2e/attachment.html>
More information about the petsc-users
mailing list