Amesos Package Browser (Single Doxygen Collection) Development
Amesos_BTF.h
Go to the documentation of this file.
00001 This file is out of date.  Is has not been refactored to use Amesos_Status. 
00002 
00003 // @HEADER
00004 // ***********************************************************************
00005 // 
00006 //                Amesos: Direct Sparse Solver Package
00007 //                 Copyright (2004) Sandia Corporation
00008 // 
00009 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00010 // license for use of this work by or on behalf of the U.S. Government.
00011 // 
00012 // This library is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU Lesser General Public License as
00014 // published by the Free Software Foundation; either version 2.1 of the
00015 // License, or (at your option) any later version.
00016 //  
00017 // This library is distributed in the hope that it will be useful, but
00018 // WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 // Lesser General Public License for more details.
00021 //  
00022 // You should have received a copy of the GNU Lesser General Public
00023 // License along with this library; if not, write to the Free Software
00024 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025 // USA
00026 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00027 // 
00028 // ***********************************************************************
00029 // @HEADER
00030 
00031 #ifndef _AMESOS_BTF_H_
00032 #define _AMESOS_BTF_H_
00033 
00034 #include "Amesos_ConfigDefs.h"
00035 #include "Amesos_BaseSolver.h"
00036 #include "Epetra_LinearProblem.h"
00037 #include "Epetra_Time.h"
00038 #ifdef EPETRA_MPI
00039 #include "Epetra_MpiComm.h"
00040 #else
00041 #include "Epetra_Comm.h"
00042 #endif
00043 #include "Epetra_CrsGraph.h"
00044 
00045 
00047 
00062 class Amesos_Btf: public Amesos_BaseSolver { 
00063 
00064 public: 
00065 
00067 
00068 
00075   Amesos_Btf(const Epetra_LinearProblem& LinearProblem );
00076 
00078 
00080   ~Amesos_Btf(void);
00082 
00084 
00086 
00098     int SymbolicFactorization() ;
00099 
00101 
00108     int NumericFactorization() ;
00109 
00111 
00123     int Solve();
00124 
00126   
00128 
00130   const Epetra_LinearProblem *GetProblem() const { return(Problem_); };
00131 
00133 
00136   bool MatrixShapeOK() const ;
00137 
00139 
00151   int SetUseTranspose(bool UseTranspose) {UseTranspose_ = UseTranspose; return(0);};
00152 
00154   bool UseTranspose() const {return(UseTranspose_);};
00155 
00157   const Epetra_Comm & Comm() const {return(GetProblem()->GetOperator()->Comm());};
00158 
00160 
00176   int SetParameters( Teuchos::ParameterList &ParameterList )  ;
00177 
00179   int NumSymbolicFact() const { return( NumSymbolicFact_ ); }
00180 
00182   int NumNumericFact() const { return( NumNumericFact_ ); }
00183 
00185   int NumSolve() const { return( NumSolve_ ); }
00186 
00188   void PrintTiming();
00189   
00191   void PrintStatus();
00192   
00194 
00195 private:  
00196   bool UseTranspose_;
00197   const Epetra_LinearProblem * Problem_;
00198 
00199   bool PrintTiming_;
00200   bool PrintStatus_;
00201   bool ComputeVectorNorms_;
00202   bool ComputeTrueResidual_;
00203   
00204   int verbose_;
00205   int debug_;
00206 
00207   // some timing internal, copied from MUMPS
00208   double ConTime_;                        // time to convert to BTF format
00209   double SymTime_;                        // time for symbolic factorization
00210   double NumTime_;                        // time for numeric factorization
00211   double SolTime_;                        // time for solution
00212   double VecTime_;                        // time to redistribute vectors
00213   double MatTime_;                        // time to redistribute matrix
00214   
00215   int NumSymbolicFact_;
00216   int NumNumericFact_;
00217   int NumSolve_;  
00218 
00219   Epetra_Time * Time_;
00220   
00221 };  // End of  class Amesos_Btf  
00222 #endif /* _AMESOS_BTF_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines