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,
48 public DistObject<Scalar, LocalOrdinal, GlobalOrdinal, Node>,
83 const Teuchos::RCP<multivector_type>& X,
84 const Teuchos::RCP<multivector_type>& B);
88 GlobalOrdinal, Node>& Problem);
129 void setLHS(Teuchos::RCP<multivector_type> X) {X_ = X;}
134 void setRHS(Teuchos::RCP<multivector_type> B) {B_ = B;}
152 void leftScale(
const Teuchos::RCP<const vector_type> & D,
153 Teuchos::ETransp mode = Teuchos::NO_TRANS);
168 void rightScale(
const Teuchos::RCP<const vector_type> & D,
169 Teuchos::ETransp mode = Teuchos::NO_TRANS);
177 Teuchos::RCP<row_matrix_type>
getMatrix()
const {
return(A_);}
179 Teuchos::RCP<multivector_type>
getLHS()
const {
return(X_);}
181 Teuchos::RCP<multivector_type>
getRHS()
const {
return(B_);}
187 Teuchos::RCP<row_matrix_type> A_;
188 Teuchos::RCP<multivector_type> X_;
189 Teuchos::RCP<multivector_type> B_;
192 GlobalOrdinal, Node>& Problem) =
default;
197 #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.