[Trilinos-Users] EpetraExt::CrsGraph_Transpose
Heroux, Mike
MHeroux at CSBSJU.EDU
Tue May 20 10:07:11 MDT 2014
Luca,
There is a more general version of this functionality in Epetra, in the class Trilinos/packages/epetra/src/Epetra_RowMatrixTransposer.[h,cpp]. Although the Epetra version also transposes values, it is easily modified to work only with the graph, if that is what you really need.
This version also accepts a general Epetra_RowMatrix object, but specializes for the case where original matrix is itself an Epetra_CrsMatrix (making it more efficient). It also has a values update mode that is very handy.
If you need the graph version and have trouble making the conversion, let me know.
Mike
From: <Bertagna>, Luca <lbertag at emory.edu<mailto:lbertag at emory.edu>>
Date: Monday, May 19, 2014 2:55 PM
To: "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject: [Trilinos-Users] EpetraExt::CrsGraph_Transpose
Dear all,
I was trying to use the class CrsGraph_Transpose in EpetraExt to get the graph of the transpose of a NON-SQUARE matrix and I noticed that it would not work. In particular, it looks like the class assumes that the matrix is square. I was wondering if that's a design choice or just something that happened but not intended. In particular, I think the class would still work the same if you replace the occurrences of RowMap (which is the row map of the given graph) at lines 103-104 and 133 (only the first occurrence of RowMap) in file EpetraExt_Transpose_CrsGraph.cpp with graph.DomainMap().
Am I correct? If not, can you explain why this would not work for non-square matrices?
Thanks
Luca Bertagna
Math&CS, Emory University, Atlanta
www.mathcs.emory.edu/~lbertag
More information about the Trilinos-Users
mailing list