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 #ifndef _Isorropia_EpetraRedistributor_hpp_
00031 #define _Isorropia_EpetraRedistributor_hpp_
00032
00033 #include <Isorropia_Redistributor.hpp>
00034 #include <Isorropia_ConfigDefs.hpp>
00035 #include <Teuchos_RCP.hpp>
00036 #include <Teuchos_ParameterList.hpp>
00037
00038 #ifdef HAVE_EPETRA
00039 class Epetra_Map;
00040 class Epetra_BlockMap;
00041 class Epetra_Import;
00042 class Epetra_Vector;
00043 class Epetra_MultiVector;
00044 class Epetra_CrsGraph;
00045 class Epetra_CrsMatrix;
00046 class Epetra_RowMatrix;
00047 class Epetra_LinearProblem;
00048 class Epetra_SrcDistObject;
00049 class Epetra_DistObject;
00050
00051 namespace Isorropia {
00052
00053 namespace Epetra {
00054 class Partitioner;
00055
00061 class Redistributor : public Isorropia::Redistributor {
00062 public:
00069 Redistributor(Teuchos::RCP<Isorropia::Epetra::Partitioner> partitioner);
00070
00073 virtual ~Redistributor();
00074
00079 void redistribute(const Epetra_SrcDistObject& src,
00080 Epetra_DistObject& target);
00081
00097 Teuchos::RCP<Epetra_CrsGraph>
00098 redistribute(const Epetra_CrsGraph& input_graph, bool callFillComplete= true);
00099
00115 Teuchos::RCP<Epetra_CrsMatrix>
00116 redistribute(const Epetra_CrsMatrix& input_matrix, bool callFillComplete= true);
00117
00133 Teuchos::RCP<Epetra_CrsMatrix>
00134 redistribute(const Epetra_RowMatrix& input_matrix, bool callFillComplete= true);
00135
00145 Teuchos::RCP<Epetra_Vector>
00146 redistribute(const Epetra_Vector& input_vector);
00147
00157 Teuchos::RCP<Epetra_MultiVector>
00158 redistribute(const Epetra_MultiVector& input_vector);
00159
00167 void
00168 redistribute_reverse(const Epetra_Vector& input_vector, Epetra_Vector& output_vector);
00169
00178 void
00179 redistribute_reverse(const Epetra_MultiVector& input_vector, Epetra_MultiVector& output_vector);
00180 private:
00185 void create_importer(const Epetra_BlockMap& src_map);
00186
00187 Teuchos::RCP<Isorropia::Epetra::Partitioner> partitioner_;
00188 Teuchos::RCP<Epetra_Import> importer_;
00189 Teuchos::RCP<Epetra_Map> target_map_;
00190
00191 bool created_importer_;
00192
00193 };
00194
00195 }
00196
00197 }
00198
00199 #endif //HAVE_EPETRA
00200
00201 #endif
00202