47 #ifndef __Teko_BlockingTpetra_hpp__
48 #define __Teko_BlockingTpetra_hpp__
50 #include "Teuchos_RCP.hpp"
53 #include "Tpetra_Map.hpp"
54 #include "Tpetra_CrsMatrix.hpp"
55 #include "Tpetra_Vector.hpp"
56 #include "Tpetra_MultiVector.hpp"
57 #include "Tpetra_Export.hpp"
58 #include "Tpetra_Import.hpp"
60 #include "Teko_ConfigDefs.hpp"
65 namespace TpetraHelpers {
68 typedef std::pair<Teuchos::RCP<Tpetra::Map<LO, GO, NT> >, Teuchos::RCP<Tpetra::Map<LO, GO, NT> > >
70 typedef std::pair<Teuchos::RCP<Tpetra::Import<LO, GO, NT> >,
71 Teuchos::RCP<Tpetra::Export<LO, GO, NT> > >
87 const MapPair buildSubMap(
const std::vector<GO>& gid,
const Teuchos::Comm<int>& comm);
98 const ImExPair buildExportImport(
const Tpetra::Map<LO, GO, NT>& baseMap,
const MapPair& maps);
110 void many2one(Tpetra::MultiVector<ST, LO, GO, NT>& one,
111 const std::vector<Teuchos::RCP<
const Tpetra::MultiVector<ST, LO, GO, NT> > >& many,
112 const std::vector<Teuchos::RCP<Tpetra::Export<LO, GO, NT> > >& subExport);
121 void one2many(std::vector<Teuchos::RCP<Tpetra::MultiVector<ST, LO, GO, NT> > >& many,
122 const Tpetra::MultiVector<ST, LO, GO, NT>& single,
123 const std::vector<Teuchos::RCP<Tpetra::Import<LO, GO, NT> > >& subImport);
132 void buildSubVectors(
const std::vector<MapPair>& maps,
133 std::vector<Teuchos::RCP<Tpetra::MultiVector<ST, LO, GO, NT> > >& vectors,
141 Teuchos::RCP<Tpetra::Vector<GO, LO, GO, NT> > getSubBlockColumnGIDs(
142 const Tpetra::CrsMatrix<ST, LO, GO, NT>& A,
const MapPair& mapPair);
157 Teuchos::RCP<Tpetra::CrsMatrix<ST, LO, GO, NT> > buildSubBlock(
158 int i,
int j,
const Teuchos::RCP<
const Tpetra::CrsMatrix<ST, LO, GO, NT> >& A,
159 const std::vector<MapPair>& subMaps);
174 void rebuildSubBlock(
int i,
int j,
const Teuchos::RCP<
const Tpetra::CrsMatrix<ST, LO, GO, NT> >& A,
175 const std::vector<MapPair>& subMaps, Tpetra::CrsMatrix<ST, LO, GO, NT>& mat);