00001 /*@HEADER 00002 // *********************************************************************** 00003 // 00004 // Ifpack: Object-Oriented Algebraic Preconditioner Package 00005 // Copyright (2002) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 //@HEADER 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, int OverlapLevel); 00059 00061 00066 Ifpack_OverlapGraph(const Teuchos::RefCountPtr<const Epetra_RowMatrix>& UserMatrix, int OverlapLevel); 00067 00069 Ifpack_OverlapGraph(const Ifpack_OverlapGraph & Source); 00070 00072 virtual ~Ifpack_OverlapGraph() {}; 00074 00076 00078 /* This method is only available if the configure argument 00079 '--enable-ifpack-teuchos' was used. 00080 This method recognizes the name: level_overlap, which is case insensitive. 00081 The ParameterEntry must have type int. 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
1.4.7