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"
43template <
class Scalar,
80 const Teuchos::RCP<multivector_type>&
X,
81 const Teuchos::RCP<multivector_type>&
B);
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_;
Declaration of the Tpetra::MultiVector class.
Declaration of the Tpetra::Vector class.
Struct that holds views of the contents of a CrsMatrix.
A class can inherit from this if it wants to use Tpetra managed spaces.
Base class for distributed Tpetra objects that support data redistribution.
Class that encapulates linear problem (Ax = b).
virtual bool checkSizes(const SrcDistObject &source) override
Compare the source and target (this) objects for compatibility.
Teuchos::RCP< row_matrix_type > getMatrix() const
Get an RCP to the matrix A.
void rightScale(const Teuchos::RCP< const vector_type > &D, Teuchos::ETransp mode=Teuchos::NO_TRANS)
Perform right scaling of a linear problem.
Teuchos::RCP< multivector_type > getLHS() const
Get an RCP to the left-hand-side X.
LinearProblem()
Default Constructor.
Teuchos::RCP< multivector_type > getRHS() const
Get an RCP to the right-hand-side B.
void setMatrix(Teuchos::RCP< row_matrix_type > A)
Set Matrix A of linear problem AX = B using a RowMatrix.
void leftScale(const Teuchos::RCP< const vector_type > &D, Teuchos::ETransp mode=Teuchos::NO_TRANS)
Perform left scaling of a linear problem.
void setRHS(Teuchos::RCP< multivector_type > B)
Set right-hand-side B of linear problem AX = B.
void checkInput() const
Check input parameters for existence and size consistency.
void setLHS(Teuchos::RCP< multivector_type > X)
Set left-hand-side X of linear problem AX = B.
virtual ~LinearProblem()=default
LinearProblem Destructor.
One or more distributed dense vectors.
A read-only, row-oriented interface to a sparse matrix.
Abstract base class for objects that can be the source of an Import or Export operation.
A distributed dense vector.
Namespace Tpetra contains the class and methods constituting the Tpetra library.