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 #ifdef ISORROPIA_2D
00031 #ifndef _Isorropia_EpetraPartitioner2D_hpp_
00032 #define _Isorropia_EpetraPartitioner2D_hpp_
00033
00034 #include <Isorropia_ConfigDefs.hpp>
00035 #include <Teuchos_RefCountPtr.hpp>
00036 #include <Teuchos_ParameterList.hpp>
00037
00038 #include <Isorropia_EpetraCostDescriber.hpp>
00039 #include <Isorropia_EpetraOperator.hpp>
00040 #include <Isorropia_Partitioner2D.hpp>
00041
00042 #ifdef HAVE_EPETRA
00043 class Epetra_Map;
00044 class Epetra_BlockMap;
00045 class Epetra_Import;
00046 class Epetra_Vector;
00047 class Epetra_MultiVector;
00048 class Epetra_CrsGraph;
00049 class Epetra_CrsMatrix;
00050 class Epetra_RowMatrix;
00051 class Epetra_LinearProblem;
00052
00053 namespace Isorropia {
00054
00055 namespace Epetra {
00056 class CostDescriber;
00057
00063 class Partitioner2D : virtual public Isorropia::Partitioner2D, virtual public Isorropia::Epetra::Operator {
00064 public:
00088 Partitioner2D(Teuchos::RefCountPtr<const Epetra_CrsGraph> input_graph,
00089 const Teuchos::ParameterList& paramlist,
00090 bool compute_partitioning_now=true);
00091
00118 Partitioner2D(Teuchos::RefCountPtr<const Epetra_CrsGraph> input_graph,
00119 Teuchos::RefCountPtr<CostDescriber> costs,
00120 const Teuchos::ParameterList& paramlist,
00121 bool compute_partitioning_now=true);
00122
00147 Partitioner2D(Teuchos::RefCountPtr<const Epetra_RowMatrix> input_matrix,
00148 const Teuchos::ParameterList& paramlist,
00149 bool compute_partitioning_now=true);
00150
00178 Partitioner2D(Teuchos::RefCountPtr<const Epetra_RowMatrix> input_matrix,
00179 Teuchos::RefCountPtr<CostDescriber> costs,
00180 const Teuchos::ParameterList& paramlist,
00181 bool compute_partitioning_now=true);
00182
00184 virtual ~Partitioner2D();
00185
00214 void partition(bool force_repartitioning=false);
00215
00216 virtual void compute(bool forceRecomputing=false);
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00233 int numElemsInPartition(int partition) const;
00234
00240 void elemsInPartition(int partition, int* elementList, int len) const;
00241
00242 Teuchos::RefCountPtr<Epetra_Map> createNewMap();
00243
00244 int createNewMaps(Teuchos::RefCountPtr<Epetra_Map> domainMap,
00245 Teuchos::RefCountPtr<Epetra_Map> rangeMap);
00246
00247 int partitionVectors();
00248
00249
00250 };
00251
00252 }
00253 }
00254
00255 #endif //HAVE_EPETRA
00256
00257 #endif
00258
00259 #endif //ISORROPIA_2D