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 IFPACK_OVERLAPGRAPH_H
00031 #define IFPACK_OVERLAPGRAPH_H
00032
00033 #include "Ifpack_ConfigDefs.h"
00034 #include "Epetra_Object.h"
00035 #include "Epetra_CrsGraph.h"
00036 #include "Epetra_Import.h"
00037 #include "Teuchos_RefCountPtr.hpp"
00038
00039 class Epetra_Comm;
00040 class Epetra_BlockMap;
00041 class Epetra_RowMatrix;
00042
00043 namespace Teuchos {
00044 class ParameterList;
00045 }
00046
00048
00049 class Ifpack_OverlapGraph: public Epetra_Object {
00050
00051 public:
00053
00054
00058 Ifpack_OverlapGraph(const Teuchos::RefCountPtr<const Epetra_CrsGraph>& UserMatrixGraph_in, int OverlapLevel_in);
00059
00061
00066 Ifpack_OverlapGraph(const Teuchos::RefCountPtr<const Epetra_RowMatrix>& UserMatrix_in, int OverlapLevel_in);
00067
00069 Ifpack_OverlapGraph(const Ifpack_OverlapGraph & Source);
00070
00072 virtual ~Ifpack_OverlapGraph() {};
00074
00076
00078
00079
00080
00081
00082
00083 int SetParameters(const Teuchos::ParameterList& parameterlist,
00084 bool cerr_warning_if_unused=false);
00085
00087 const Epetra_CrsGraph & OverlapGraph() const {return(*OverlapGraph_);}
00088
00090 const Epetra_BlockMap & OverlapRowMap() const {return(*OverlapRowMap_);}
00091
00093 const Epetra_Import & OverlapImporter() const {return(*OverlapImporter_);}
00094
00096
00101 int OverlapLevel() const {return(OverlapLevel_);}
00103
00105
00106 void Print(ostream& os) const {
00107 os << endl;
00108 if (UserMatrix_!=Teuchos::null)
00109 os << "Overlap Graph created using the user's Epetra_RowMatrix object" << endl;
00110 else
00111 os << "Overlap Graph created using the user's Epetra_CrsGraph object" << endl;
00112
00113 os << " Level of Overlap = " << OverlapLevel_ << endl;
00114 OverlapGraph_->Print(os);
00115 return;
00116 }
00118
00119 protected:
00120
00121 int ConstructOverlapGraph(const Teuchos::RefCountPtr<const Epetra_CrsGraph>& UserMatrixGraph);
00122 Teuchos::RefCountPtr<Epetra_CrsGraph> OverlapGraph_;
00123 Teuchos::RefCountPtr<const Epetra_CrsGraph> UserMatrixGraph_;
00124 Teuchos::RefCountPtr<const Epetra_RowMatrix> UserMatrix_;
00125 Teuchos::RefCountPtr<Epetra_BlockMap> OverlapRowMap_;
00126 Teuchos::RefCountPtr<Epetra_Import> OverlapImporter_;
00127 int OverlapLevel_;
00128 bool IsOverlapped_;
00129 };
00130 #endif // IFPACK_OVERLAPGRAPH_H