00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _Isorropia_Redistributor_hpp_
00033 #define _Isorropia_Redistributor_hpp_
00034
00035 #include <Isorropia_configdefs.hpp>
00036 #include <Teuchos_RefCountPtr.hpp>
00037 #include <Teuchos_ParameterList.hpp>
00038
00039 #ifdef HAVE_EPETRA
00040 class Epetra_Map;
00041 class Epetra_BlockMap;
00042 class Epetra_Import;
00043 class Epetra_Vector;
00044 class Epetra_MultiVector;
00045 class Epetra_CrsGraph;
00046 class Epetra_CrsMatrix;
00047 class Epetra_RowMatrix;
00048 class Epetra_LinearProblem;
00049 class Epetra_SrcDistObject;
00050 class Epetra_DistObject;
00051
00055 namespace Isorropia {
00056 class Partitioner;
00057
00062 class Redistributor {
00063 public:
00068 Redistributor(Teuchos::RefCountPtr<Partitioner> partitioner);
00069
00072 virtual ~Redistributor();
00073
00078 void redistribute(const Epetra_SrcDistObject& src,
00079 Epetra_DistObject& target);
00080
00088 Teuchos::RefCountPtr<Epetra_CrsGraph>
00089 redistribute(const Epetra_CrsGraph& input_graph);
00090
00098 Teuchos::RefCountPtr<Epetra_CrsMatrix>
00099 redistribute(const Epetra_CrsMatrix& input_matrix);
00100
00104 Teuchos::RefCountPtr<Epetra_CrsMatrix>
00105 redistribute(const Epetra_RowMatrix& input_matrix);
00106
00110 Teuchos::RefCountPtr<Epetra_MultiVector>
00111 redistribute(const Epetra_MultiVector& input_vector);
00112
00113 private:
00114 void create_importer(const Epetra_BlockMap& src_map);
00115
00116 Teuchos::RefCountPtr<Partitioner> partitioner_;
00117 Teuchos::RefCountPtr<Epetra_Import> importer_;
00118 Teuchos::RefCountPtr<Epetra_Map> target_map_;
00119
00120 bool created_importer_;
00121
00122 };
00123
00124 }
00125
00126 #endif //HAVE_EPETRA
00127
00128 #endif
00129