Isorropia: Partitioning, Load Balancing and more Version 3.0
Isorropia_EpetraProber.hpp
Go to the documentation of this file.
00001 //@HEADER
00002 /*
00003 ************************************************************************
00004 
00005               Isorropia: Partitioning and Load Balancing Package
00006                 Copyright (2006) Sandia Corporation
00007 
00008 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 license for use of this work by or on behalf of the U.S. Government.
00010 
00011 This library is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as
00013 published by the Free Software Foundation; either version 2.1 of the
00014 License, or (at your option) any later version.
00015 
00016 This library is distributed in the hope that it will be useful, but
00017 WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 Lesser General Public License for more details.
00020 
00021 You should have received a copy of the GNU Lesser General Public
00022 License along with this library; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 USA
00025 
00026 ************************************************************************
00027 */
00028 //@HEADER
00029 
00030 #ifndef _Isorropia_EpetraProber_hpp_
00031 #define _Isorropia_EpetraProber_hpp_
00032 
00033 #include <Isorropia_ConfigDefs.hpp>
00034 #include <Teuchos_ParameterList.hpp>
00035 
00036 #include <Isorropia_Colorer.hpp>
00037 #include <Isorropia_EpetraColorer.hpp>
00038 
00039 #ifdef HAVE_EPETRA
00040 #include <Epetra_CrsGraph.h>
00041 #include <Teuchos_RCP.hpp>
00042 class Epetra_MultiVector;
00043 class Epetra_CrsMatrix;
00044 class Epetra_Operator;
00045 
00046 namespace Isorropia {
00047 
00048 namespace Epetra {
00049 
00057 class Prober {
00058 public:
00059 
00069   Prober(Teuchos::RCP<const Epetra_CrsGraph> input_graph,
00070          const Teuchos::ParameterList& paramlist,
00071          bool compute_now=true);
00072 
00073 
00083   Prober(const Epetra_CrsGraph * input_graph,
00084          const Teuchos::ParameterList& paramlist,
00085          bool compute_now=true);
00086 
00096   Prober(Teuchos::RCP<const Epetra_CrsMatrix> input_matrix,
00097          const Teuchos::ParameterList & paramlist,
00098          bool compute_now=true);
00099 
00100 
00110   Prober(const Epetra_CrsMatrix * input_matrix,
00111          const Teuchos::ParameterList & paramlist,
00112          bool compute_now=true);
00113 
00114   
00115 
00119   Prober();
00120 
00121   
00123   ~Prober(){delete colorer_;}
00124 
00125 
00127   void setList(const Teuchos::ParameterList& paramlist);
00128 
00130   void setGraph(Teuchos::RCP<const Epetra_CrsGraph> input_graph){input_graph_=input_graph; has_colored=false;}  
00131 
00135   void color();
00136   
00142   int probe(const Epetra_Operator & op, Epetra_CrsMatrix & out_matrix);
00143 
00149   Teuchos::RCP<Epetra_CrsMatrix> probe(const Epetra_Operator & op);
00150   
00151 private:
00152   Teuchos::RCP<const Epetra_CrsGraph> input_graph_;
00153   Colorer *colorer_;
00154   Teuchos::ParameterList List_;
00155   bool has_colored;
00156 };//class Prober
00157 
00158 }//namespace Epetra
00159 }//namespace Isorropia
00160 
00161 #endif //HAVE_EPETRA
00162 
00163 #endif
00164