#include <Epetra_CrsMatrix.h>
Inheritance diagram for Epetra_CrsMatrix:
Constructors/Destructor | |
| Epetra_CrsMatrix (Epetra_DataAccess CV, const Epetra_Map &RowMap, const int *NumEntriesPerRow, bool StaticProfile=false) | |
| Epetra_CrsMatrix constructor with variable number of indices per row. | |
| Epetra_CrsMatrix (Epetra_DataAccess CV, const Epetra_Map &RowMap, int NumEntriesPerRow, bool StaticProfile=false) | |
| Epetra_CrsMatrix constructor with fixed number of indices per row. | |
| Epetra_CrsMatrix (Epetra_DataAccess CV, const Epetra_Map &RowMap, const Epetra_Map &ColMap, const int *NumEntriesPerRow, bool StaticProfile=false) | |
| Epetra_CrsMatrix constructor with variable number of indices per row. | |
| Epetra_CrsMatrix (Epetra_DataAccess CV, const Epetra_Map &RowMap, const Epetra_Map &ColMap, int NumEntriesPerRow, bool StaticProfile=false) | |
| Epetra_CrsMatrix constuctor with fixed number of indices per row. | |
| Epetra_CrsMatrix (Epetra_DataAccess CV, const Epetra_CrsGraph &Graph) | |
| Construct a matrix using an existing Epetra_CrsGraph object. | |
| Epetra_CrsMatrix (const Epetra_CrsMatrix &Matrix) | |
| Copy constructor. | |
| virtual | ~Epetra_CrsMatrix () |
| Epetra_CrsMatrix Destructor. | |
Insertion/Replace/SumInto methods | |
| Epetra_CrsMatrix & | operator= (const Epetra_CrsMatrix &src) |
| Assignment operator. | |
| 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 | InsertGlobalValues (int GlobalRow, int NumEntries, double *Values, int *Indices) |
| Insert a list of elements in a given global row of the matrix. | |
| int | ReplaceGlobalValues (int GlobalRow, int NumEntries, double *Values, int *Indices) |
| Replace specified existing values with this list of entries for a given global row of the matrix. | |
| int | SumIntoGlobalValues (int GlobalRow, int NumEntries, double *Values, int *Indices) |
| Add this list of entries to existing values for a given global row of the matrix. | |
| int | InsertMyValues (int MyRow, int NumEntries, double *Values, int *Indices) |
| Insert a list of elements in a given local row of the matrix. | |
| int | ReplaceMyValues (int MyRow, int NumEntries, double *Values, int *Indices) |
| Replace current values with this list of entries for a given local row of the matrix. | |
| int | SumIntoMyValues (int MyRow, int NumEntries, double *Values, int *Indices) |
| Add this list of entries to existing values for a given local row of the matrix. | |
| 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. | |
| int | OptimizeStorage () |
| Make consecutive row index sections contiguous, minimize internal storage used for constructing graph. | |
| int | MakeDataContiguous () |
| Eliminates memory that is used for construction. Make consecutive row index sections contiguous. | |
Extraction methods | |
| 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 | 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 | 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) const |
| Returns a copy of the specified local row values in user-provided array. | |
| int | ExtractDiagonalCopy (Epetra_Vector &Diagonal) const |
| Returns a copy of the main diagonal in a user-provided vector. | |
| int | ExtractGlobalRowView (int GlobalRow, int &NumEntries, double *&Values, int *&Indices) const |
| Returns a view of the specified global row values via pointers to internal data. | |
| int | ExtractMyRowView (int MyRow, int &NumEntries, double *&Values, int *&Indices) const |
| Returns a view of the specified local row values via pointers to internal data. | |
| int | ExtractGlobalRowView (int GlobalRow, int &NumEntries, double *&Values) const |
| Returns a view of the specified global row values via pointers to internal data. | |
| int | ExtractMyRowView (int MyRow, int &NumEntries, double *&Values) const |
| Returns a view of the specified local row values via pointers to internal data. | |
Computational methods | |
| int | Multiply (bool TransA, const Epetra_Vector &x, Epetra_Vector &y) const |
| Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_Vector x in y. | |
| int | Multiply1 (bool TransA, const Epetra_Vector &x, Epetra_Vector &y) const |
| int | Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_MultiVector X in Y. | |
| int | Multiply1 (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector &x, Epetra_Vector &y) const |
| Returns the result of a local solve using the Epetra_CrsMatrix on a Epetra_Vector x in y. | |
| int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a local solve using the Epetra_CrsMatrix a Epetra_MultiVector X in Y. | |
| int | InvRowSums (Epetra_Vector &x) const |
| Computes the inverse of the sum of absolute values of the rows of the Epetra_CrsMatrix, results returned in x. | |
| int | InvRowMaxs (Epetra_Vector &x) const |
| Computes the max of absolute values of the rows of the Epetra_CrsMatrix, results returned in x. | |
| int | LeftScale (const Epetra_Vector &x) |
| Scales the Epetra_CrsMatrix on the left with a Epetra_Vector x. | |
| int | InvColSums (Epetra_Vector &x) const |
| Computes the inverse of the sum of absolute values of the columns of the Epetra_CrsMatrix, results returned in x. | |
| int | InvColMaxs (Epetra_Vector &x) const |
| Computes the max of absolute values of the columns of the Epetra_CrsMatrix, results returned in x. | |
| int | RightScale (const Epetra_Vector &x) |
| Scales the Epetra_CrsMatrix on the right with a Epetra_Vector x. | |
Matrix Properties Query Methods | |
| bool | Filled () const |
| If FillComplete() has been called, 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 has not been transformed to local, this query returns true, otherwise it returns false. | |
| bool | IndicesAreLocal () const |
| If matrix indices has 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 | 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. | |
| bool | NoDiagonal () const |
| If matrix has no diagonal entries in global 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. | |
| double | NormFrobenius () const |
| Returns the frobenius norm of the global matrix. | |
| int | NumGlobalNonzeros () const |
| Returns the number of nonzero entries in the global matrix. | |
| int | NumGlobalRows () const |
| Returns the number of global matrix rows. | |
| int | NumGlobalCols () const |
| Returns the number of global matrix columns. | |
| int | NumGlobalDiagonals () const |
| Returns the number of global nonzero diagonal entries, based on global row/column index comparisons. | |
| int | NumMyNonzeros () const |
| Returns the number of nonzero entries in the calling processor's portion of the matrix. | |
| int | NumMyRows () const |
| Returns the number of matrix rows owned by the calling processor. | |
| int | NumMyCols () const |
| Returns the number of entries in the set of column-indices that appear on this processor. | |
| int | NumMyDiagonals () const |
| Returns the number of local nonzero diagonal entries, based on global row/column index comparisons. | |
| int | NumGlobalEntries (int Row) const |
| Returns the current number of nonzero entries in specified global row on this processor. | |
| int | NumAllocatedGlobalEntries (int Row) const |
| Returns the allocated number of nonzero entries in specified global row on this processor. | |
| int | MaxNumEntries () const |
| Returns the maximum number of nonzero entries across all rows on this processor. | |
| int | GlobalMaxNumEntries () const |
| Returns the maximum number of nonzero entries across all rows on all processors. | |
| int | NumMyEntries (int Row) const |
| Returns the current number of nonzero entries in specified local row on this processor. | |
| int | NumAllocatedMyEntries (int Row) const |
| Returns the allocated number of nonzero entries in specified local row on this processor. | |
| int | IndexBase () const |
| Returns the index base for row and column indices for this graph. | |
| bool | StaticGraph () |
| Returns true if the graph associated with this matrix was pre-constructed and therefore not changeable. | |
| 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. | |
| int | ReplaceRowMap (const Epetra_BlockMap &newmap) |
| Replaces the current RowMap with the user-specified map object, but only if currentmap->PointSameAs(newmap) is true. | |
| bool | HaveColMap () const |
| Returns true if we have a well-defined ColMap, and returns false otherwise. | |
| int | ReplaceColMap (const Epetra_BlockMap &newmap) |
| Replaces the current ColMap with the user-specified map object, but only if currentmap->PointSameAs(newmap) is true. | |
| 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. | |
Local/Global ID methods | |
| int | LRID (int GRID) const |
| Returns the local row index for given global row index, returns -1 if no local row for this global row. | |
| int | GRID (int LRID) const |
| Returns the global row index for give local row index, returns IndexBase-1 if we don't have this local row. | |
| int | LCID (int GCID) const |
| Returns the local column index for given global column index, returns -1 if no local column for this global column. | |
| int | GCID (int LCID) const |
| Returns the global column index for give local column index, returns IndexBase-1 if we don't have this local column. | |
| bool | MyGRID (int GRID) const |
| Returns true if the GRID passed in belongs to the calling processor in this map, otherwise returns false. | |
| bool | MyLRID (int LRID) const |
| Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns false. | |
| bool | MyGCID (int GCID) const |
| Returns true if the GCID passed in belongs to the calling processor in this map, otherwise returns false. | |
| bool | MyLCID (int LCID) const |
| Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns false. | |
| bool | MyGlobalRow (int GID) const |
| Returns true of GID is owned by the calling processor, otherwise it returns false. | |
I/O Methods | |
| virtual 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. | |
Additional methods required to implement Epetra_RowMatrix interface | |
| int | NumMyRowEntries (int MyRow, int &NumEntries) const |
| Return the current number of values stored for the specified local row. | |
| 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. | |
Inlined Operator Methods | |
| double * | operator[] (int Loc) |
| Inlined bracket operator for fast access to data. (Const and Non-const versions). | |
| double * | operator[] (int Loc) const |
Expert-only methods: These methods are intended for experts only and have some risk of changing in the future, since they rely on underlying data structure assumptions | |
| int | ExtractCrsDataPointers (int *&IndexOffset, int *&Indices, double *&Values) const |
| Returns internal data pointers associated with Crs matrix format. | |
Deprecated methods: These methods still work, but will be removed in a future version | |
| const Epetra_Map & | ImportMap () const |
| Use ColMap() instead. | |
| int | TransformToLocal () |
| Use FillComplete() instead. | |
| int | TransformToLocal (const Epetra_Map *DomainMap, const Epetra_Map *RangeMap) |
| Use FillComplete(const Epetra_Map& DomainMap, const Epetra_Map& RangeMap) instead. | |
Protected Member Functions | |
| bool | Allocated () const |
| int | SetAllocated (bool Flag) |
| double ** | Values () const |
| double * | All_Values () const |
| double * | Values (int LocalRow) const |
| void | InitializeDefaults () |
| int | Allocate () |
| int | InsertValues (int LocalRow, int NumEntries, double *Values, int *Indices) |
| int | InsertOffsetValues (int GlobalRow, int NumEntries, double *Values, int *Indices) |
| int | ReplaceOffsetValues (int GlobalRow, int NumEntries, double *Values, int *Indices) |
| int | SumIntoOffsetValues (int GlobalRow, int NumEntries, double *Values, int *Indices) |
| void | UpdateImportVector (int NumVectors) const |
| void | UpdateExportVector (int NumVectors) const |
| void | GeneralMV (double *x, double *y) const |
| void | GeneralMTV (double *x, double *y) const |
| void | GeneralMM (double **X, int LDX, double **Y, int LDY, int NumVectors) const |
| void | GeneralMTM (double **X, int LDX, double **Y, int LDY, int NumVectors) const |
| void | GeneralSV (bool Upper, bool Trans, bool UnitDiagonal, double *x, double *y) const |
| void | GeneralSM (bool Upper, bool Trans, bool UnitDiagonal, double **X, int LDX, double **Y, int LDY, int NumVectors) const |
| void | SetStaticGraph (bool Flag) |
| int | CheckSizes (const Epetra_SrcDistObject &A) |
| Allows the source and target (this) objects to be compared for compatibility, return nonzero if not. | |
| int | CopyAndPermute (const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor) |
| Perform ID copies and permutations that are on processor. | |
| int | CopyAndPermuteCrsMatrix (const Epetra_CrsMatrix &A, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor) |
| int | CopyAndPermuteRowMatrix (const Epetra_RowMatrix &A, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor) |
| int | PackAndPrepare (const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor) |
| Perform any packing or preparation required for call to DoTransfer(). | |
| int | UnpackAndCombine (const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor) |
| Perform any unpacking and combining after call to DoTransfer(). | |
| int | SortEntries () |
| Sort column entries, row-by-row, in ascending order. | |
| bool | Sorted () const |
| If SortEntries() has been called, this query returns true, otherwise it returns false. | |
| int | MergeRedundantEntries () |
| Add entries that have the same column index. Remove redundant entries from list. | |
| bool | NoRedundancies () const |
| If MergeRedundantEntries() has been called, this query returns true, otherwise it returns false. | |
| void | DeleteMemory () |
Protected Attributes | |
| Epetra_CrsGraph | Graph_ |
| bool | Allocated_ |
| bool | StaticGraph_ |
| bool | UseTranspose_ |
| bool | constructedWithFilledGraph_ |
| bool | matrixFillCompleteCalled_ |
| bool | StorageOptimized_ |
| double ** | Values_ |
| double * | All_Values_ |
| double | NormInf_ |
| double | NormOne_ |
| double | NormFrob_ |
| int | NumMyRows_ |
| Epetra_MultiVector * | ImportVector_ |
| Epetra_MultiVector * | ExportVector_ |
| Epetra_DataAccess | CV_ |
| bool | squareFillCompleteCalled_ |
Private Member Functions | |
| int | Solve1 (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector &x, Epetra_Vector &y) const |
| int | Solve1 (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
The Epetra_CrsMatrix class is a sparse compressed row matrix object. This matrix can be used in a parallel setting, with data distribution described by Epetra_Map attributes. The structure or graph of the matrix is defined by an Epetra_CrsGraph attribute.
In addition to coefficient access, the primary operations provided by Epetra_CrsMatrix are matrix times vector and matrix times multi-vector multiplication.
Epetra_CrsMatrix matrices can be square or rectangular.
Creating and filling Epetra_CrsMatrix objects
Constructing Epetra_CrsMatrix objects is a multi-step process. The basic steps are as follows:
Note that, even after a matrix is constructed (FillComplete has been called), it is possible to update existing matrix entries. It is not possible to create new entries.
Epetra_Map attributes
Epetra_CrsMatrix objects have four Epetra_Map attributes, which are held by the Epetra_CrsGraph attribute.
The Epetra_Map attributes can be obtained via these accessor methods:
It is important to note that while the row-map and the range-map are often the same, the column-map and the domain-map are almost never the same. The set of entries in a distributed column-map almost always form overlapping sets, with entries being associated with more than one processor. A domain-map, on the other hand, must be a 1-to-1 map, with entries being associated with only a single processor.
Local versus Global Indices
Epetra_CrsMatrix has query functions IndicesAreLocal() and IndicesAreGlobal(), which are used to determine whether the underlying Epetra_CrsGraph attribute's column-indices have been transformed into a local index space or not. (This transformation occurs when the method Epetra_CrsGraph::FillComplete() is called, which happens when the method Epetra_CrsMatrix::FillComplete() is called.) The state of the indices in the graph determines the behavior of many Epetra_CrsMatrix methods. If an Epetra_CrsMatrix instance is constructed using one of the constructors that does not accept a pre-existing Epetra_CrsGraph object, then an Epetra_CrsGraph attribute is created internally and its indices remain untransformed (IndicesAreGlobal()==true) until Epetra_CrsMatrix::FillComplete() is called. The query function Epetra_CrsMatrix::Filled() returns true if Epetra_CrsMatrix::FillComplete() has been called.
Note the following method characteristics:
Most methods have preconditions documented, check documentation for specific methods not mentioned here.
Counting Floating Point Operations
Each Epetra_CrsMatrix object keeps track of the number of serial floating point operations performed using the specified object as the this argument to the function. The Flops() function returns this number as a double precision number. Using this information, in conjunction with the Epetra_Time class, one can get accurate parallel performance numbers. The ResetFlops() function resets the floating point counter.
Definition at line 152 of file Epetra_CrsMatrix.h.
|
||||||||||||||||||||
|
Epetra_CrsMatrix constructor with variable number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
Definition at line 58 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Epetra_CrsMatrix constructor with fixed number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
Definition at line 85 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Epetra_CrsMatrix constructor with variable number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
Definition at line 111 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Epetra_CrsMatrix constuctor with fixed number of indices per row. Creates a Epetra_CrsMatrix object and allocates storage.
Definition at line 139 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||
|
Construct a matrix using an existing Epetra_CrsGraph object. Allows the nonzero structure from another matrix, or a structure that was constructed independently, to be used for this matrix.
Definition at line 166 of file Epetra_CrsMatrix.cpp. |
|
|
Copy constructor.
Definition at line 194 of file Epetra_CrsMatrix.cpp. |
|
|
Epetra_CrsMatrix Destructor.
Definition at line 330 of file Epetra_CrsMatrix.cpp. |
|
|
Assignment operator.
Definition at line 221 of file Epetra_CrsMatrix.cpp. |
|
|
Initialize all values in the matrix with constant value.
Definition at line 400 of file Epetra_CrsMatrix.cpp. |
|
|
Multiply all values in the matrix by a constant value (in place: A <- ScalarConstant * A).
Definition at line 417 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Insert a list of elements in a given global row of the matrix.
Definition at line 434 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Replace specified existing values with this list of entries for a given global row of the matrix.
Definition at line 577 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Add this list of entries to existing values for a given global row of the matrix.
Definition at line 664 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Insert a list of elements in a given local row of the matrix.
Definition at line 451 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Replace current values with this list of entries for a given local row of the matrix.
Definition at line 606 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Add this list of entries to existing values for a given local row of the matrix.
Definition at line 719 of file Epetra_CrsMatrix.cpp. |
|
|
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.
Definition at line 1076 of file Epetra_CrsMatrix.cpp. |
|
|
Signal that data entry is complete. Perform transformations to local index space.
Definition at line 776 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||
|
Signal that data entry is complete. Perform transformations to local index space.
Definition at line 783 of file Epetra_CrsMatrix.cpp. |
|
|
Make consecutive row index sections contiguous, minimize internal storage used for constructing graph. After construction and during initialization (when values are being added), the matrix coefficients for each row are managed as separate segments of memory. This method moves the values for all rows into one large contiguous array and eliminates internal storage that is not needed after matrix construction. Calling this method can have a significant impact on memory costs and machine performance. If this object was constructed in View mode then this method can't make non-contiguous values contiguous and will return a warning code of 1 if the viewed data isn't already contiguous.
Definition at line 913 of file Epetra_CrsMatrix.cpp. |
|
|
Eliminates memory that is used for construction. Make consecutive row index sections contiguous.
Definition at line 429 of file Epetra_CrsMatrix.h. |
|
||||||||||||||||||||||||
|
Returns a copy of the specified global row in user-provided arrays.
Definition at line 987 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Returns a copy of the specified local row in user-provided arrays.
Implements Epetra_RowMatrix. Definition at line 999 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Returns a copy of the specified global row values in user-provided array.
Definition at line 1020 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Returns a copy of the specified local row values in user-provided array.
Definition at line 1031 of file Epetra_CrsMatrix.cpp. |
|
|
Returns a copy of the main diagonal in a user-provided vector.
Implements Epetra_RowMatrix. Definition at line 1052 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Returns a view of the specified global row values via pointers to internal data.
Definition at line 1108 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Returns a view of the specified local row values via pointers to internal data.
Definition at line 1119 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||
|
Returns a view of the specified global row values via pointers to internal data.
Definition at line 1129 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||
|
Returns a view of the specified local row values via pointers to internal data.
Definition at line 1139 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||
|
Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_Vector x in y.
Definition at line 2304 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||
|
Definition at line 3225 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||
|
Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_MultiVector X in Y.
Implements Epetra_RowMatrix. Definition at line 2378 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||
|
Definition at line 3339 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Returns the result of a local solve using the Epetra_CrsMatrix on a Epetra_Vector x in y. This method solves a triangular system of equations asynchronously on each processor.
Definition at line 1153 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Returns the result of a local solve using the Epetra_CrsMatrix a Epetra_MultiVector X in Y. This method solves a triangular system of equations asynchronously on each processor.
Implements Epetra_RowMatrix. Definition at line 1190 of file Epetra_CrsMatrix.cpp. |
|
|
Computes the inverse of the sum of absolute values of the rows of the Epetra_CrsMatrix, results returned in x. The vector x will return such that x[i] will contain the inverse of the sum of the absolute values of the entries in the ith row of the this matrix. 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. Definition at line 1230 of file Epetra_CrsMatrix.cpp. |
|
|
Computes the max of absolute values of the rows of the Epetra_CrsMatrix, results returned in x. The vector x will return such that x[i] will contain the inverse of max of the absolute values of the entries in the ith row of the this matrix.
Definition at line 1285 of file Epetra_CrsMatrix.cpp. |
|
|
Scales the Epetra_CrsMatrix 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. Definition at line 1444 of file Epetra_CrsMatrix.cpp. |
|
|
Computes the inverse of the sum of absolute values of the columns of the Epetra_CrsMatrix, results returned in x. The vector x will return such that x[j] will contain the inverse of the sum of the absolute values of the entries in the jth column of the this matrix. 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. Definition at line 1330 of file Epetra_CrsMatrix.cpp. |
|
|
Computes the max of absolute values of the columns of the Epetra_CrsMatrix, results returned in x. The vector x will return such that x[j] will contain the inverse of max of the absolute values of the entries in the jth row of the this matrix.
Definition at line 1387 of file Epetra_CrsMatrix.cpp. |
|
|
Scales the Epetra_CrsMatrix 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. Definition at line 1487 of file Epetra_CrsMatrix.cpp. |
|
|
If FillComplete() has been called, this query returns true, otherwise it returns false.
Implements Epetra_RowMatrix. Definition at line 698 of file Epetra_CrsMatrix.h. |
|
|
If OptimizeStorage() has been called, this query returns true, otherwise it returns false.
Definition at line 701 of file Epetra_CrsMatrix.h. |
|
|
If matrix indices has not been transformed to local, this query returns true, otherwise it returns false.
Definition at line 704 of file Epetra_CrsMatrix.h. |
|
|
If matrix indices has been transformed to local, this query returns true, otherwise it returns false.
Definition at line 707 of file Epetra_CrsMatrix.h. |
|
|
If matrix indices are packed into single array (done in OptimizeStorage()) return true, otherwise false.
Definition at line 710 of file Epetra_CrsMatrix.h. |
|
|
If matrix is lower triangular in local index space, this query returns true, otherwise it returns false.
Implements Epetra_RowMatrix. Definition at line 713 of file Epetra_CrsMatrix.h. |
|
|
If matrix is upper triangular in local index space, this query returns true, otherwise it returns false.
Implements Epetra_RowMatrix. Definition at line 716 of file Epetra_CrsMatrix.h. |
|
|
If matrix has no diagonal entries in global index space, this query returns true, otherwise it returns false.
Definition at line 719 of file Epetra_CrsMatrix.h. |
|
|
Returns the infinity norm of the global matrix.
Implements Epetra_RowMatrix. Definition at line 1527 of file Epetra_CrsMatrix.cpp. |
|
|
Returns the one norm of the global matrix.
Implements Epetra_RowMatrix. Definition at line 1574 of file Epetra_CrsMatrix.cpp. |
|
|
Returns the frobenius norm of the global matrix.
Definition at line 1627 of file Epetra_CrsMatrix.cpp. |
|
|
Returns the number of nonzero entries in the global matrix.
Implements Epetra_RowMatrix. Definition at line 756 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of global matrix rows.
Implements Epetra_RowMatrix. Definition at line 759 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of global matrix columns.
Implements Epetra_RowMatrix. Definition at line 762 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
Implements Epetra_RowMatrix. Definition at line 765 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of nonzero entries in the calling processor's portion of the matrix.
Implements Epetra_RowMatrix. Definition at line 768 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of matrix rows owned by the calling processor.
Implements Epetra_RowMatrix. Definition at line 771 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of entries in the set of column-indices that appear on this processor. The set of column-indices that appear on this processor is the union of column-indices that appear in all local rows. The size of this set isn't available until FillComplete() has been called.
Implements Epetra_RowMatrix. Definition at line 778 of file Epetra_CrsMatrix.h. |
|
|
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
Implements Epetra_RowMatrix. Definition at line 784 of file Epetra_CrsMatrix.h. |
|
|
Returns the current number of nonzero entries in specified global row on this processor.
Definition at line 787 of file Epetra_CrsMatrix.h. |
|
|
Returns the allocated number of nonzero entries in specified global row on this processor.
Definition at line 790 of file Epetra_CrsMatrix.h. |
|
|
Returns the maximum number of nonzero entries across all rows on this processor.
Implements Epetra_RowMatrix. Definition at line 796 of file Epetra_CrsMatrix.h. |
|
|
Returns the maximum number of nonzero entries across all rows on all processors.
Definition at line 802 of file Epetra_CrsMatrix.h. |
|
|
Returns the current number of nonzero entries in specified local row on this processor.
Definition at line 805 of file Epetra_CrsMatrix.h. |
|
|
Returns the allocated number of nonzero entries in specified local row on this processor.
Definition at line 808 of file Epetra_CrsMatrix.h. |
|
|
Returns the index base for row and column indices for this graph.
Definition at line 811 of file Epetra_CrsMatrix.h. |
|
|
Returns true if the graph associated with this matrix was pre-constructed and therefore not changeable.
Definition at line 815 of file Epetra_CrsMatrix.h. |
|
|
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
Definition at line 818 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Map object associated with the rows of this matrix.
Definition at line 821 of file Epetra_CrsMatrix.h. |
|
|
Replaces the current RowMap with the user-specified map object, but only if currentmap->PointSameAs(newmap) is true. This is a collective function. Returns 0 if map is replaced, -1 if not.
Definition at line 366 of file Epetra_CrsMatrix.cpp. |
|
|
Returns true if we have a well-defined ColMap, and returns false otherwise.
Definition at line 837 of file Epetra_CrsMatrix.h. |
|
|
Replaces the current ColMap with the user-specified map object, but only if currentmap->PointSameAs(newmap) is true. This is a collective function. Returns 0 if map is replaced, -1 if not.
Definition at line 383 of file Epetra_CrsMatrix.cpp. |
|
|
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.
Definition at line 857 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Map object associated with the domain of this matrix operator.
Definition at line 863 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Map object associated with the range of this matrix operator.
Definition at line 869 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Import object that contains the import operations for distributed operations.
Definition at line 872 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Export object that contains the export operations for distributed operations.
Definition at line 875 of file Epetra_CrsMatrix.h. |
|
|
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
Reimplemented from Epetra_DistObject. Definition at line 878 of file Epetra_CrsMatrix.h. |
|
|
Returns the local row index for given global row index, returns -1 if no local row for this global row.
Definition at line 884 of file Epetra_CrsMatrix.h. |
|
|
Returns the global row index for give local row index, returns IndexBase-1 if we don't have this local row.
Definition at line 887 of file Epetra_CrsMatrix.h. |
|
|
Returns the local column index for given global column index, returns -1 if no local column for this global column.
Definition at line 893 of file Epetra_CrsMatrix.h. |
|
|
Returns the global column index for give local column index, returns IndexBase-1 if we don't have this local column.
Definition at line 899 of file Epetra_CrsMatrix.h. |
|
|
Returns true if the GRID passed in belongs to the calling processor in this map, otherwise returns false.
Definition at line 902 of file Epetra_CrsMatrix.h. |
|
|
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns false.
Definition at line 905 of file Epetra_CrsMatrix.h. |
|
|
Returns true if the GCID passed in belongs to the calling processor in this map, otherwise returns false.
Definition at line 911 of file Epetra_CrsMatrix.h. |
|
|
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns false.
Definition at line 917 of file Epetra_CrsMatrix.h. |
|
|
Returns true of GID is owned by the calling processor, otherwise it returns false.
Definition at line 920 of file Epetra_CrsMatrix.h. |
|
|
Print method.
Reimplemented from Epetra_DistObject. Definition at line 2212 of file Epetra_CrsMatrix.cpp. |
|
|
Returns a character string describing the operator.
Reimplemented from Epetra_Object. Definition at line 935 of file Epetra_CrsMatrix.h. |
|
|
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. Definition at line 946 of file Epetra_CrsMatrix.h. |
|
||||||||||||
|
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
Implements Epetra_Operator. Definition at line 957 of file Epetra_CrsMatrix.h. |
|
||||||||||||
|
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. Definition at line 974 of file Epetra_CrsMatrix.h. |
|
|
Returns true because this class can compute an Inf-norm.
Implements Epetra_Operator. Definition at line 978 of file Epetra_CrsMatrix.h. |
|
|
Returns the current UseTranspose setting.
Implements Epetra_Operator. Definition at line 981 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Map object associated with the domain of this matrix operator.
Implements Epetra_Operator. Definition at line 984 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Map object associated with the range of this matrix operator.
Implements Epetra_Operator. Definition at line 991 of file Epetra_CrsMatrix.h. |
|
||||||||||||
|
Return the current number of values stored for the specified local row. Similar to NumMyEntries() except NumEntries is returned as an argument and error checking is done on the input value MyRow.
Implements Epetra_RowMatrix. Definition at line 1011 of file Epetra_CrsMatrix.cpp. |
|
|
Returns the Epetra_Map object associated with the rows of this matrix.
Implements Epetra_RowMatrix. Definition at line 1014 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Map object associated with columns of this matrix.
Implements Epetra_RowMatrix. Definition at line 1017 of file Epetra_CrsMatrix.h. |
|
|
Returns the Epetra_Import object that contains the import operations for distributed operations.
Implements Epetra_RowMatrix. Definition at line 1020 of file Epetra_CrsMatrix.h. |
|
|
Inlined bracket operator for fast access to data. (Const and Non-const versions). No error checking and dangerous for optimization purposes.
Definition at line 1033 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1036 of file Epetra_CrsMatrix.h. |
|
||||||||||||||||
|
Returns internal data pointers associated with Crs matrix format. Returns data pointers to facilitate optimized code within external packages.
Definition at line 1057 of file Epetra_CrsMatrix.h. |
|
|
Use ColMap() instead.
Definition at line 1072 of file Epetra_CrsMatrix.h. |
|
|
Use FillComplete() instead.
Definition at line 821 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||
|
Use FillComplete(const Epetra_Map& DomainMap, const Epetra_Map& RangeMap) instead.
Definition at line 827 of file Epetra_CrsMatrix.cpp. |
|
|
Definition at line 1084 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1085 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1086 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1089 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1092 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 273 of file Epetra_CrsMatrix.cpp. |
|
|
Definition at line 288 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Definition at line 468 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Definition at line 569 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Definition at line 637 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||
|
Definition at line 749 of file Epetra_CrsMatrix.cpp. |
|
|
Definition at line 2554 of file Epetra_CrsMatrix.cpp. |
|
|
Definition at line 2568 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||
|
Definition at line 2582 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||
|
Definition at line 2651 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 2726 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 2803 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 2891 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 3004 of file Epetra_CrsMatrix.cpp. |
|
|
Definition at line 1116 of file Epetra_CrsMatrix.h. |
|
|
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.
Implements Epetra_DistObject. Definition at line 1665 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||||||
|
Perform ID copies and permutations that are on processor.
Implements Epetra_DistObject. Definition at line 1676 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||||||
|
Definition at line 1703 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||||||
|
Definition at line 1900 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||||||||||||||||||
|
Perform any packing or preparation required for call to DoTransfer().
Implements Epetra_DistObject. Definition at line 2026 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||||||||||||||||||
|
Perform any unpacking and combining after call to DoTransfer().
Implements Epetra_DistObject. Definition at line 2117 of file Epetra_CrsMatrix.cpp. |
|
|
Sort column entries, row-by-row, in ascending order.
Definition at line 833 of file Epetra_CrsMatrix.cpp. |
|
|
If SortEntries() has been called, this query returns true, otherwise it returns false.
Definition at line 1163 of file Epetra_CrsMatrix.h. |
|
|
Add entries that have the same column index. Remove redundant entries from list.
Definition at line 875 of file Epetra_CrsMatrix.cpp. |
|
|
If MergeRedundantEntries() has been called, this query returns true, otherwise it returns false.
Definition at line 1169 of file Epetra_CrsMatrix.h. |
|
|
Reimplemented in Epetra_FECrsMatrix. Definition at line 336 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 3470 of file Epetra_CrsMatrix.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 3599 of file Epetra_CrsMatrix.cpp. |
|
|
Definition at line 1173 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1174 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1175 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1176 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1177 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1178 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1179 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1181 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1182 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1183 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1184 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1185 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1187 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1188 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1189 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1191 of file Epetra_CrsMatrix.h. |
|
|
Definition at line 1193 of file Epetra_CrsMatrix.h. |
1.3.9.1