|
Tpetra Matrix/Vector Services
Version of the Day
|
Wrap a CrsMatrix instance's triangular solve in an Operator. More...
#include <Tpetra_CrsMatrixSolveOp_decl.hpp>

Public Types | |
Typedefs that give access to the template parameters. | |
| typedef Scalar | scalar_type |
| The type of the entries of the input and output multivectors. More... | |
| typedef LocalOrdinal | local_ordinal_type |
| The local index type. More... | |
| typedef GlobalOrdinal | global_ordinal_type |
| The global index type. More... | |
| typedef Node | node_type |
| The Kokkos Node type. More... | |
Public Member Functions | |
Constructor and destructor | |
| CrsMatrixSolveOp (const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > &A) | |
| Constructor; takes a CrsMatrix to use for local triangular solves. More... | |
| virtual | ~CrsMatrixSolveOp () |
| Destructor. More... | |
Implementation of Operator | |
| void | apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const |
Compute , where represents the result of the local triangular solve. More... | |
| bool | hasTransposeApply () const |
| Whether apply() can solve with the (conjugate) transpose of the matrix. More... | |
| const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | getDomainMap () const |
| const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | getRangeMap () const |
Protected Member Functions | |
| void | applyNonTranspose (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y) const |
| Do the non-transpose solve. More... | |
| void | applyTranspose (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y) const |
| Do the transpose solve. More... | |
Protected Attributes | |
| const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > | matrix_ |
| The underlying CrsMatrix. More... | |
| Teuchos::RCP< MV > | importMV_ |
| Cached temporary destination of Import operation in apply(). More... | |
| Teuchos::RCP< MV > | exportMV_ |
| Cached temporary source of Export operation in apply(). More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar , class MatScalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps > | |
| Teuchos::RCP< CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > | createCrsMatrixSolveOp (const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > &A) |
| Non-member function to create CrsMatrixSolveOp. More... | |
Wrap a CrsMatrix instance's triangular solve in an Operator.
| Scalar | Same as the first template parameter of Operator. The type of the entries of the MultiVector input and output of apply(). Not necessarily the same as the first template parameter of the CrsMatrix used to create this object. |
| MatScalar | Same as the first template parameter of CrsMatrix. The type of the entries of the sparse matrix. Not necessarily the same as the type of the entries of the MultiVector input and output of apply(). |
| LocalOrdinal | Same as the second template parameter of CrsMatrix and Operator. |
| GlobalOrdinal | Same as the third template parameter of CrsMatrix and Operator. |
| Node | Same as the fourth template parameter of CrsMatrix and Operator. |
| LocalMatOps | Same as the fifth template parameter of CrsMatrix. |
This class' apply() method does a "local" triangular solve. "Local" is in quotes because apply() does the same communication (Import and Export) operations that CrsMatrix's apply() method would do for a sparse matrix-vector multiply, but the triangular solve is restricted to each process' part of the data. Thus, it is not a triangular solve of a fully distributed triangular matrix.
Here are some situations where this operation is useful:
MatScalar of entries in the matrix differs from the type Scalar of entries in the MultiVector input and output of apply(). Definition at line 100 of file Tpetra_CrsMatrixSolveOp_decl.hpp.
|
inherited |
The type of the entries of the input and output multivectors.
Definition at line 83 of file Tpetra_Operator.hpp.
|
inherited |
The local index type.
Definition at line 87 of file Tpetra_Operator.hpp.
|
inherited |
The global index type.
Definition at line 91 of file Tpetra_Operator.hpp.
|
inherited |
The Kokkos Node type.
Definition at line 95 of file Tpetra_Operator.hpp.
| Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::CrsMatrixSolveOp | ( | const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > & | A | ) |
Constructor; takes a CrsMatrix to use for local triangular solves.
|
virtual |
Destructor.
|
virtual |
Compute
, where
represents the result of the local triangular solve.
Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
|
virtual |
Whether apply() can solve with the (conjugate) transpose of the matrix.
Reimplemented from Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
|
virtual |
The domain Map of this operator. This is the range map of the underlying CrsMatrix.
Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
|
virtual |
The range Map of this operator. This is the domain Map of the underlying CrsMatrix.
Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
|
protected |
Do the non-transpose solve.
|
protected |
Do the transpose solve.
|
related |
Non-member function to create CrsMatrixSolveOp.
|
protected |
The underlying CrsMatrix.
Definition at line 140 of file Tpetra_CrsMatrixSolveOp_decl.hpp.
|
mutableprotected |
Cached temporary destination of Import operation in apply().
Definition at line 143 of file Tpetra_CrsMatrixSolveOp_decl.hpp.
|
mutableprotected |
Cached temporary source of Export operation in apply().
Definition at line 145 of file Tpetra_CrsMatrixSolveOp_decl.hpp.
1.8.11