Tpetra Matrix/Vector Services Version of the Day
Protected Member Functions | Protected Attributes | Related Functions
Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > Class Template Reference

Wrap a CrsMatrix instance's triangular solve in an Operator. More...

#include <Tpetra_CrsMatrixSolveOp_decl.hpp>

Inheritance diagram for Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >:
Inheritance graph
[legend]

List of all members.

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.
typedef LocalOrdinal local_ordinal_type
 The local index type.
typedef GlobalOrdinal global_ordinal_type
 The global index type.
typedef Node node_type
 The Kokkos Node type.

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.
virtual ~CrsMatrixSolveOp ()
 Destructor.
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 $Y = \beta Y + \alpha B X$, where $B X$ represents the result of the local triangular solve.
bool hasTransposeApply () const
 Whether apply() can solve with the (conjugate) transpose of the matrix.
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getDomainMap () 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.
void applyTranspose (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y) const
 Do the transpose solve.

Protected Attributes

const Teuchos::RCP< const
CrsMatrix< MatScalar,
LocalOrdinal, GlobalOrdinal,
Node, LocalMatOps > > 
matrix_
 The underlying CrsMatrix.
Teuchos::RCP< MVimportMV_
 Cached temporary destination of Import operation in apply().
Teuchos::RCP< MVexportMV_
 Cached temporary source of Export operation in apply().

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.

Detailed Description

template<class Scalar, class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
class Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >

Wrap a CrsMatrix instance's triangular solve in an Operator.

Template Parameters:
ScalarSame 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.
MatScalarSame 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().
LocalOrdinalSame as the second template parameter of CrsMatrix and Operator.
GlobalOrdinalSame as the third template parameter of CrsMatrix and Operator.
NodeSame as the fourth template parameter of CrsMatrix and Operator.
LocalMatOpsSame 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:

Definition at line 100 of file Tpetra_CrsMatrixSolveOp_decl.hpp.


Member Typedef Documentation

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Scalar Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type [inherited]
template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef LocalOrdinal Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type [inherited]
template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef GlobalOrdinal Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type [inherited]
template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
typedef Node Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type [inherited]

Constructor & Destructor Documentation

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
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.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
virtual Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::~CrsMatrixSolveOp ( ) [virtual]

Destructor.


Member Function Documentation

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
void Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::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 [virtual]

Compute $Y = \beta Y + \alpha B X$, where $B X$ represents the result of the local triangular solve.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
bool Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::hasTransposeApply ( ) const [virtual]

Whether apply() can solve with the (conjugate) transpose of the matrix.

Reimplemented from Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getDomainMap ( ) const [virtual]

The domain Map of this operator. This is the range map of the underlying CrsMatrix.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::getRangeMap ( ) const [virtual]

The range Map of this operator. This is the domain Map of the underlying CrsMatrix.

Implements Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
void Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::applyNonTranspose ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y 
) const [protected]

Do the non-transpose solve.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
void Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::applyTranspose ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y 
) const [protected]

Do the transpose solve.


Friends And Related Function Documentation

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) [related]

Non-member function to create CrsMatrixSolveOp.


Member Data Documentation

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
const Teuchos::RCP<const CrsMatrix<MatScalar,LocalOrdinal,GlobalOrdinal,Node,LocalMatOps> > Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::matrix_ [protected]

The underlying CrsMatrix.

Definition at line 140 of file Tpetra_CrsMatrixSolveOp_decl.hpp.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
Teuchos::RCP<MV> Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::importMV_ [mutable, protected]

Cached temporary destination of Import operation in apply().

Definition at line 143 of file Tpetra_CrsMatrixSolveOp_decl.hpp.

template<class Scalar , class MatScalar = Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType, class LocalMatOps = typename KokkosClassic::DefaultKernels<MatScalar,LocalOrdinal,Node>::SparseOps>
Teuchos::RCP<MV> Tpetra::CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >::exportMV_ [mutable, protected]

Cached temporary source of Export operation in apply().

Definition at line 145 of file Tpetra_CrsMatrixSolveOp_decl.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines