Skip to content

Efficient transpose of SparseMatrix #3331

Answered by pazner
markusrenoldner asked this question in Q&A
Discussion options

You must be logged in to vote

You can use the function Transpose(const SparseMatrix&) which will return a new SparseMatrix* containing the transpose:

mfem/linalg/sparsemat.hpp

Lines 716 to 717 in b09cc38

/// Transpose of a sparse matrix. A must be finalized.
SparseMatrix *Transpose(const SparseMatrix &A);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@markusrenoldner
Comment options

Answer selected by pazner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants