Ifpack_IlukGraph.h

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 
00037 #ifdef HAVE_IFPACK_TEUCHOS
00038 namespace Teuchos {
00039   class ParameterList;
00040 }
00041 #endif
00042 
00044 
00063 class Ifpack_IlukGraph {
00064       
00065   // Give ostream << function some access to private and protected data/functions.
00066 
00067   friend ostream& operator << (ostream& os, const Ifpack_IlukGraph& A);
00068 
00069  public:
00070 
00072 
00085   Ifpack_IlukGraph(const Epetra_CrsGraph & Graph, int LevelFill, int LevelOverlap);
00086   
00088   Ifpack_IlukGraph(const Ifpack_IlukGraph & Graph);
00089 
00091   virtual ~Ifpack_IlukGraph();
00092   
00093 #ifdef HAVE_IFPACK_TEUCHOS
00094 
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 #endif
00103 
00105   /* 
00106     \return Integer error code, set to 0 if successful.
00107     
00108   */
00109   virtual int ConstructFilledGraph();
00110 
00112   /* 
00113     \return Integer error code, set to 0 if successful.
00114     
00115   */
00116   virtual int ConstructOverlapGraph();
00117   
00119   virtual int LevelFill() const {return(LevelFill_);};
00120   
00122   virtual int LevelOverlap() const {return(LevelOverlap_);};
00123     
00125   int NumGlobalBlockRows() const {return(NumGlobalBlockRows_);};
00126   
00128   int NumGlobalBlockCols() const {return(NumGlobalBlockCols_);};
00129   
00130     
00132   int NumGlobalRows() const {return(NumGlobalRows_);};
00133   
00135   int NumGlobalCols() const {return(NumGlobalCols_);};
00137   int NumGlobalNonzeros() const {return(NumGlobalNonzeros_);};
00138   
00140   virtual int NumGlobalBlockDiagonals() const {return(NumGlobalBlockDiagonals_);};
00141   
00143   int NumMyBlockRows() const {return(NumMyBlockRows_);};
00144   
00146   int NumMyBlockCols() const {return(NumMyBlockCols_);};
00147   
00148   
00150   int NumMyRows() const {return(NumMyRows_);};
00151   
00153   int NumMyCols() const {return(NumMyCols_);};
00154   
00156   int NumMyNonzeros() const {return(NumMyNonzeros_);};
00157   
00159   virtual int NumMyBlockDiagonals() const {return(NumMyBlockDiagonals_);};
00160   
00162   int IndexBase() const {return(IndexBase_);};
00163   
00165   virtual Epetra_CrsGraph & L_Graph() {return(*L_Graph_);};
00166   
00168   virtual Epetra_CrsGraph & U_Graph() {return(*U_Graph_);};
00169   
00171   virtual Epetra_CrsGraph & L_Graph() const {return(*L_Graph_);};
00172   
00174   virtual Epetra_CrsGraph & U_Graph() const {return(*U_Graph_);};
00175   
00177   virtual Epetra_Import * OverlapImporter() const  {return(OverlapImporter_);};
00178   
00180   virtual Epetra_CrsGraph * OverlapGraph() const  {return(OverlapGraph_);};
00181 
00183     virtual const Epetra_BlockMap & DomainMap() const {return(DomainMap_);};
00184 
00186     virtual const Epetra_BlockMap & RangeMap() const{return(RangeMap_);};
00187 
00189     virtual const Epetra_Comm & Comm() const{return(Comm_);};
00190   
00191  private:
00192     
00193 
00194   const Epetra_CrsGraph & Graph_;
00195   const Epetra_BlockMap & DomainMap_;
00196   const Epetra_BlockMap & RangeMap_;
00197   const Epetra_Comm & Comm_;
00198   Epetra_CrsGraph * OverlapGraph_;
00199   Epetra_BlockMap * OverlapRowMap_;
00200   Epetra_Import * OverlapImporter_;
00201   int LevelFill_;
00202   int LevelOverlap_;
00203   Epetra_CrsGraph * L_Graph_;
00204   Epetra_CrsGraph * U_Graph_;
00205   int IndexBase_;
00206   int NumGlobalRows_;
00207   int NumGlobalCols_;
00208   int NumGlobalBlockRows_;
00209   int NumGlobalBlockCols_;
00210   int NumGlobalBlockDiagonals_;
00211   int NumGlobalNonzeros_;
00212   int NumGlobalEntries_;
00213   int NumMyBlockRows_;
00214   int NumMyBlockCols_;
00215   int NumMyRows_;
00216   int NumMyCols_;
00217   int NumMyBlockDiagonals_;
00218   int NumMyNonzeros_;
00219   int NumMyEntries_;
00220   
00221 
00222  };
00223 
00225 ostream& operator << (ostream& os, const Ifpack_IlukGraph& A);
00226 
00227 #endif /* _IFPACK_ILUK_GRAPH_H_ */

Generated on Thu Sep 18 12:37:07 2008 for IFPACK by doxygen 1.3.9.1