Amesos Package Browser (Single Doxygen Collection)  Development
Amesos_BaseSolver.h
Go to the documentation of this file.
1 /*
2 // @HEADER
3 // ***********************************************************************
4 //
5 // Amesos: Direct Sparse Solver Package
6 // Copyright (2004) Sandia Corporation
7 //
8 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
9 // license for use of this work by or on behalf of the U.S. Government.
10 //
11 // This library is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Lesser General Public License as
13 // published by the Free Software Foundation; either version 2.1 of the
14 // License, or (at your option) any later version.
15 //
16 // This library is distributed in the hope that it will be useful, but
17 // WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
24 // USA
25 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
26 //
27 // ***********************************************************************
28 // @HEADER
29 */
30 
41 #ifndef _AMESOS_BASESOLVER_H_
42 #define _AMESOS_BASESOLVER_H_
43 
46 
47 //#include "Amesos_ConfigDefs.h"
48 #include "Teuchos_RCP.hpp"
51 #include "Epetra_LinearProblem.h"
53 class Epetra_MultiVector;
54 class Epetra_Map;
55 class Epetra_Comm;
56 
58 
225 {
226 
227 #if 0
228  private:
230 #endif
231 
232  public:
233 
236 
238  virtual ~Amesos_BaseSolver() {};
240 
242 
243 
245 
263  virtual int SymbolicFactorization() = 0;
264 
266 
300  virtual int NumericFactorization() = 0;
301 
303 
325  virtual int Solve() = 0;
326 
328 
329 
331 
350  virtual int SetUseTranspose(bool UseTranspose) = 0;
351 
353  virtual bool UseTranspose() const = 0;
354 
356 
372  virtual int SetParameters( Teuchos::ParameterList &ParameterList ) = 0 ;
373 
380  virtual const Epetra_LinearProblem* GetProblem() const = 0;
381 
383 
389  virtual bool MatrixShapeOK() const = 0;
390 
392  virtual const Epetra_Comm & Comm() const = 0;
393 
395  virtual int NumSymbolicFact() const = 0;
396 
398  virtual int NumNumericFact() const = 0;
399 
401  virtual int NumSolve() const = 0;
402 
404  virtual void PrintStatus() const = 0;
405 
407  virtual void PrintTiming() const = 0;
408 
411  {
412  Teuchos::RCP<Teuchos::ParameterList> temp = paramList;
413  // paramList_ = paramlist ;
414  // this->SetParameters( *paramList_ );
415  }
416 
419  {
421  return PL ;
422  }
423 
426  {
428  // this->SetParameters( *paramList_ );
429  return PL ;
430  }
431 
433  virtual void GetTiming( Teuchos::ParameterList &TimingParameterList ) const
434  {
436  TimingParameterList = temp.setName("NULL");
437  }
438 
440 
441 
442 
443 };
444 
445 #endif /* _AMESOS_BASESOLVER_H_ */
Teuchos_ParameterList.hpp
Amesos_BaseSolver::SetUseTranspose
virtual int SetUseTranspose(bool UseTranspose)=0
If set true, X will be set to the solution of AT X = B (not A X = B)
Amesos_BaseSolver::NumSymbolicFact
virtual int NumSymbolicFact() const =0
Returns the number of symbolic factorizations performed by this object.
Teuchos_RCP.hpp
Amesos_BaseSolver::getNonconstParameterList
virtual Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
This is an empty stub.
Definition: Amesos_BaseSolver.h:418
Teuchos::ParameterList::setName
ParameterList & setName(const std::string &name)
Amesos_BaseSolver::PrintTiming
virtual void PrintTiming() const =0
Prints timing information about the current solver.
Amesos_BaseSolver
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
Definition: Amesos_BaseSolver.h:223
Amesos_BaseSolver::NumNumericFact
virtual int NumNumericFact() const =0
Returns the number of numeric factorizations performed by this object.
Amesos_BaseSolver::NumericFactorization
virtual int NumericFactorization()=0
Performs NumericFactorization on the matrix A.
Amesos_BaseSolver::UseTranspose
virtual bool UseTranspose() const =0
Returns the current UseTranspose setting.
Teuchos::ParameterListAcceptor
Epetra_Comm
Amesos_BaseSolver::SymbolicFactorization
virtual int SymbolicFactorization()=0
Performs SymbolicFactorization on the matrix A.
Teuchos::ParameterListAcceptor::getParameterList
virtual RCP< const ParameterList > getParameterList() const
Epetra_LinearProblem.h
Teuchos::RCP< Teuchos::ParameterList >
Amesos_BaseSolver::NumSolve
virtual int NumSolve() const =0
Returns the number of solves performed by this object.
NumericallySingularMatrixError
const int NumericallySingularMatrixError
Definition: Amesos_BaseSolver.h:45
StructurallySingularMatrixError
const int StructurallySingularMatrixError
Definition: Amesos_BaseSolver.h:44
Amesos_BaseSolver::unsetParameterList
virtual Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
This is an empty stub.
Definition: Amesos_BaseSolver.h:425
Amesos_BaseSolver::GetTiming
virtual void GetTiming(Teuchos::ParameterList &TimingParameterList) const
Extracts timing information from the current solver and places it in the parameter list....
Definition: Amesos_BaseSolver.h:433
Epetra_LinearProblem
Amesos_BaseSolver::Comm
virtual const Epetra_Comm & Comm() const =0
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Epetra_MultiVector
Amesos_BaseSolver::MatrixShapeOK
virtual bool MatrixShapeOK() const =0
Returns true if the solver can handle this matrix shape.
Amesos_BaseSolver::GetProblem
virtual const Epetra_LinearProblem * GetProblem() const =0
Returns the Epetra_LinearProblem.
Amesos_BaseSolver::~Amesos_BaseSolver
virtual ~Amesos_BaseSolver()
Destructor.
Definition: Amesos_BaseSolver.h:239
Amesos_BaseSolver::Solve
virtual int Solve()=0
Solves A X = B (or AT x = B)
Teuchos::ParameterList
Amesos_BaseSolver::setParameterList
virtual void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
Redefined from Teuchos::ParameterListAcceptor (Does Not Work)
Definition: Amesos_BaseSolver.h:410
Amesos_BaseSolver::PrintStatus
virtual void PrintStatus() const =0
Prints status information about the current solver.
Teuchos_ParameterListAcceptor.hpp
Epetra_Map
Amesos_BaseSolver::SetParameters
virtual int SetParameters(Teuchos::ParameterList &ParameterList)=0
Updates internal variables.