Static Public Member Functions | Private Types | List of all members
Xpetra::MatrixMatrix< double, int, int, EpetraNode > Class Template Reference

#include <Xpetra_MatrixMatrix.hpp>

Static Public Member Functions

static void Multiply (const Xpetra::Matrix< SC, LO, GO, NO > &A, bool transposeA, const Xpetra::Matrix< SC, LO, GO, NO > &B, bool transposeB, Xpetra::Matrix< SC, LO, GO, NO > &C, bool call_FillComplete_on_result=true, bool doOptimizeStorage=true, const std::string &label=std::string())
 
static RCP< Xpetra::Matrix< SC, LO, GO, NO > > Multiply (const Matrix &A, bool transposeA, const Matrix &B, bool transposeB, RCP< Matrix > C_in, Teuchos::FancyOStream &fos, bool doFillComplete=true, bool doOptimizeStorage=true, const std::string &label=std::string())
 Helper function to do matrix-matrix multiply. More...
 
static RCP< Xpetra::Matrix< SC, LO, GO, NO > > Multiply (const Matrix &A, bool transposeA, const Matrix &B, bool transposeB, Teuchos::FancyOStream &fos, bool callFillCompleteOnResult=true, bool doOptimizeStorage=true, const std::string &label=std::string())
 Helper function to do matrix-matrix multiply. More...
 
static RCP< Epetra_CrsMatrix > MLTwoMatrixMultiply (const Epetra_CrsMatrix &epA, const Epetra_CrsMatrix &epB, Teuchos::FancyOStream &fos)
 
static RCP< Xpetra::BlockedCrsMatrix< SC, LO, GO, NO > > TwoMatrixMultiplyBlock (Xpetra::BlockedCrsMatrix< SC, LO, GO, NO > &A, bool transposeA, Xpetra::BlockedCrsMatrix< SC, LO, GO, NO > &B, bool transposeB, Teuchos::FancyOStream &fos, bool doFillComplete=true, bool doOptimizeStorage=true)
 Helper function to do matrix-matrix multiply "in-place". More...
 
static void TwoMatrixAdd (const Xpetra::Matrix< SC, LO, GO, NO > &A, bool transposeA, SC alpha, Xpetra::Matrix< SC, LO, GO, NO > &B, SC beta)
 Helper function to calculate B = alpha*A + beta*B. More...
 
static void TwoMatrixAdd (const Xpetra::Matrix< SC, LO, GO, NO > &A, bool transposeA, const SC &alpha, const Xpetra::Matrix< SC, LO, GO, NO > &B, bool transposeB, const SC &beta, RCP< Xpetra::Matrix< SC, LO, GO, NO > > &C, Teuchos::FancyOStream &fos, bool AHasFixedNnzPerRow=false)
 Helper function to calculate C = alpha*A + beta*B. More...
 

Private Types

typedef double SC
 
typedef int LO
 
typedef int GO
 
typedef EpetraNode NO
 
typedef Xpetra::Map< int, int, NOMap
 
typedef Xpetra::Matrix< double, int, int, NOMatrix
 
typedef Xpetra::MultiVector< double, int, int, NOMultiVector
 

Detailed Description

template<>
class Xpetra::MatrixMatrix< double, int, int, EpetraNode >

Definition at line 648 of file Xpetra_MatrixMatrix.hpp.

Member Typedef Documentation

typedef double Xpetra::MatrixMatrix< double, int, int, EpetraNode >::SC
private

Definition at line 649 of file Xpetra_MatrixMatrix.hpp.

typedef int Xpetra::MatrixMatrix< double, int, int, EpetraNode >::LO
private

Definition at line 650 of file Xpetra_MatrixMatrix.hpp.

typedef int Xpetra::MatrixMatrix< double, int, int, EpetraNode >::GO
private

Definition at line 651 of file Xpetra_MatrixMatrix.hpp.

typedef EpetraNode Xpetra::MatrixMatrix< double, int, int, EpetraNode >::NO
private

Definition at line 652 of file Xpetra_MatrixMatrix.hpp.

typedef Xpetra::Map<int,int,NO> Xpetra::MatrixMatrix< double, int, int, EpetraNode >::Map
private

Definition at line 654 of file Xpetra_MatrixMatrix.hpp.

typedef Xpetra::Matrix<double,int,int,NO> Xpetra::MatrixMatrix< double, int, int, EpetraNode >::Matrix
private

Definition at line 655 of file Xpetra_MatrixMatrix.hpp.

typedef Xpetra::MultiVector<double,int,int,NO> Xpetra::MatrixMatrix< double, int, int, EpetraNode >::MultiVector
private

Definition at line 656 of file Xpetra_MatrixMatrix.hpp.

Member Function Documentation

static void Xpetra::MatrixMatrix< double, int, int, EpetraNode >::Multiply ( const Xpetra::Matrix< SC, LO, GO, NO > &  A,
bool  transposeA,
const Xpetra::Matrix< SC, LO, GO, NO > &  B,
bool  transposeB,
Xpetra::Matrix< SC, LO, GO, NO > &  C,
bool  call_FillComplete_on_result = true,
bool  doOptimizeStorage = true,
const std::string &  label = std::string() 
)
inlinestatic

Given CrsMatrix objects A, B and C, form the product C = A*B. In a parallel setting, A and B need not have matching distributions, but C needs to have the same row-map as A (if transposeA is false). At this time C=AT*B and C=A*BT are known to not work. However, C=A*B and C=AT*BT are known to work, Kurtis Nusbaum 03/24/2011

Parameters
AInput, must already have had 'FillComplete()' called.
transposeAInput, whether to use transpose of matrix A.
BInput, must already have had 'FillComplete()' called.
transposeBInput, whether to use transpose of matrix B.
CResult. On entry to this method, it doesn't matter whether FillComplete() has already been called on C or not. If it has, then C's graph must already contain all nonzero locations that will be produced when forming the product A*B. On exit, C.FillComplete() will have been called, unless the last argument to this function is specified to be false.
call_FillComplete_on_resultOptional argument, defaults to true. Power users may specify this argument to be false if they DON'T want this function to call C.FillComplete. (It is often useful to allow this function to call C.FillComplete, in cases where one or both of the input matrices are rectangular and it is not trivial to know which maps to use for the domain- and range-maps.)

Definition at line 684 of file Xpetra_MatrixMatrix.hpp.

static RCP<Xpetra::Matrix<SC,LO,GO,NO> > Xpetra::MatrixMatrix< double, int, int, EpetraNode >::Multiply ( const Matrix A,
bool  transposeA,
const Matrix B,
bool  transposeB,
RCP< Matrix C_in,
Teuchos::FancyOStream fos,
bool  doFillComplete = true,
bool  doOptimizeStorage = true,
const std::string &  label = std::string() 
)
inlinestatic

Helper function to do matrix-matrix multiply.

Given CrsMatrix objects A, B and C, form the product C = A*B. In a parallel setting, A and B need not have matching distributions, but C needs to have the same row-map as A (if transposeA is false). At this time C=AT*B and C=A*BT are known to not work. However, C=A*B and C=AT*BT are known to work, Kurtis Nusbaum 03/24/2011

Parameters
AInput, must already have had 'FillComplete()' called.
transposeAInput, whether to use transpose of matrix A.
BInput, must already have had 'FillComplete()' called.
transposeBInput, whether to use transpose of matrix B.
CResult. If Teuchos::null, a new CrsMatrix is created with optimal number of nnz per row.
call_FillComplete_on_resultOptional argument, defaults to true. Power users may specify this argument to be false if they DON'T want this function to call C.FillComplete. (It is often useful to allow this function to call C.FillComplete, in cases where one or both of the input matrices are rectangular and it is not trivial to know which maps to use for the domain- and range-maps.)

Definition at line 792 of file Xpetra_MatrixMatrix.hpp.

static RCP<Xpetra::Matrix<SC,LO,GO,NO> > Xpetra::MatrixMatrix< double, int, int, EpetraNode >::Multiply ( const Matrix A,
bool  transposeA,
const Matrix B,
bool  transposeB,
Teuchos::FancyOStream fos,
bool  callFillCompleteOnResult = true,
bool  doOptimizeStorage = true,
const std::string &  label = std::string() 
)
inlinestatic

Helper function to do matrix-matrix multiply.

Returns C = AB.

Parameters
Aleft matrix
transposeAif true, use the transpose of A
Bright matrix
transposeBif true, use the transpose of B
callFillCompleteOnResultif true, the resulting matrix should be fillComplete'd

Definition at line 872 of file Xpetra_MatrixMatrix.hpp.

static RCP<Epetra_CrsMatrix> Xpetra::MatrixMatrix< double, int, int, EpetraNode >::MLTwoMatrixMultiply ( const Epetra_CrsMatrix &  epA,
const Epetra_CrsMatrix &  epB,
Teuchos::FancyOStream fos 
)
inlinestatic

Definition at line 885 of file Xpetra_MatrixMatrix.hpp.

static RCP<Xpetra::BlockedCrsMatrix<SC,LO,GO,NO> > Xpetra::MatrixMatrix< double, int, int, EpetraNode >::TwoMatrixMultiplyBlock ( Xpetra::BlockedCrsMatrix< SC, LO, GO, NO > &  A,
bool  transposeA,
Xpetra::BlockedCrsMatrix< SC, LO, GO, NO > &  B,
bool  transposeB,
Teuchos::FancyOStream fos,
bool  doFillComplete = true,
bool  doOptimizeStorage = true 
)
inlinestatic

Helper function to do matrix-matrix multiply "in-place".

Returns RCP to non-constant Xpetra::BlockedCrsMatrix.

Parameters
Aleft matrix
transposeAif true, use the transpose of A
Bright matrix
transposeBif true, use the transpose of B
doOptimizeStorageif true, the resulting matrix should be fillComplete'd

Definition at line 1030 of file Xpetra_MatrixMatrix.hpp.

static void Xpetra::MatrixMatrix< double, int, int, EpetraNode >::TwoMatrixAdd ( const Xpetra::Matrix< SC, LO, GO, NO > &  A,
bool  transposeA,
SC  alpha,
Xpetra::Matrix< SC, LO, GO, NO > &  B,
SC  beta 
)
inlinestatic

Helper function to calculate B = alpha*A + beta*B.

Parameters
Aleft matrix operand
transposeAindicate whether to use transpose of A
alphascalar multiplier for A
Bright matrix operand
betascalar multiplier for B
Returns
sum in B.

Note that B does not have to be fill-completed.

Definition at line 1113 of file Xpetra_MatrixMatrix.hpp.

static void Xpetra::MatrixMatrix< double, int, int, EpetraNode >::TwoMatrixAdd ( const Xpetra::Matrix< SC, LO, GO, NO > &  A,
bool  transposeA,
const SC alpha,
const Xpetra::Matrix< SC, LO, GO, NO > &  B,
bool  transposeB,
const SC beta,
RCP< Xpetra::Matrix< SC, LO, GO, NO > > &  C,
Teuchos::FancyOStream fos,
bool  AHasFixedNnzPerRow = false 
)
inlinestatic

Helper function to calculate C = alpha*A + beta*B.

Parameters
Aleft matrix operand
transposeAindicate whether to use transpose of A
alphascalar multiplier for A, defaults to 1.0
Bright matrix operand
transposeBindicate whether to use transpose of B
betascalar multiplier for B, defaults to 1.0
Cresulting sum

It is up to the caller to ensure that the resulting matrix sum is fillComplete'd.

Definition at line 1161 of file Xpetra_MatrixMatrix.hpp.


The documentation for this class was generated from the following file: