10 #ifndef __Teko_BlockingEpetra_hpp__
11 #define __Teko_BlockingEpetra_hpp__
13 #include "Teuchos_RCP.hpp"
16 #include "Epetra_Map.h"
17 #include "Epetra_Comm.h"
18 #include "Epetra_CrsMatrix.h"
19 #include "Epetra_Vector.h"
20 #include "Epetra_MultiVector.h"
21 #include "Epetra_Export.h"
22 #include "Epetra_Import.h"
23 #include "Epetra_IntVector.h"
31 typedef std::pair<Teuchos::RCP<Epetra_Map>, Teuchos::RCP<Epetra_Map> > MapPair;
32 typedef std::pair<Teuchos::RCP<Epetra_Import>, Teuchos::RCP<Epetra_Export> > ImExPair;
47 const MapPair buildSubMap(
const std::vector<int> &gid,
const Epetra_Comm &comm);
58 const ImExPair buildExportImport(
const Epetra_Map &baseMap,
const MapPair &maps);
70 void many2one(Epetra_MultiVector &one,
71 const std::vector<Teuchos::RCP<const Epetra_MultiVector> > &many,
72 const std::vector<Teuchos::RCP<Epetra_Export> > &subExport);
81 void one2many(std::vector<Teuchos::RCP<Epetra_MultiVector> > &many,
82 const Epetra_MultiVector &single,
83 const std::vector<Teuchos::RCP<Epetra_Import> > &subImport);
92 void buildSubVectors(
const std::vector<MapPair> &maps,
93 std::vector<Teuchos::RCP<Epetra_MultiVector> > &vectors,
int count);
100 Teuchos::RCP<Epetra_IntVector> getSubBlockColumnGIDs(
const Epetra_CrsMatrix &A,
101 const MapPair &mapPair);
116 Teuchos::RCP<Epetra_CrsMatrix> buildSubBlock(
int i,
int j,
const Epetra_CrsMatrix &A,
117 const std::vector<MapPair> &subMaps);
132 void rebuildSubBlock(
int i,
int j,
const Epetra_CrsMatrix &A,
const std::vector<MapPair> &subMaps,
133 Epetra_CrsMatrix &mat);