Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Ifpack2_Details_LinearSolver_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
4 //
5 // Copyright 2009 NTESS and the Ifpack2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
13 
14 #ifndef IFPACK2_DETAILS_LINEARSOLVER_DECL_HPP
15 #define IFPACK2_DETAILS_LINEARSOLVER_DECL_HPP
16 
17 #include "Ifpack2_ConfigDefs.hpp"
20 #include "Teuchos_Describable.hpp"
21 
22 namespace Ifpack2 {
23 namespace Details {
24 
71 template <class SC, class LO, class GO, class NT>
72 class LinearSolver : public Trilinos::Details::LinearSolver<Tpetra::MultiVector<SC, LO, GO, NT>,
73  Tpetra::Operator<SC, LO, GO, NT>,
74  typename Tpetra::MultiVector<SC, LO, GO, NT>::mag_type>,
75  virtual public Teuchos::Describable {
76  public:
78  typedef Tpetra::Operator<SC, LO, GO, NT> OP;
79  typedef Tpetra::MultiVector<SC, LO, GO, NT> MV;
80 
92  LinearSolver(const Teuchos::RCP<prec_type>& solver, const std::string& solverName);
93 
95  virtual ~LinearSolver() {}
96 
101  void setMatrix(const Teuchos::RCP<const OP>& A);
102 
105 
107  void solve(MV& X, const MV& B);
108 
111 
113  void symbolic();
114 
116  void numeric();
117 
119  std::string description() const;
120 
122  void
124  const Teuchos::EVerbosityLevel verbLevel =
126 
127  private:
129  Teuchos::RCP<prec_type> solver_;
131  std::string solverName_;
134 };
135 
136 } // namespace Details
137 } // namespace Ifpack2
138 
139 #endif // IFPACK2_DETAILS_LINEARSOLVER_DECL_HPP
virtual ~LinearSolver()
Destructor (virtual for memory safety).
Definition: Ifpack2_Details_LinearSolver_decl.hpp:95
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:36
void solve(MV &X, const MV &B)
Solve the linear system AX=B for X.
Definition: Ifpack2_Details_LinearSolver_def.hpp:93
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Implementation of Teuchos::Describable::describe.
Definition: Ifpack2_Details_LinearSolver_def.hpp:149
Teuchos::RCP< const OP > getMatrix() const
Get the solver&#39;s matrix.
Definition: Ifpack2_Details_LinearSolver_def.hpp:87
void symbolic()
Precompute for matrix structure changes.
Definition: Ifpack2_Details_LinearSolver_def.hpp:112
void setMatrix(const Teuchos::RCP< const OP > &A)
Set the solver&#39;s matrix.
Definition: Ifpack2_Details_LinearSolver_def.hpp:52
Ifpack2&#39;s implementation of Trilinos::Details::LinearSolver interface.
Definition: Ifpack2_Details_LinearSolver_decl.hpp:72
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:74
void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)
Set the solver&#39;s parameters.
Definition: Ifpack2_Details_LinearSolver_def.hpp:106
void numeric()
Precompute for matrix values&#39; changes.
Definition: Ifpack2_Details_LinearSolver_def.hpp:125
static const EVerbosityLevel verbLevel_default
std::string description() const
Implementation of Teuchos::Describable::description.
Definition: Ifpack2_Details_LinearSolver_def.hpp:139
LinearSolver(const Teuchos::RCP< prec_type > &solver, const std::string &solverName)
Constructor.
Definition: Ifpack2_Details_LinearSolver_def.hpp:33