Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
Tpetra::TripleMatrixMultiply Namespace Reference

Distributed sparse triple matrix product. More...

Functions

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void MultiplyRAP (const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &R, bool transposeR, const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, bool transposeA, const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &P, bool transposeP, CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Ac, bool call_FillComplete_on_result=true, const std::string &label=std::string(), const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Sparse matrix-matrix multiply. More...
 

Detailed Description

Distributed sparse triple matrix product.

This namespace includes functions the product of three distributed sparse matrices, each of which is represented as a Tpetra::CrsMatrix.

Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::TripleMatrixMultiply::MultiplyRAP ( const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  R,
bool  transposeR,
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
bool  transposeA,
const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  P,
bool  transposeP,
CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Ac,
bool  call_FillComplete_on_result = true,
const std::string &  label = std::string(),
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Sparse matrix-matrix multiply.

Given CrsMatrix instances R, A and P, compute the product Ac = R*A*P, overwriting an existing CrsMatrix instance Ac with the result.

Precondition
All four matrices R, A, P, and Ac must have uniquely owned row Maps.
On input, Ac must have the same row Map as R.
R, A and P must be fill complete.
If Ac has a range Map on input, then Ac and R must have the same range Maps.
If Ac has a domain Map on input, then P and Ac must have the same domain Maps.

For the latter two preconditions, recall that a matrix does not have a domain or range Map unless fillComplete has been called on it at least once.

Parameters
R[in] fill-complete sparse matrix.
transposeR[in] Whether to use transpose of matrix R.
A[in] fill-complete sparse matrix.
transposeR[in] Whether to use transpose of matrix A.
P[in] fill-complete sparse matrix.
transposeB[in] Whether to use transpose of matrix P.
Ac[in/out] On entry to this method, if Ac is fill complete, then Ac's graph must have the correct structure, that is, its structure must equal the structure of R*A*P. (This is currently not implemented.) On exit, C will be fill complete, unless the last argument to this function is false.
call_FillComplete_on_result[in] Optional argument; defaults to true. If false, C will not be fill complete on output.

Definition at line 91 of file TpetraExt_TripleMatrixMultiply_def.hpp.