Collection of matrix-matrix operations.
More...
#include <EpetraExt_MatrixMatrix.h>
|
static int | Multiply (const Epetra_CrsMatrix &A, bool transposeA, const Epetra_CrsMatrix &B, bool transposeB, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true, bool keep_all_hard_zeros=false) |
| Given Epetra_CrsMatrix objects A, B and C, form the product C = A*B. More...
|
|
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. More...
|
|
static int | Add (const Epetra_CrsMatrix &A, bool transposeA, double scalarA, const Epetra_CrsMatrix &B, bool transposeB, double scalarB, Epetra_CrsMatrix *&C) |
| Given Epetra_CrsMatrix objects A and B, form the sum C = a*A + b*B. More...
|
|
static int | Jacobi (double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, Epetra_CrsMatrix &C, bool call_FillComplete_on_result=true) |
| Given Epetra_CrsMatrix objects A, B and C, and Epetra_Vector Dinv, form the product C = (I-omega * Dinv 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. More...
|
|
|
template<typename int_type > |
static int | Tmult_A_B (const Epetra_CrsMatrix &A, CrsMatrixStruct &Aview, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool call_FillComplete_on_result, bool keep_all_hard_zeros) |
|
static int | mult_A_B (const Epetra_CrsMatrix &A, CrsMatrixStruct &Aview, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool call_FillComplete_on_result, bool keep_all_hard_zeros) |
|
template<typename int_type > |
static int | Tmult_AT_B_newmatrix (const CrsMatrixStruct &Atransview, const CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool keep_all_hard_zeros) |
|
static int | mult_AT_B_newmatrix (const CrsMatrixStruct &Atransview, const CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool keep_all_hard_zeros) |
|
template<typename int_type > |
static int | TMultiply (const Epetra_CrsMatrix &A, bool transposeA, const Epetra_CrsMatrix &B, bool transposeB, Epetra_CrsMatrix &C, bool call_FillComplete_on_result, bool keep_all_hard_zeros) |
|
template<typename int_type > |
static int | TAdd (const Epetra_CrsMatrix &A, bool transposeA, double scalarA, Epetra_CrsMatrix &B, double scalarB) |
|
template<typename int_type > |
static int | TAdd (const Epetra_CrsMatrix &A, bool transposeA, double scalarA, const Epetra_CrsMatrix &B, bool transposeB, double scalarB, Epetra_CrsMatrix *&C) |
|
template<typename int_type > |
static int | Tjacobi_A_B (double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, CrsMatrixStruct &Aview, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool call_FillComplete_on_result) |
|
static int | jacobi_A_B (double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, CrsMatrixStruct &Aview, const Epetra_CrsMatrix &B, CrsMatrixStruct &Bview, Epetra_CrsMatrix &C, bool call_FillComplete_on_result) |
|
template<typename int_type > |
static int | TJacobi (double omega, const Epetra_Vector &Dinv, const Epetra_CrsMatrix &A, const Epetra_CrsMatrix &B, Epetra_CrsMatrix &C, bool call_FillComplete_on_result) |
|
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 63 of file EpetraExt_MatrixMatrix.h.
virtual EpetraExt::MatrixMatrix::~MatrixMatrix |
( |
| ) |
|
|
inlinevirtual |
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.) |
keep_all_hard_zeros | Optional argument, defaults to false. If true, Multiply, keeps all entries in C corresponding to hard zeros. If false, the following happens by case: A*B^T, A^T*B^T - Does not store entries caused by hard zeros in C. A^T*B (unoptimized) - Hard zeros are always stored (this option has no effect) A*B, A^T*B (optimized) - Hard zeros in corresponding to hard zeros in A are not stored, There are certain cases involving reuse of C, where this can be useful. |
- 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 1304 of file EpetraExt_MatrixMatrix.cpp.
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 1423 of file EpetraExt_MatrixMatrix.cpp.
Given Epetra_CrsMatrix objects A and B, form the sum C = 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 | Input, must already have had 'FillComplete()' called. |
transposeB | Input, whether to use transpose of matrix B. |
scalarB | Input, scalar multiplier for matrix B. |
C | Result. On entry to this method, C can be NULL or a pointer to an unfilled or filled matrix. If C is NULL then a new object is allocated and must be deleted by the user. If C is not NULL and FillComplete has already been called then the sparsity pattern is assumed to be fixed and compatible with the sparsity of A+B. If FillComplete has not been called then the sum is completed and the function returns without calling FillComplete on C. |
- Returns
- error-code, 0 if successful. non-zero returns may result if A or is not already Filled, or if errors occur in putting values into C, etc.
Definition at line 1532 of file EpetraExt_MatrixMatrix.cpp.
Given Epetra_CrsMatrix objects A, B and C, and Epetra_Vector Dinv, form the product C = (I-omega * Dinv 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
-
omega | Input, scalar multiplier for Dinverse A |
Dinv | Input, Epetra_Vector representing a diagonal matrix, must match A's RowMap |
A | Input, must already have had 'FillComplete()' called. |
B | Input, must already have had 'FillComplete()' called. |
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 1695 of file EpetraExt_MatrixMatrix.cpp.
template<typename int_type >
template<typename int_type >
template<typename int_type >
template<typename int_type >
template<typename int_type >
template<typename int_type >
template<typename int_type >
The documentation for this class was generated from the following files: