Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
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
27namespace 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
35namespace Trilinos {
36
43namespace Details {
44
113template<class MV, class OP, class NormType>
115public:
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
Reference-counted pointer class and non-member templated function implementations.
Smart reference counting pointer class for automatic garbage collection.
Interface for a method for solving linear system(s) AX=B.
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...
virtual void setMatrix(const Teuchos::RCP< const OP > &A)=0
Set the solver's matrix.
virtual void solve(MV &X, const MV &B)=0
Solve the linear system(s) AX=B.
virtual Teuchos::RCP< const OP > getMatrix() const =0
Get a pointer to this solver's matrix.
virtual ~LinearSolver()
Destructor (virtual for memory safety of derived classes).
virtual void setParameters(const Teuchos::RCP< Teuchos::ParameterList > &params)=0
Set this solver's parameters.
Namespace of implementation details.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Namespace of things generally useful to many Trilinos packages.