EpetraExt::MatrixMatrix Class Reference

Collection of matrix-matrix operations. More...

#include <EpetraExt_MatrixMatrix.h>

List of all members.

Public Member Functions

virtual ~MatrixMatrix ()
 destructor

Static Public Member Functions

static int Multiply (const Epetra_CrsMatrix &A, bool transposeA, const Epetra_CrsMatrix &B, bool transposeB, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true)
 Given Epetra_CrsMatrix objects A, B and C, form the product C = A*B.
static int Add (const Epetra_CrsMatrix &A, bool transposeA, double scalarA, Epetra_CrsMatrix &B, double scalarB)
 Given Epetra_CrsMatrix objects A and B, form the sum B = a*A + b*B.


Detailed Description

Collection of matrix-matrix operations.

This class basically functions as a namespace, containing only static methods. See the program epetraext/test/MatrixMatrix/cxx_main.cpp for a usage example.

Definition at line 42 of file EpetraExt_MatrixMatrix.h.


Constructor & Destructor Documentation

virtual EpetraExt::MatrixMatrix::~MatrixMatrix (  )  [inline, virtual]

destructor

Definition at line 46 of file EpetraExt_MatrixMatrix.h.


Member Function Documentation

int EpetraExt::MatrixMatrix::Multiply ( const Epetra_CrsMatrix A,
bool  transposeA,
const Epetra_CrsMatrix B,
bool  transposeB,
Epetra_CrsMatrix C,
bool  call_FillComplete_on_result = true 
) [static]

Given Epetra_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.

Parameters:
A Input, must already have had 'FillComplete()' called.
transposeA Input, whether to use transpose of matrix A.
B Input, must already have had 'FillComplete()' called.
transposeB Input, whether to use transpose of matrix B.
C Result. 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_result Optional 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.)
Returns:
error-code, 0 if successful. non-zero returns may result if A or B are not already Filled, or if errors occur in putting values into C, etc.

Definition at line 1104 of file EpetraExt_MatrixMatrix.cpp.

int EpetraExt::MatrixMatrix::Add ( const Epetra_CrsMatrix A,
bool  transposeA,
double  scalarA,
Epetra_CrsMatrix B,
double  scalarB 
) [static]

Given Epetra_CrsMatrix objects A and B, form the sum B = a*A + b*B.

Parameters:
A Input, must already have had 'FillComplete()' called.
transposeA Input, whether to use transpose of matrix A.
scalarA Input, scalar multiplier for matrix A.
B Result. On entry to this method, it doesn't matter whether FillComplete() has already been called on B or not. If it has, then B's graph must already contain all nonzero locations that will be produced when forming the sum.
scalarB Input, scalar multiplier for matrix B.
Returns:
error-code, 0 if successful. non-zero returns may result if A is not already Filled, or if errors occur in putting values into B, etc.

Definition at line 1274 of file EpetraExt_MatrixMatrix.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Oct 20 12:45:33 2009 for EpetraExt by doxygen 1.4.7