How to transpose a distributed PETScWrappers::MPI::SparseMatrix

24 views
Skip to first unread message

Laryssa Abdala

unread,
Jul 21, 2023, 7:07:22 PM7/21/23
to dea...@googlegroups.com
Hello everyone, 

It seems like PETScWrappers::MatrixBase::transpose()  only works in serial. Is there a way to transpose a distributed PETScWrappers::MPI::SparseMatrix in place? It seems like the way to do this is to:
Mat temp;
MatTranspose( petsc_wrapper_matrix,  MAT_INITIAL_MATRIX, &temp);
 
From there, is there a way to copy a Mat into a PETScWrappers::MPI::SparseMatrix? Please let me know if I am missing something or if you have other suggestions.

Thank you, 
Laryssa

Laryssa Abdala

unread,
Jul 22, 2023, 1:54:47 PM7/22/23
to deal.II User Group
Never mind, I have been using version 9.4.2. There are a couple of extra features implemented in the newest versions that will help me, e.g., there is a PETScWrappers::MatrixBase constructor that takes a Mat as input
(https://github.com/dealii/dealii/commit/97911ba3839d7a06c3fb0cd06f7574ea0849103b). Thanks to the developers :)

Wolfgang Bangerth

unread,
Jul 22, 2023, 2:10:04 PM7/22/23
to dea...@googlegroups.com, Stefano Zampini
On 7/22/23 11:54, Laryssa Abdala wrote:
> **
>
> Never mind, I have been using version 9.4.2. There are a couple of extra
> features implemented in the newest versions that will help me, e.g., there is
> a PETScWrappers::MatrixBase constructor that takes a Mat as input
> (https://github.com/dealii/dealii/commit/97911ba3839d7a06c3fb0cd06f7574ea0849103b). Thanks to the developers :)

Yes, I'm glad you found those. Stefano Zampini gets the credit for
implementing these!

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages