Ifpack_OverlapGraph.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_OVERLAPGRAPH_H
00031 #define IFPACK_OVERLAPGRAPH_H
00032 
00033 #include "Ifpack_ConfigDefs.h"
00034 #include "Epetra_Object.h"
00035 #include "Epetra_CrsGraph.h"
00036 class Epetra_Comm;
00037 class Epetra_BlockMap;
00038 class Epetra_RowMatrix;
00039 class Epetra_Import;
00040 
00041 #ifdef HAVE_IFPACK_TEUCHOS
00042 namespace Teuchos {
00043   class ParameterList;
00044 }
00045 #endif
00046 
00048 
00049 class Ifpack_OverlapGraph: public Epetra_Object {
00050 
00051  public:
00053 
00054 
00058   Ifpack_OverlapGraph(const Epetra_CrsGraph * UserMatrixGraph, int OverlapLevel);
00059 
00061 
00066   Ifpack_OverlapGraph(const Epetra_RowMatrix * UserMatrix, int OverlapLevel);
00067   
00069   Ifpack_OverlapGraph(const Ifpack_OverlapGraph & Source);
00070 
00072   virtual ~Ifpack_OverlapGraph();
00074 
00076     
00077 #ifdef HAVE_IFPACK_TEUCHOS
00078 
00079   /* This method is only available if the configure argument
00080      '--enable-ifpack-teuchos' was used.
00081      This method recognizes the name: level_overlap, which is case insensitive.
00082      The ParameterEntry must have type int.
00083   */
00084   int SetParameters(const Teuchos::ParameterList& parameterlist,
00085                     bool cerr_warning_if_unused=false);
00086 #endif
00087 
00089   const Epetra_CrsGraph & OverlapGraph() const {return(*OverlapGraph_);}
00090     
00092   const Epetra_BlockMap & OverlapRowMap() const {return(*OverlapRowMap_);}
00093     
00095   const Epetra_Import & OverlapImporter() const {return(*OverlapImporter_);}
00096     
00098 
00103   int OverlapLevel() const {return(OverlapLevel_);}
00105 
00107 
00108   void Print(ostream& os) const {
00109 
00110   os << endl;
00111   if (UserMatrix_!=0) 
00112     os << "Overlap Graph created using the user's Epetra_RowMatrix object" << endl;
00113   else
00114         os << "Overlap Graph created using the user's Epetra_CrsGraph object" << endl;
00115 
00116   os << " Level of Overlap = " << OverlapLevel_ << endl;
00117   OverlapGraph_->Print(os);
00118   return;
00119 }
00121 
00122  protected:
00123 
00124   int ConstructOverlapGraph(const Epetra_CrsGraph * UserMatrixGraph);
00125   Epetra_CrsGraph * OverlapGraph_;
00126   const Epetra_CrsGraph * UserMatrixGraph_;
00127   const Epetra_RowMatrix * UserMatrix_;
00128   Epetra_BlockMap * OverlapRowMap_;
00129   Epetra_Import * OverlapImporter_;
00130   int OverlapLevel_;
00131   bool IsOverlapped_;
00132 };
00133 #endif // IFPACK_OVERLAPGRAPH_H

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