#include <Komplex_RowMatrix.h>
Inheritance diagram for Komplex_RowMatrix:
Public Member Functions | |
Constructors/Destructor. | |
| Komplex_RowMatrix (Epetra_DataAccess CV, const Epetra_BlockMap &RowMap, int NumEntriesPerRow, Komplex_KForms KForm=K1) | |
| Default Komplex_RowMatrix constuctor with fixed number of indices per row. | |
| Komplex_RowMatrix (Epetra_DataAccess CV, const Epetra_BlockMap &RowMap, int *NumEntriesPerRow, Komplex_KForms KForm=K1) | |
| Default Komplex_RowMatrix constructor with variable number of indices per row. | |
| Komplex_RowMatrix (Epetra_DataAccess CV, const Epetra_BlockMap &RowMap, const Epetra_BlockMap &ColMap, int NumEntriesPerRow, Komplex_KForms KForm=K1) | |
| Constructor with fixed number of indices per row and both row and column maps. | |
| Komplex_RowMatrix (Epetra_DataAccess CV, const Epetra_BlockMap &RowMap, const Epetra_BlockMap &ColMap, int *NumEntriesPerRow, Komplex_KForms KForm=K1) | |
| Constructor with variable number of indices per row and both row and column maps. | |
| Komplex_RowMatrix (Epetra_DataAccess CV, const Epetra_CrsGraph &Graph, Komplex_KForms KForm=K1) | |
| Constructor that uses an existing Epetra_CrsGraph object. | |
| Komplex_RowMatrix (double cr, double ci, Epetra_RowMatrix *A, Komplex_KForms KForm=K1) | |
| General Komplex_RowMatrix constructor taking one Epetra_RowMatrix object. | |
| Komplex_RowMatrix (double c0r, double c0i, Epetra_RowMatrix *A0, double c1r, double c1i, Epetra_RowMatrix *A1, Komplex_KForms KForm=K1) | |
| General Komplex_RowMatrix constructor. | |
| Komplex_RowMatrix (const Komplex_RowMatrix &Matrix) | |
| virtual | ~Komplex_RowMatrix () |
| Komplex_RowMatrix Destructor. | |
Equivalence and querying methods. | |
| Komplex_RowMatrix & | operator= (const Komplex_RowMatrix &src) |
| bool | Filled () const |
| If this matrix has been filled, this query returns true; otherwise it returns false. | |
| bool | StorageOptimized () const |
| If OptimizeStorage() has been called, this query returns true; otherwise it returns false. | |
| bool | IndicesAreGlobal () const |
| If matrix indices have not been transformed to local, this query returns true; otherwise it returns false. | |
| bool | IndicesAreLocal () const |
| If matrix indices have been transformed to local, this query returns true; otherwise it returns false. | |
| bool | IndicesAreContiguous () const |
| If matrix indices are packed into single array (done in OptimizeStorage()) return true, otherwise false. | |
| bool | NoDiagonal () const |
| If matrix has no diagonal entries in global index space, this query returns true; otherwise it returns false. | |
| int | IndexBase () const |
| Returns the index base for row and column indices for this graph. | |
| const Epetra_CrsGraph & | Graph () const |
| Returns a reference to the Epetra_CrsGraph object associated with this matrix. | |
| const Epetra_Map & | RowMap () const |
| Returns the Epetra_Map object associated with the rows of this matrix. | |
| const Epetra_Map & | ColMap () const |
| Returns the Epetra_Map object that describes the set of column-indices that appear in each processor's locally owned matrix rows. | |
| const Epetra_Map & | DomainMap () const |
| Returns the Epetra_Map object associated with the domain of this matrix operator. | |
| const Epetra_Map & | RangeMap () const |
| Returns the Epetra_Map object associated with the range of this matrix operator. | |
| const Epetra_Import * | Importer () const |
| Returns the Epetra_Import object that contains the import operations for distributed operations. | |
| const Epetra_Export * | Exporter () const |
| Returns the Epetra_Export object that contains the export operations for distributed operations. | |
| const Epetra_Comm & | Comm () const |
| Returns a pointer to the Epetra_Comm communicator associated with this matrix. | |
Insertion, replace and sum into methods. ##NEED THE REPLACE AND SUM METHODS!!!!!!!!!!!!! | |
| int | PutScalar (double ScalarConstant) |
| Initialize all values in the matrix with constant value. | |
| int | Scale (double ScalarConstant) |
| Multiply all values in the matrix by a constant value (in place: A <- ScalarConstant * A). | |
| int | ReplaceDiagonalValues (const Epetra_Vector &Diagonal) |
| Replaces diagonal values of the matrix with those in the user-provided vector. | |
Transformation methods | |
| int | FillComplete () |
| Signal that data entry is complete. Perform transformations to local index space. | |
| int | FillComplete (const Epetra_Map &DomainMap, const Epetra_Map &RangeMap) |
| Signal that data entry is complete. Perform transformations to local index space. | |
Computational methods. | |
| int | Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a Komplex_RowMatrix multiplied by a Epetra_MultiVector X in Y. | |
| int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector &x, Epetra_Vector &y) const |
| Returns the result of a solve using the Komplex_RowMatrix on a Epetra_Vector x in y. | |
| int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns result of a local-only solve using a triangular Komplex_RowMatrix with Epetra_MultiVectors X and Y. | |
| int | InvRowSums (Epetra_Vector &x) const |
| Computes the sum of absolute values of the rows of the Komplex_RowMatrix, results returned in x. | |
| int | LeftScale (const Epetra_Vector &x) |
| Scales the Komplex_RowMatrix on the left with a Epetra_Vector x. | |
| int | InvColSums (Epetra_Vector &x) const |
| Computes the sum of absolute values of the columns of the Komplex_RowMatrix, results returned in x. | |
| int | RightScale (const Epetra_Vector &x) |
| Scales the Komplex_RowMatrix on the right with a Epetra_Vector x. | |
Matrix Properties Query Methods. | |
| bool | LowerTriangular () const |
| If matrix is lower triangular in local index space, this query returns true; otherwise it returns false. | |
| bool | UpperTriangular () const |
| If matrix is upper triangular in local index space, this query returns true; otherwise it returns false. | |
Atribute access functions | |
| double | NormInf () const |
| Returns the infinity norm of the global matrix. | |
| double | NormOne () const |
| Returns the one norm of the global matrix. | |
| int | NumMyNonzeros () const |
| Returns the number of nonzero entries owned by the calling processor. | |
| int | NumMyRows () const |
| Returns the number of matrix rows owned by the calling processor. | |
| int | NumMyCols () const |
| Returns the number of matrix columns owned by the calling processor. | |
| int | NumGlobalRows () const |
| Returns the number of global matrix rows. | |
| int | NumGlobalCols () const |
| Returns the number of global matrix columns. | |
| int | NumGlobalNonzeros () const |
| Returns the number of nonzero entries in the global matrix. | |
| int | NumMyDiagonals () const |
| Returns the number of local nonzero diagonal entries, based on global row/column index comparisons. | |
| int | NumGlobalDiagonals () const |
| Returns the number of global nonzero diagonal entries, based on global row/column index comparisons. | |
Additional methods required to implement the Epetra_RowMatrix interface. | |
| int | ExtractGlobalRowCopy (int GlobalRow, int Length, int &NumEntries, double *Values, int *Indices) const |
| Returns a copy of the specified global row in user-provided arrays. | |
| int | ExtractGlobalRowCopy (int GlobalRow, int Length, int &NumEntries, double *Values) const |
| Returns a copy of the specified global row values in user-provided array. | |
| int | ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const |
| Returns a copy of the specified local row in user-provided arrays. | |
| int | NumMyRowEntries (int MyRow, int &NumEntries) const |
| Return the current number of values stored for the specified local row. | |
| int | ExtractDiagonalCopy (Epetra_Vector &Diagonal) const |
| Returns a copy of the main diagonal in a user-provided vector. | |
| int | MaxNumEntries () const |
| Returns the maximum of NumMyRowEntries() over all rows. | |
| const Epetra_Map & | RowMatrixRowMap () const |
| Returns the Epetra_Map object associated with the rows of this matrix. | |
| const Epetra_Map & | RowMatrixColMap () const |
| Returns the Epetra_Map object associated with columns of this matrix. | |
| const Epetra_Import * | RowMatrixImporter () const |
| Returns the Epetra_Import object that contains the import operations for distributed operations. | |
I/O Methods. | |
| void | Print (ostream &os) const |
| Print method. | |
Additional methods required to support the Epetra_Operator interface. | |
| const char * | Label () const |
| Returns a character string describing the operator. | |
| int | SetUseTranspose (bool UseTranspose) |
| If set true, transpose of this operator will be applied. | |
| int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y. | |
| int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y. | |
| bool | HasNormInf () const |
| Returns true because this class can compute an Inf-norm. | |
| bool | UseTranspose () const |
| Returns the current UseTranspose setting. | |
| const Epetra_Map & | OperatorDomainMap () const |
| Returns the Epetra_Map object associated with the domain of this matrix operator. | |
| const Epetra_Map & | OperatorRangeMap () const |
| Returns the Epetra_Map object associated with the range of this matrix operator. | |
Constructing Komplex_RowMatrix objects
Constructing the Komplex_RowMatrix: The user defines the complex-valued matrix C = (c0r+i*c0i)*A0 +(c1r+i*c1i)*A1. Using this general expression for the complex matrix allows easy formulation of a variety of common complex problems. A0 and A1 are stored in Epetra_VbrMatrix or Epetra_CrsMatrix format.
The different K forms (K1, K2, K3, K4, K14, and K23) can easily convert back and forth by going from one K form to the canonical form to another K form. The Komplex_Ordering that each Komplex_RowMatrix object has is what determines the conversions. Let Kanon stand for the canonical form of a complex matrix in equivalent real formulation. Then any K form is equivalent to: P_l * Kanon * P_r * D_r, where P_l, P_r are specific permutation matrices and D_r is a specific right diagonal scaling matrix.
This is helpful because certain forms are advantageous in certain conditions. To be able to convert back and forth during preconditioning and solving should allow for faster, more accurate solutions.
|
||||||||||||||||||||
|
Default Komplex_RowMatrix constuctor with fixed number of indices per row. Creates a Komplex_RowMatrix object and allocates storage.
|
|
||||||||||||||||||||
|
Default Komplex_RowMatrix constructor with variable number of indices per row. Creates a Komplex_RowMatrix object and allocates storage.
|
|
||||||||||||||||||||||||
|
Constructor with fixed number of indices per row and both row and column maps. Creates a Komplex_RowMatrix object and allocates storage.
|
|
||||||||||||||||||||||||
|
Constructor with variable number of indices per row and both row and column maps. Creates a Komplex_RowMatrix object and allocates storage.
|
|
||||||||||||||||
|
Constructor that uses an existing Epetra_CrsGraph object. Creates a Komplex_RowMatrix object and allocates storage.
|
|
||||||||||||||||||||
|
General Komplex_RowMatrix constructor taking one Epetra_RowMatrix object. Creates a Komplex_RowMatrix object and fills it.
|
|
||||||||||||||||||||||||||||||||
|
General Komplex_RowMatrix constructor. Creates a Komplex_RowMatrix object and fills it.
|
|
|
Copy constructor. |
|
||||||||||||
|
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
Implements Epetra_Operator. |
|
||||||||||||
|
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y. In this implementation, we use several existing attributes to determine how virtual method ApplyInverse() should call the concrete method Solve(). We pass in the UpperTriangular(), the Epetra_CrsMatrix::UseTranspose(), and NoDiagonal() methods. The most notable warning is that if a matrix has no diagonal values we assume that there is an implicit unit diagonal that should be accounted for when doing a triangular solve.
Implements Epetra_Operator. |
|
|
Returns the Epetra_Map object that describes the set of column-indices that appear in each processor's locally owned matrix rows. Note that if the matrix was constructed with only a row-map, then until FillComplete() is called, this method returns a column-map that is a copy of the row-map. That 'initial' column-map is replaced with a computed column-map (that contains the set of column-indices appearing in each processor's local portion of the matrix) when FillComplete() is called.
|
|
|
Returns the Epetra_Map object associated with the domain of this matrix operator.
|
|
|
Returns a copy of the main diagonal in a user-provided vector.
Implements Epetra_RowMatrix. |
|
||||||||||||||||||||
|
Returns a copy of the specified global row values in user-provided array.
|
|
||||||||||||||||||||||||
|
Returns a copy of the specified global row in user-provided arrays.
|
|
||||||||||||||||||||||||
|
Returns a copy of the specified local row in user-provided arrays.
Implements Epetra_RowMatrix. |
|
|
Computes the sum of absolute values of the columns of the Komplex_RowMatrix, results returned in x. The vector x will return such that x[j] will contain the inverse of sum of the absolute values of the this matrix and will be scaled such that A(i,j) = x(j)*A(i,j) where i denotes the global row number of A and j denotes the global column number of A. Using the resulting vector from this function as input to RightScale() will make the one norm of the resulting matrix exactly 1.
Implements Epetra_RowMatrix. |
|
|
Computes the sum of absolute values of the rows of the Komplex_RowMatrix, results returned in x. The vector x will return such that x[i] will contain the inverse of sum of the absolute values of the this matrix and will be scaled such that A(i,j) = x(i)*A(i,j) where i denotes the global row number of A and j denotes the global column number of A. Using the resulting vector from this function as input to LeftScale() will make the infinity norm of the resulting matrix exactly 1.
Implements Epetra_RowMatrix. |
|
|
Scales the Komplex_RowMatrix on the left with a Epetra_Vector x. The this matrix will be scaled such that A(i,j) = x(i)*A(i,j) where i denotes the row number of A and j denotes the column number of A.
Implements Epetra_RowMatrix. |
|
||||||||||||||||
|
Returns the result of a Komplex_RowMatrix multiplied by a Epetra_MultiVector X in Y.
Implements Epetra_RowMatrix. |
|
||||||||||||
|
Return the current number of values stored for the specified local row.
Implements Epetra_RowMatrix. |
|
|
Initialize all values in the matrix with constant value.
|
|
|
Returns the Epetra_Map object associated with the range of this matrix operator.
|
|
|
Replaces diagonal values of the matrix with those in the user-provided vector. This routine is meant to allow replacement of { existing} diagonal values. If a diagonal value does not exist for a given row, the corresponding value in the input Epetra_Vector will be ignored and the return code will be set to 1. The Epetra_Map associated with the input Epetra_Vector must be compatible with the RowMap of the matrix.
|
|
|
Scales the Komplex_RowMatrix on the right with a Epetra_Vector x. The this matrix will be scaled such that A(i,j) = x(j)*A(i,j) where i denotes the global row number of A and j denotes the global column number of A.
Implements Epetra_RowMatrix. |
|
|
Multiply all values in the matrix by a constant value (in place: A <- ScalarConstant * A).
|
|
|
If set true, transpose of this operator will be applied. This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1.
Implements Epetra_Operator. |
|
||||||||||||||||||||||||
|
Returns result of a local-only solve using a triangular Komplex_RowMatrix with Epetra_MultiVectors X and Y. This method will perform a triangular solve independently on each processor of the parallel machine. No communication is performed.
Implements Epetra_RowMatrix. |
|
||||||||||||||||||||||||
|
Returns the result of a solve using the Komplex_RowMatrix on a Epetra_Vector x in y.
|
1.3.9.1