Amesos Package Browser (Single Doxygen Collection) Development
Amesos_BaseSolver.h
Go to the documentation of this file.
00001 /*
00002 // @HEADER
00003 // ***********************************************************************
00004 // 
00005 //                Amesos: Direct Sparse Solver Package
00006 //                 Copyright (2004) 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 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 // 
00027 // ***********************************************************************
00028 // @HEADER
00029 */
00030 
00041 #ifndef _AMESOS_BASESOLVER_H_
00042 #define _AMESOS_BASESOLVER_H_
00043 
00044 const int StructurallySingularMatrixError = -21;
00045 const int NumericallySingularMatrixError = -22;
00046 
00047 //#include "Amesos_ConfigDefs.h"
00048 #include "Teuchos_RCP.hpp"
00049 #include "Teuchos_ParameterList.hpp"
00050 #include "Teuchos_ParameterListAcceptor.hpp"
00051 #include "Epetra_LinearProblem.h"
00052 class Epetra_LinearProblem;
00053 class Epetra_MultiVector;
00054 class Epetra_Map;
00055 class Epetra_Comm;
00056 
00058 
00223 class Amesos_BaseSolver 
00224   : public Teuchos::ParameterListAcceptor
00225 {
00226 
00227 #if 0      
00228  private:
00229   Teuchos::RCP<Teuchos::ParameterList> paramList_ ; 
00230 #endif
00231 
00232  public:
00233 
00235   using Teuchos::ParameterListAcceptor::getParameterList;
00236 
00238 
00239   virtual ~Amesos_BaseSolver() {};
00240   
00242 
00243 
00245 
00263   virtual int SymbolicFactorization() = 0;
00264 
00266 
00300   virtual int NumericFactorization() = 0;
00301 
00303 
00325   virtual int Solve() = 0;
00326 
00328 
00329 
00331 
00350   virtual int SetUseTranspose(bool UseTranspose) = 0;
00351   
00353   virtual bool UseTranspose() const = 0;
00354 
00356 
00372   virtual int SetParameters( Teuchos::ParameterList &ParameterList ) = 0 ;
00373 
00380   virtual const Epetra_LinearProblem* GetProblem() const = 0;
00381 
00383 
00389   virtual bool MatrixShapeOK() const = 0;
00390 
00392   virtual const Epetra_Comm & Comm() const = 0;
00393 
00395   virtual int NumSymbolicFact() const = 0;
00396 
00398   virtual int NumNumericFact() const = 0;
00399 
00401   virtual int NumSolve() const = 0;
00402 
00404   virtual void PrintStatus() const = 0;
00405 
00407   virtual void PrintTiming() const = 0;
00408 
00410   virtual void setParameterList(Teuchos::RCP<Teuchos::ParameterList> const& paramList)
00411   {
00412     //    paramList_ = paramlist ;
00413     //    this->SetParameters( *paramList_ );
00414   }
00415 
00417   virtual Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList()
00418   {
00419     Teuchos::RCP<Teuchos::ParameterList> PL ;
00420     return PL ;
00421   }
00422 
00424   virtual Teuchos::RCP<Teuchos::ParameterList> unsetParameterList()
00425   {
00426     Teuchos::RCP<Teuchos::ParameterList> PL ;
00427     //    this->SetParameters( *paramList_ );
00428     return PL ; 
00429   }
00430 
00432   virtual void GetTiming( Teuchos::ParameterList &TimingParameterList ) const {}
00433 
00435 
00436 
00437 
00438 };
00439 
00440 #endif /* _AMESOS_BASESOLVER_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines