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, int itype = unspecified_input_);
00064 Library(Teuchos::RCP<const Epetra_CrsGraph> input_graph,
00065 Teuchos::RCP<CostDescriber> costs, int itype = unspecified_input_);
00066
00067 Library(Teuchos::RCP<const Epetra_RowMatrix> input_matrix, int itype = unspecified_input_);
00068 Library(Teuchos::RCP<const Epetra_RowMatrix> input_matrix,
00069 Teuchos::RCP<CostDescriber> costs, int itype = unspecified_input_);
00070
00071 Library(Teuchos::RCP<const Epetra_MultiVector> input_coords, int itype = unspecified_input_);
00072 Library(Teuchos::RCP<const Epetra_MultiVector> input_coords,
00073 Teuchos::RCP<const Epetra_MultiVector> weights, int itype = unspecified_input_);
00074
00075 virtual ~Library();
00076
00077 virtual int
00078 repartition(Teuchos::ParameterList& paramlist,
00079 std::vector<int>& myNewElements,
00080 int& exportsSize,
00081 std::vector<int>& imports) = 0;
00082
00083 virtual int
00084 color(Teuchos::ParameterList& paramlist,
00085 std::vector<int>& colorAssignment) = 0 ;
00086
00087 virtual int
00088 order(Teuchos::ParameterList& paramlist,
00089 std::vector<int>& orderAssignment) = 0 ;
00090
00096 static const int hgraph_input_ = 1;
00097
00102 static const int hgraph2d_finegrain_input_ = 2;
00103
00109 static const int graph_input_ = 3;
00110
00117 static const int geometric_input_ = 4;
00118
00122 static const int unspecified_input_ = 5;
00123
00124 int input_type_;
00125
00126 int numPartSizes;
00127 int *partGIDs;
00128 float *partSizes;
00129
00130 protected:
00131
00132 Teuchos::RCP<const Epetra_BlockMap> input_map_;
00133 Teuchos::RCP<const Epetra_CrsGraph> input_graph_;
00134 Teuchos::RCP<const Epetra_RowMatrix> input_matrix_;
00135 Teuchos::RCP<const Epetra_MultiVector> input_coords_;
00136 Teuchos::RCP<Isorropia::Epetra::CostDescriber> costs_;
00137 Teuchos::RCP<const Epetra_MultiVector> weights_;
00138
00139 virtual int precompute();
00140
00141 virtual int postcompute() = 0;
00142
00143 };
00144
00145 }
00146 }
00147
00148 #endif //HAVE_EPETRA
00149
00150 #endif
00151