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_ILUK_GRAPH_H_ 00031 #define _IFPACK_ILUK_GRAPH_H_ 00032 00033 #include "Ifpack_ConfigDefs.h" 00034 #include "Epetra_Object.h" 00035 #include "Epetra_CrsGraph.h" 00036 #include "Epetra_Import.h" 00037 00038 #include "Teuchos_RefCountPtr.hpp" 00039 00040 namespace Teuchos { 00041 class ParameterList; 00042 } 00043 00045 00064 class Ifpack_IlukGraph { 00065 00066 // Give ostream << function some access to private and protected data/functions. 00067 00068 friend ostream& operator << (ostream& os, const Ifpack_IlukGraph& A); 00069 00070 public: 00071 00073 00086 Ifpack_IlukGraph(const Epetra_CrsGraph & Graph, int LevelFill, int LevelOverlap); 00087 00089 Ifpack_IlukGraph(const Ifpack_IlukGraph & Graph); 00090 00092 virtual ~Ifpack_IlukGraph(); 00093 00095 /* This method is only available if the Teuchos package is enabled. 00096 This method recogizes two parameter names: Level_fill and Level_overlap. 00097 Both are case insensitive, and in both cases the ParameterEntry must 00098 have type int. 00099 */ 00100 int SetParameters(const Teuchos::ParameterList& parameterlist, 00101 bool cerr_warning_if_unused=false); 00102 00104 /* 00105 \return Integer error code, set to 0 if successful. 00106 00107 */ 00108 virtual int ConstructFilledGraph(); 00109 00111 /* 00112 \return Integer error code, set to 0 if successful. 00113 00114 */ 00115 virtual int ConstructOverlapGraph(); 00116 00118 virtual int LevelFill() const {return(LevelFill_);}; 00119 00121 virtual int LevelOverlap() const {return(LevelOverlap_);}; 00122 00124 int NumGlobalBlockRows() const {return(NumGlobalBlockRows_);}; 00125 00127 int NumGlobalBlockCols() const {return(NumGlobalBlockCols_);}; 00128 00129 00131 int NumGlobalRows() const {return(NumGlobalRows_);}; 00132 00134 int NumGlobalCols() const {return(NumGlobalCols_);}; 00136 int NumGlobalNonzeros() const {return(NumGlobalNonzeros_);}; 00137 00139 virtual int NumGlobalBlockDiagonals() const {return(NumGlobalBlockDiagonals_);}; 00140 00142 int NumMyBlockRows() const {return(NumMyBlockRows_);}; 00143 00145 int NumMyBlockCols() const {return(NumMyBlockCols_);}; 00146 00147 00149 int NumMyRows() const {return(NumMyRows_);}; 00150 00152 int NumMyCols() const {return(NumMyCols_);}; 00153 00155 int NumMyNonzeros() const {return(NumMyNonzeros_);}; 00156 00158 virtual int NumMyBlockDiagonals() const {return(NumMyBlockDiagonals_);}; 00159 00161 int IndexBase() const {return(IndexBase_);}; 00162 00164 virtual Epetra_CrsGraph & L_Graph() {return(*L_Graph_);}; 00165 00167 virtual Epetra_CrsGraph & U_Graph() {return(*U_Graph_);}; 00168 00170 virtual Epetra_CrsGraph & L_Graph() const {return(*L_Graph_);}; 00171 00173 virtual Epetra_CrsGraph & U_Graph() const {return(*U_Graph_);}; 00174 00176 virtual Epetra_Import * OverlapImporter() const {return(&*OverlapImporter_);}; 00177 00179 virtual Epetra_CrsGraph * OverlapGraph() const {return(&*OverlapGraph_);}; 00180 00182 virtual const Epetra_BlockMap & DomainMap() const {return(DomainMap_);}; 00183 00185 virtual const Epetra_BlockMap & RangeMap() const{return(RangeMap_);}; 00186 00188 virtual const Epetra_Comm & Comm() const{return(Comm_);}; 00189 00190 private: 00191 00192 00193 const Epetra_CrsGraph & Graph_; 00194 const Epetra_BlockMap & DomainMap_; 00195 const Epetra_BlockMap & RangeMap_; 00196 const Epetra_Comm & Comm_; 00197 Teuchos::RefCountPtr<Epetra_CrsGraph> OverlapGraph_; 00198 Teuchos::RefCountPtr<Epetra_BlockMap> OverlapRowMap_; 00199 Teuchos::RefCountPtr<Epetra_Import> OverlapImporter_; 00200 int LevelFill_; 00201 int LevelOverlap_; 00202 Teuchos::RefCountPtr<Epetra_CrsGraph> L_Graph_; 00203 Teuchos::RefCountPtr<Epetra_CrsGraph> U_Graph_; 00204 int IndexBase_; 00205 int NumGlobalRows_; 00206 int NumGlobalCols_; 00207 int NumGlobalBlockRows_; 00208 int NumGlobalBlockCols_; 00209 int NumGlobalBlockDiagonals_; 00210 int NumGlobalNonzeros_; 00211 int NumGlobalEntries_; 00212 int NumMyBlockRows_; 00213 int NumMyBlockCols_; 00214 int NumMyRows_; 00215 int NumMyCols_; 00216 int NumMyBlockDiagonals_; 00217 int NumMyNonzeros_; 00218 int NumMyEntries_; 00219 00220 00221 }; 00222 00224 ostream& operator << (ostream& os, const Ifpack_IlukGraph& A); 00225 00226 #endif /* _IFPACK_ILUK_GRAPH_H_ */
1.4.7