47 #ifndef __Teko_BlockingEpetra_hpp__
48 #define __Teko_BlockingEpetra_hpp__
50 #include "Teuchos_RCP.hpp"
53 #include "Epetra_Map.h"
54 #include "Epetra_Comm.h"
55 #include "Epetra_CrsMatrix.h"
56 #include "Epetra_Vector.h"
57 #include "Epetra_MultiVector.h"
58 #include "Epetra_Export.h"
59 #include "Epetra_Import.h"
60 #include "Epetra_IntVector.h"
68 typedef std::pair<Teuchos::RCP<Epetra_Map>,Teuchos::RCP<Epetra_Map> > MapPair;
69 typedef std::pair<Teuchos::RCP<Epetra_Import>,Teuchos::RCP<Epetra_Export> > ImExPair;
84 const MapPair buildSubMap(
const std::vector< int > & gid,
const Epetra_Comm &comm);
95 const ImExPair buildExportImport(
const Epetra_Map & baseMap,
const MapPair & maps);
106 void many2one(Epetra_MultiVector & one,
const std::vector<Teuchos::RCP<const Epetra_MultiVector> > & many,
107 const std::vector<Teuchos::RCP<Epetra_Export> > & subExport);
115 void one2many(std::vector<Teuchos::RCP<Epetra_MultiVector> > & many,
const Epetra_MultiVector & single,
116 const std::vector<Teuchos::RCP<Epetra_Import> > & subImport);
125 void buildSubVectors(
const std::vector<MapPair> & maps,
126 std::vector<Teuchos::RCP<Epetra_MultiVector> > & vectors,
int count);
133 Teuchos::RCP<Epetra_IntVector> getSubBlockColumnGIDs(
const Epetra_CrsMatrix & A,
const MapPair & mapPair);
148 Teuchos::RCP<Epetra_CrsMatrix> buildSubBlock(
int i,
int j,
const Epetra_CrsMatrix & A,
const std::vector<MapPair> & subMaps);
163 void rebuildSubBlock(
int i,
int j,
const Epetra_CrsMatrix & A,
const std::vector<MapPair> & subMaps,Epetra_CrsMatrix & mat);