00001 #ifndef IFPACK_METISREORDERING_H 00002 #define IFPACK_METISREORDERING_H 00003 00004 #include "Ifpack_ConfigDefs.h" 00005 #ifdef HAVE_IFPACK_TEUCHOS 00006 #include "Ifpack_Reordering.h" 00007 #include "Teuchos_ParameterList.hpp" 00008 class Epetra_Comm; 00009 class Epetra_RowMatrix; 00010 class Ifpack_Graph; 00011 class Epetra_Map; 00012 class Epetra_BlockMap; 00013 class Epetra_Import; 00014 00016 00017 class Ifpack_METISReordering : public Ifpack_Reordering { 00018 00019 public: 00020 00022 Ifpack_METISReordering(); 00023 00025 ~Ifpack_METISReordering() {}; 00026 00028 virtual int SetParameter(const string Name, const int Value) 00029 { 00030 if (Name == "partitioner: use symmetric graph") 00031 UseSymmetricGraph_ = (bool)Value; 00032 return(0); 00033 } 00034 00036 virtual int SetParameter(const string Name, const double Value) 00037 { 00038 return(0); 00039 }; 00040 00042 virtual int SetParameters(Teuchos::ParameterList& List) 00043 { 00044 UseSymmetricGraph_ = List.get("partitioner: use symmetric graph", 00045 UseSymmetricGraph_); 00046 00047 return(0); 00048 } 00049 00051 virtual int Compute(const Ifpack_Graph& Graph); 00052 00054 virtual int Compute(const Epetra_RowMatrix& Matrix); 00055 00057 virtual bool IsComputed() const 00058 { 00059 return(IsComputed_); 00060 } 00061 00063 virtual int Reorder(const int i) const; 00064 00066 virtual int InvReorder(const int i) const; 00067 00069 virtual int P(const Epetra_MultiVector& Xorig, 00070 Epetra_MultiVector& X) const; 00071 00073 virtual int Pinv(const Epetra_MultiVector& Xorig, 00074 Epetra_MultiVector& X) const; 00075 00077 virtual ostream& Print(std::ostream& os) const; 00078 00079 private: 00081 bool UseSymmetricGraph_; 00083 int NumMyRows_; 00085 bool IsComputed_; 00087 vector<int> Reorder_; 00089 vector<int> InvReorder_; 00090 Ifpack_Graph* Graph_; 00091 00092 }; // class Ifpack_METISReordering 00093 00094 #endif // HAVE_IFPACK_TEUCHOS 00095 #endif // IFPACK_METISREORDERING_H
1.3.9.1