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_EpetraLibrary_hpp_
00031 #define _Isorropia_EpetraLibrary_hpp_
00032
00033 #include <Isorropia_ConfigDefs.hpp>
00034 #include <Teuchos_RCP.hpp>
00035 #include <Teuchos_ParameterList.hpp>
00036
00037 #include <Isorropia_EpetraCostDescriber.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
00050 namespace Isorropia {
00051
00052 namespace Epetra {
00053 class CostDescriber;
00054
00060 class Library {
00061 public:
00062
00063 Library(Teuchos::RCP<const Epetra_CrsGraph> input_graph);
00064 Library(Teuchos::RCP<const Epetra_CrsGraph> input_graph,
00065 Teuchos::RCP<CostDescriber> costs);
00066 Library(Teuchos::RCP<const Epetra_RowMatrix> input_matrix);
00067 Library(Teuchos::RCP<const Epetra_RowMatrix> input_matrix,
00068 Teuchos::RCP<CostDescriber> costs);
00069
00070 virtual ~Library();
00071
00072 void setInput(Teuchos::RCP<const Epetra_CrsGraph> input_graph);
00073 void setInput(Teuchos::RCP<const Epetra_CrsGraph> input_graph,
00074 Teuchos::RCP<CostDescriber> costs);
00075 void setInput(Teuchos::RCP<const Epetra_RowMatrix> input_matrix);
00076 void setInput(Teuchos::RCP<const Epetra_RowMatrix> input_matrix,
00077 Teuchos::RCP<CostDescriber> costs);
00078
00079 virtual int
00080 repartition(Teuchos::ParameterList& paramlist,
00081 std::vector<int>& myNewElements,
00082 int& exportsSize,
00083 std::vector<int>& imports) = 0;
00084
00085
00086
00087 virtual int
00088 color(Teuchos::ParameterList& paramlist,
00089 std::vector<int>& myNewElements) = 0 ;
00090
00091 virtual int
00092 order(Teuchos::ParameterList& paramlist,
00093 std::vector<int>& myNewElements) = 0 ;
00094
00095 void setInputType(std::string inputType) {
00096 inputType_ = inputType;
00097 }
00098
00099 protected:
00100 std::string inputType_;
00101
00102 Teuchos::RCP<const Epetra_BlockMap> input_map_;
00103 Teuchos::RCP<const Epetra_CrsGraph> input_graph_;
00104 Teuchos::RCP<const Epetra_RowMatrix> input_matrix_;
00105 Teuchos::RCP<Isorropia::Epetra::CostDescriber> costs_;
00106 Teuchos::RCP<Epetra_Vector> weights_;
00107
00108 virtual int precompute();
00109 virtual int postcompute() = 0;
00110
00111 };
00112
00113 }
00114 }
00115
00116 #endif //HAVE_EPETRA
00117
00118 #endif
00119