[Trilinos-Users] CrsMatrix manipulations: get submatrix

whitedwarf whitedwarf at gmx.net
Fri Feb 24 09:24:56 EST 2017


Dear all,

I have a question regarding matrix manipulations. I need to make heavy
use of submatrices of a base matrix, i.e. get a specific part (in both
dimensions) of the full matrix. E.g.: M_{p,...,q},{r,...,s} of
M_{0,...,m},{0,...,n}.
In the documentation, I did not manage to find any direct way to
accomplish this. However, I can think of some workarounds but they all
have obvious drawbacks:
1) Tpetra::CrsMatrix::getColumnMapMultiVector + "Offset view"
constructor of Tpetra::MultiVector
2) Tpetra::CrsMatrix::replaceGlobalValues with zeros
3) Manually assemble a new matrix using data from
CrsMatrix::getLocalMatrix or CrsMatrix::getLocalRowView

Can you please tell me which one is preferable, especially when memory
footprint matters? Is there any more direct way that I did not found?

Best regards,

wd


More information about the Trilinos-Users mailing list