Amesos Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
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"
49#include "Teuchos_ParameterList.hpp"
50#include "Teuchos_ParameterListAcceptor.hpp"
51#include "Epetra_LinearProblem.h"
52class Epetra_LinearProblem;
53class Epetra_MultiVector;
54class Epetra_Map;
55class Epetra_Comm;
56
58
224 : public Teuchos::ParameterListAcceptor
225{
226
227#if 0
228 private:
229 Teuchos::RCP<Teuchos::ParameterList> paramList_ ;
230#endif
231
232 public:
233
235 using Teuchos::ParameterListAcceptor::getParameterList;
236
238
239 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
349 virtual int SetUseTranspose(bool UseTranspose) = 0;
350
352 virtual bool UseTranspose() const = 0;
353
355
371 virtual int SetParameters( Teuchos::ParameterList &ParameterList ) = 0 ;
372
379 virtual const Epetra_LinearProblem* GetProblem() const = 0;
380
382
388 virtual bool MatrixShapeOK() const = 0;
389
391 virtual const Epetra_Comm & Comm() const = 0;
392
394 virtual int NumSymbolicFact() const = 0;
395
397 virtual int NumNumericFact() const = 0;
398
400 virtual int NumSolve() const = 0;
401
403 virtual void PrintStatus() const = 0;
404
406 virtual void PrintTiming() const = 0;
407
409 virtual void setParameterList(Teuchos::RCP<Teuchos::ParameterList> const& paramList)
410 {
411 Teuchos::RCP<Teuchos::ParameterList> temp = paramList;
412 // paramList_ = paramlist ;
413 // this->SetParameters( *paramList_ );
414 }
415
417 virtual Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList()
418 {
419 Teuchos::RCP<Teuchos::ParameterList> PL ;
420 return PL ;
421 }
422
424 virtual Teuchos::RCP<Teuchos::ParameterList> unsetParameterList()
425 {
426 Teuchos::RCP<Teuchos::ParameterList> PL ;
427 // this->SetParameters( *paramList_ );
428 return PL ;
429 }
430
432 virtual void GetTiming( Teuchos::ParameterList &TimingParameterList ) const
433 {
434 Teuchos::ParameterList temp;
435 TimingParameterList = temp.setName("NULL");
436 }
437
439
440
441
442};
443
444#endif /* _AMESOS_BASESOLVER_H_ */
const int NumericallySingularMatrixError
const int StructurallySingularMatrixError
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
virtual void PrintTiming() const =0
Prints timing information about the current solver.
virtual const Epetra_LinearProblem * GetProblem() const =0
Returns the Epetra_LinearProblem.
virtual int Solve()=0
Solves A X = B (or AT x = B)
virtual ~Amesos_BaseSolver()
Destructor.
virtual void GetTiming(Teuchos::ParameterList &TimingParameterList) const
Extracts timing information from the current solver and places it in the parameter list....
virtual bool MatrixShapeOK() const =0
Returns true if the solver can handle this matrix shape.
virtual bool UseTranspose() const =0
Returns the current UseTranspose setting.
virtual void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
Redefined from Teuchos::ParameterListAcceptor (Does Not Work)
virtual const Epetra_Comm & Comm() const =0
Returns a pointer to the Epetra_Comm communicator associated with this operator.
virtual int NumericFactorization()=0
Performs NumericFactorization on the matrix A.
virtual int NumSymbolicFact() const =0
Returns the number of symbolic factorizations performed by this object.
virtual int SymbolicFactorization()=0
Performs SymbolicFactorization on the matrix A.
virtual int SetUseTranspose(bool UseTranspose)=0
If set true, X will be set to the solution of AT X = B (not A X = B)
virtual int NumSolve() const =0
Returns the number of solves performed by this object.
virtual int NumNumericFact() const =0
Returns the number of numeric factorizations performed by this object.
virtual void PrintStatus() const =0
Prints status information about the current solver.
virtual int SetParameters(Teuchos::ParameterList &ParameterList)=0
Updates internal variables.
virtual Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
This is an empty stub.
virtual Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
This is an empty stub.