10 #ifndef __Teko_BlockingTpetra_hpp__
11 #define __Teko_BlockingTpetra_hpp__
13 #include "Teuchos_RCP.hpp"
16 #include "Tpetra_Map.hpp"
17 #include "Tpetra_CrsMatrix.hpp"
18 #include "Tpetra_Vector.hpp"
19 #include "Tpetra_MultiVector.hpp"
20 #include "Tpetra_Export.hpp"
21 #include "Tpetra_Import.hpp"
23 #include "Teko_ConfigDefs.hpp"
28 namespace TpetraHelpers {
31 typedef std::pair<Teuchos::RCP<Tpetra::Map<LO, GO, NT> >, Teuchos::RCP<Tpetra::Map<LO, GO, NT> > >
33 typedef std::pair<Teuchos::RCP<Tpetra::Import<LO, GO, NT> >,
34 Teuchos::RCP<Tpetra::Export<LO, GO, NT> > >
50 const MapPair buildSubMap(
const std::vector<GO>& gid,
const Teuchos::Comm<int>& comm);
61 const ImExPair buildExportImport(
const Tpetra::Map<LO, GO, NT>& baseMap,
const MapPair& maps);
73 void many2one(Tpetra::MultiVector<ST, LO, GO, NT>& one,
74 const std::vector<Teuchos::RCP<
const Tpetra::MultiVector<ST, LO, GO, NT> > >& many,
75 const std::vector<Teuchos::RCP<Tpetra::Export<LO, GO, NT> > >& subExport);
84 void one2many(std::vector<Teuchos::RCP<Tpetra::MultiVector<ST, LO, GO, NT> > >& many,
85 const Tpetra::MultiVector<ST, LO, GO, NT>& single,
86 const std::vector<Teuchos::RCP<Tpetra::Import<LO, GO, NT> > >& subImport);
95 void buildSubVectors(
const std::vector<MapPair>& maps,
96 std::vector<Teuchos::RCP<Tpetra::MultiVector<ST, LO, GO, NT> > >& vectors,
104 Teuchos::RCP<Tpetra::Vector<GO, LO, GO, NT> > getSubBlockColumnGIDs(
105 const Tpetra::CrsMatrix<ST, LO, GO, NT>& A,
const MapPair& mapPair);
120 Teuchos::RCP<Tpetra::CrsMatrix<ST, LO, GO, NT> > buildSubBlock(
121 int i,
int j,
const Teuchos::RCP<
const Tpetra::CrsMatrix<ST, LO, GO, NT> >& A,
122 const std::vector<MapPair>& subMaps);
137 void rebuildSubBlock(
int i,
int j,
const Teuchos::RCP<
const Tpetra::CrsMatrix<ST, LO, GO, NT> >& A,
138 const std::vector<MapPair>& subMaps, Tpetra::CrsMatrix<ST, LO, GO, NT>& mat);