Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Trilinos_Details_LinearSolver.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef TRILINOS_DETAILS_LINEARSOLVER_HPP
11 #define TRILINOS_DETAILS_LINEARSOLVER_HPP
12 
23 
24 #include "TeuchosRemainder_config.h"
25 #include "Teuchos_RCP.hpp"
26 
27 namespace Teuchos {
28  // Forward declaration of ParameterList. If you actually want to
29  // _use_ ParameterList, you MUST include Teuchos_ParameterList.hpp.
30  class ParameterList;
31 } // namespace Teuchos
32 
35 namespace Trilinos {
36 
43 namespace Details {
44 
113 template<class MV, class OP, class NormType>
115 public:
117  virtual ~LinearSolver () {}
118 
144  virtual void setMatrix (const Teuchos::RCP<const OP>& A) = 0;
145 
155  virtual Teuchos::RCP<const OP> getMatrix () const = 0;
156 
171  virtual void solve (MV& X, const MV& B) = 0;
172 
195  virtual void setParameters (const Teuchos::RCP<Teuchos::ParameterList>& params) = 0;
196 
214  virtual void symbolic () = 0;
215 
229  virtual void numeric () = 0;
230 };
231 
232 } // namespace Details
233 } // namespace Trilinos
234 
235 #endif // TRILINOS_DETAILS_LINEARSOLVER_HPP
virtual void solve(MV &X, const MV &B)=0
Solve the linear system(s) AX=B.
virtual ~LinearSolver()
Destructor (virtual for memory safety of derived classes).
Interface for a method for solving linear system(s) AX=B.
virtual void setMatrix(const Teuchos::RCP< const OP > &A)=0
Set the solver&#39;s matrix.
virtual Teuchos::RCP< const OP > getMatrix() const =0
Get a pointer to this solver&#39;s matrix.
virtual void numeric()=0
Set up any part of the solve that depends on both the structure and the numerical values of the input...
virtual void symbolic()=0
Set up any part of the solve that depends on the structure of the input matrix, but not its numerical...
Reference-counted pointer class and non-member templated function implementations.
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)=0
Set this solver&#39;s parameters.