10 #ifndef TPETRA_LINEARPROBLEM_DECL_HPP
11 #define TPETRA_LINEARPROBLEM_DECL_HPP
16 #include "Teuchos_DataAccess.hpp"
20 #include "Tpetra_RowMatrix_decl.hpp"
21 #include "Tpetra_DistObject.hpp"
22 #include "Tpetra_Details_ExecutionSpacesUser.hpp"
43 template <
class Scalar,
80 const Teuchos::RCP<multivector_type>& X,
81 const Teuchos::RCP<multivector_type>& B);
85 GlobalOrdinal, Node>& Problem);
119 void setMatrix(Teuchos::RCP<row_matrix_type> A) { A_ = A; }
124 void setLHS(Teuchos::RCP<multivector_type> X) { X_ = X; }
129 void setRHS(Teuchos::RCP<multivector_type> B) { B_ = B; }
147 void leftScale(
const Teuchos::RCP<const vector_type>& D,
148 Teuchos::ETransp mode = Teuchos::NO_TRANS);
163 void rightScale(
const Teuchos::RCP<const vector_type>& D,
164 Teuchos::ETransp mode = Teuchos::NO_TRANS);
172 Teuchos::RCP<row_matrix_type>
getMatrix()
const {
return (A_); }
174 Teuchos::RCP<multivector_type>
getLHS()
const {
return (X_); }
176 Teuchos::RCP<multivector_type>
getRHS()
const {
return (B_); }
181 Teuchos::RCP<row_matrix_type> A_;
182 Teuchos::RCP<multivector_type> X_;
183 Teuchos::RCP<multivector_type> B_;
186 GlobalOrdinal, Node>& Problem) =
default;
191 #endif // TPETRA_LINEARPROBLEM_DECL_HPP
Class that encapulates linear problem (Ax = b).
Teuchos::RCP< row_matrix_type > getMatrix() const
Get an RCP to the matrix A.
void checkInput() const
Check input parameters for existence and size consistency.
Declaration of the Tpetra::Vector class.
void setMatrix(Teuchos::RCP< row_matrix_type > A)
Set Matrix A of linear problem AX = B using a RowMatrix.
void rightScale(const Teuchos::RCP< const vector_type > &D, Teuchos::ETransp mode=Teuchos::NO_TRANS)
Perform right scaling of a linear problem.
void setRHS(Teuchos::RCP< multivector_type > B)
Set right-hand-side B of linear problem AX = B.
Declaration of the Tpetra::MultiVector class.
void setLHS(Teuchos::RCP< multivector_type > X)
Set left-hand-side X of linear problem AX = B.
LinearProblem()
Default Constructor.
A class can inherit from this if it wants to use Tpetra managed spaces.
virtual bool checkSizes(const SrcDistObject &source) override
Compare the source and target (this) objects for compatibility.
Abstract base class for objects that can be the source of an Import or Export operation.
Teuchos::RCP< multivector_type > getLHS() const
Get an RCP to the left-hand-side X.
A parallel distribution of indices over processes.
A read-only, row-oriented interface to a sparse matrix.
A distributed dense vector.
Teuchos::RCP< multivector_type > getRHS() const
Get an RCP to the right-hand-side B.
void leftScale(const Teuchos::RCP< const vector_type > &D, Teuchos::ETransp mode=Teuchos::NO_TRANS)
Perform left scaling of a linear problem.
Base class for distributed Tpetra objects that support data redistribution.
virtual ~LinearProblem()=default
LinearProblem Destructor.