#include <Tpetra_CrsMatrix.hpp>
Inheritance diagram for Tpetra::CrsMatrix< Ordinal, Scalar >:

Public Member Functions | |
Constructor/Destructor Methods | |
| CrsMatrix (const Map< Ordinal > &rowMap) | |
| Constructor specifying the domain map only. | |
Query Methods | |
| bool | isFillCompleted () const |
Returns true if the matrix has already been fill completed. | |
| Teuchos::RCP< const Teuchos::Comm< Ordinal > > | getComm () const |
| Returns the communicator. | |
| Ordinal | getNumGlobalNonzeros () const |
| Returns the number of nonzero entries in the global matrix. | |
| Ordinal | getNumMyNonzeros () const |
| Returns the number of nonzero entries in the calling image's portion of the matrix. | |
| Ordinal | getNumGlobalRows () const |
| Returns the number of global matrix rows. | |
| Ordinal | getNumGlobalCols () const |
| Returns the number of global matrix columns. | |
| Ordinal | getNumMyRows () const |
| Returns the number of matrix rows owned by the calling image. | |
| Ordinal | getNumMyCols () const |
| Returns the number of matrix columns referenced by the calling image. | |
| Ordinal | getNumGlobalDiagonals () const |
| Returns the number of global nonzero diagonal entries, based on global row/column index comparisons. | |
| Ordinal | getNumMyDiagonals () const |
| Returns the number of local nonzero diagonal entries, based on global row/column index comparisons. | |
| Ordinal | getGlobalMaxNumEntries () const |
| Returns the maximum number of nonzero entries across all rows/columns on all images. | |
| Ordinal | getMyMaxNumEntries () const |
| Returns the maximum number of nonzero entries across all rows/columns on this image. | |
| Ordinal | getIndexBase () const |
| Returns the index base for global indices for this matrix. | |
| const Map< Ordinal > & | getRowMap () const |
| Returns the Map that describes the row distribution in this matrix. | |
| const Map< Ordinal > & | getColMap () const |
| Returns the Map that describes the column distribution in this matrix. | |
Methods implementing Tpetra::Operator | |
| const Map< Ordinal > & | getDomainMap () const |
| Returns the Map associated with the domain of this operator. | |
| const Map< Ordinal > & | getRangeMap () const |
| Returns the Map associated with the domain of this operator. | |
| void | apply (const MultiVector< Ordinal, Scalar > &X, MultiVector< Ordinal, Scalar > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS) const |
| Computes the matrix-vector multilication y = A x. | |
Construction Methods | |
| void | fillComplete () |
| Signals that data entry is complete. Matrix data is converted into a more optimized form. | |
| void | submitEntry (Ordinal globalRow, Ordinal globalCol, const Scalar &value) |
| Submits one local or nonlocal entry to the matrix using global IDs. | |
| void | submitEntries (Ordinal globalRow, const Teuchos::ArrayView< const Ordinal > &cols, const Teuchos::ArrayView< const Scalar > &vals) |
| Submit multiple entries, using global IDs. | |
| void | setAllToScalar (const Scalar &alpha) |
| Set all matrix entries equal to scalarThis. | |
| void | scale (const Scalar &alpha) |
| Scale the current values of a matrix, this = alpha*this. | |
Data Access Methods | |
| Ordinal | getNumRowEntries (Ordinal globalRow) const |
| Returns the current number of nonzero entries in specified global index on this image. | |
| void | getMyRowCopy (Ordinal myRow, const Teuchos::ArrayView< Ordinal > &indices, const Teuchos::ArrayView< Scalar > &values) const |
| Returns a copy of the specified local row, column indices are local. | |
| void | getGlobalRowCopy (Ordinal globalRow, const Teuchos::ArrayView< Ordinal > &indices, const Teuchos::ArrayView< Scalar > &values) const |
| Returns a copy of the specified (and locally owned) global row, column indices are global. | |
I/O Methods | |
| void | print (std::ostream &os) const |
| Prints the matrix on the specified stream. This is very verbose. | |
This class allows the construction of sparse matrices with row-access. Methods submitEntry() and submitEntries() can be used to set both locally owned and non-local elements; the shipping of data is done with hardcoded MPI calls when fillComplete() is called.
The nonzero elements of locally owned row can be accessed by method getMyRowCopy() or getGlobalRowCopy(). The former returns the column indices using local numbering, the latter using global numbering.
| Tpetra::CrsMatrix< Ordinal, Scalar >::CrsMatrix | ( | const Map< Ordinal > & | rowMap | ) |
Constructor specifying the domain map only.
| bool Tpetra::CrsMatrix< Ordinal, Scalar >::isFillCompleted | ( | ) | const [inline] |
Returns true if the matrix has already been fill completed.
| Teuchos::RCP< const Teuchos::Comm< Ordinal > > Tpetra::CrsMatrix< Ordinal, Scalar >::getComm | ( | ) | const |
Returns the communicator.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumGlobalNonzeros | ( | ) | const [inline] |
Returns the number of nonzero entries in the global matrix.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumMyNonzeros | ( | ) | const [inline] |
Returns the number of nonzero entries in the calling image's portion of the matrix.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumGlobalRows | ( | ) | const [inline] |
Returns the number of global matrix rows.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumGlobalCols | ( | ) | const [inline] |
Returns the number of global matrix columns.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumMyRows | ( | ) | const [inline] |
Returns the number of matrix rows owned by the calling image.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumMyCols | ( | ) | const [inline] |
Returns the number of matrix columns referenced by the calling image.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumGlobalDiagonals | ( | ) | const [inline] |
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumMyDiagonals | ( | ) | const [inline] |
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getGlobalMaxNumEntries | ( | ) | const [inline] |
Returns the maximum number of nonzero entries across all rows/columns on all images.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getMyMaxNumEntries | ( | ) | const [inline] |
Returns the maximum number of nonzero entries across all rows/columns on this image.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getIndexBase | ( | ) | const [inline] |
Returns the index base for global indices for this matrix.
| const Map< Ordinal > & Tpetra::CrsMatrix< Ordinal, Scalar >::getRowMap | ( | ) | const |
Returns the Map that describes the row distribution in this matrix.
| const Map< Ordinal > & Tpetra::CrsMatrix< Ordinal, Scalar >::getColMap | ( | ) | const |
Returns the Map that describes the column distribution in this matrix.
| const Map< Ordinal > & Tpetra::CrsMatrix< Ordinal, Scalar >::getDomainMap | ( | ) | const [virtual] |
Returns the Map associated with the domain of this operator.
Implements Tpetra::Operator< Ordinal, Scalar >.
| const Map< Ordinal > & Tpetra::CrsMatrix< Ordinal, Scalar >::getRangeMap | ( | ) | const [virtual] |
Returns the Map associated with the domain of this operator.
Implements Tpetra::Operator< Ordinal, Scalar >.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::apply | ( | const MultiVector< Ordinal, Scalar > & | X, | |
| MultiVector< Ordinal, Scalar > & | Y, | |||
| Teuchos::ETransp | mode = Teuchos::NO_TRANS | |||
| ) | const [virtual] |
| void Tpetra::CrsMatrix< Ordinal, Scalar >::fillComplete | ( | ) |
Signals that data entry is complete. Matrix data is converted into a more optimized form.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::submitEntry | ( | Ordinal | globalRow, | |
| Ordinal | globalCol, | |||
| const Scalar & | value | |||
| ) |
Submits one local or nonlocal entry to the matrix using global IDs.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::submitEntries | ( | Ordinal | globalRow, | |
| const Teuchos::ArrayView< const Ordinal > & | cols, | |||
| const Teuchos::ArrayView< const Scalar > & | vals | |||
| ) |
Submit multiple entries, using global IDs.
All index values must be in the global space. Behavoir is defined by the CombineMode passed in.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::setAllToScalar | ( | const Scalar & | alpha | ) |
Set all matrix entries equal to scalarThis.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::scale | ( | const Scalar & | alpha | ) |
Scale the current values of a matrix, this = alpha*this.
| Ordinal Tpetra::CrsMatrix< Ordinal, Scalar >::getNumRowEntries | ( | Ordinal | globalRow | ) | const [inline] |
Returns the current number of nonzero entries in specified global index on this image.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::getMyRowCopy | ( | Ordinal | myRow, | |
| const Teuchos::ArrayView< Ordinal > & | indices, | |||
| const Teuchos::ArrayView< Scalar > & | values | |||
| ) | const |
Returns a copy of the specified local row, column indices are local.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::getGlobalRowCopy | ( | Ordinal | globalRow, | |
| const Teuchos::ArrayView< Ordinal > & | indices, | |||
| const Teuchos::ArrayView< Scalar > & | values | |||
| ) | const |
Returns a copy of the specified (and locally owned) global row, column indices are global.
| void Tpetra::CrsMatrix< Ordinal, Scalar >::print | ( | std::ostream & | os | ) | const [virtual] |
Prints the matrix on the specified stream. This is very verbose.
Reimplemented from Teuchos::Object.
1.4.7