#include <Xpetra_BlockedCrsMatrix.hpp>
Public Types | |
| typedef Scalar | scalar_type |
| typedef LocalOrdinal | local_ordinal_type |
| typedef GlobalOrdinal | global_ordinal_type |
| typedef Node | node_type |
Public Member Functions | |
| global_size_t | getGlobalNumRows () const |
| Returns the number of global rows. | |
| global_size_t | getGlobalNumCols () const |
| Returns the number of global columns in the matrix. | |
| size_t | getNodeNumRows () const |
| Returns the number of matrix rows owned on the calling node. | |
| global_size_t | getGlobalNumEntries () const |
| Returns the global number of entries in this matrix. | |
| size_t | getNodeNumEntries () const |
| Returns the local number of entries in this matrix. | |
| size_t | getNumEntriesInLocalRow (LocalOrdinal localRow) const |
| Returns the current number of entries on this node in the specified local row. | |
| global_size_t | getGlobalNumDiags () const |
| Returns the number of global diagonal entries, based on global row/column index comparisons. | |
| size_t | getNodeNumDiags () const |
| Returns the number of local diagonal entries, based on global row/column index comparisons. | |
| size_t | getGlobalMaxNumRowEntries () const |
| Returns the maximum number of entries across all rows/columns on all nodes. | |
| size_t | getNodeMaxNumRowEntries () const |
| Returns the maximum number of entries across all rows/columns on this node. | |
| bool | isLocallyIndexed () const |
| If matrix indices of all matrix blocks are in the local range, this function returns true. Otherwise, this function returns false. | |
| bool | isGloballyIndexed () const |
| If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. | |
| bool | isFillComplete () const |
Returns true if fillComplete() has been called and the matrix is in compute mode. | |
| virtual void | getLocalRowCopy (LocalOrdinal LocalRow, const ArrayView< LocalOrdinal > &Indices, const ArrayView< Scalar > &Values, size_t &NumEntries) const |
| Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine. | |
| void | getGlobalRowView (GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const |
| Extract a const, non-persisting view of global indices in a specified row of the matrix. | |
| void | getLocalRowView (LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const |
| Extract a const, non-persisting view of local indices in a specified row of the matrix. | |
| void | getLocalDiagCopy (Vector &diag) const |
| Get a copy of the diagonal entries owned by this node, with local row idices. | |
| virtual ScalarTraits< Scalar > ::magnitudeType | getFrobeniusNorm () const |
| Get Frobenius norm of the matrix. | |
| const Teuchos::RCP< const Map > | getMap () const |
| Implements DistObject interface. | |
| void | doImport (const Matrix &source, const Import &importer, CombineMode CM) |
| Import. | |
| void | doExport (const Matrix &dest, const Import &importer, CombineMode CM) |
| Export. | |
| void | doImport (const Matrix &source, const Export &exporter, CombineMode CM) |
| Import (using an Exporter). | |
| void | doExport (const Matrix &dest, const Export &exporter, CombineMode CM) |
| Export (using an Importer). | |
Private Member Functions | |
| void | CreateDefaultView () |
Private Attributes | |
| Teuchos::RCP< const MapExtractor > | domainmaps_ |
| Teuchos::RCP< const MapExtractor > | rangemaps_ |
| Teuchos::RCP< Map > | fullrowmap_ |
| Teuchos::RCP< Map > | fullcolmap_ |
| std::vector< Teuchos::RCP < CrsMatrix > > | blocks_ |
Constructor/Destructor Methods | |
| BlockedCrsMatrix (Teuchos::RCP< const MapExtractor > &rangeMaps, Teuchos::RCP< const MapExtractor > &domainMaps, size_t npr, Xpetra::ProfileType pftype=Xpetra::DynamicProfile) | |
| Constructor. | |
| virtual | ~BlockedCrsMatrix () |
| Destructor. | |
Insertion/Removal Methods | |
| void | insertGlobalValues (GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals) |
| Insert matrix entries, using global IDs. | |
| void | insertLocalValues (LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals) |
| Insert matrix entries, using local IDs. | |
| void | removeEmptyProcessesInPlace (const Teuchos::RCP< const Map > &newMap) |
| void | replaceGlobalValues (GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &cols, const ArrayView< const Scalar > &vals) |
| Replace matrix entries, using global IDs. | |
| void | replaceLocalValues (LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &cols, const ArrayView< const Scalar > &vals) |
| Replace matrix entries, using local IDs. | |
| virtual void | setAllToScalar (const Scalar &alpha) |
| Set all matrix entries equal to scalar. | |
| void | scale (const Scalar &alpha) |
| Scale the current values of a matrix, this = alpha*this. | |
Transformational Methods | |
| void | resumeFill (const RCP< ParameterList > ¶ms=null) |
| void | fillComplete (const RCP< const Map > &domainMap, const RCP< const Map > &rangeMap, const RCP< ParameterList > ¶ms=null) |
| Signal that data entry is complete, specifying domain and range maps. | |
| void | fillComplete (const RCP< ParameterList > ¶ms=null) |
| Signal that data entry is complete. | |
Methods implementing Matrix | |
Multiplies this matrix by a MultiVector.
Both are required to have constant stride, and they are not permitted to ocupy overlapping space. No runtime checking will be performed in a non-debug build. This method is templated on the scalar type of MultiVector objects, allowing this method to be applied to MultiVector objects of arbitrary type. However, it is recommended that multiply() not be called directly; instead, use the CrsMatrixMultiplyOp, as it will handle the import/exprt operations required to apply a matrix with non-trivial communication needs. If | |
| virtual void | apply (const MultiVector &X, MultiVector &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=ScalarTraits< Scalar >::one(), Scalar beta=ScalarTraits< Scalar >::zero()) const |
| Computes the sparse matrix-multivector multiplication. | |
| const RCP< const Map > | getDomainMap () const |
Returns the Map associated with the full domain of this operator. This will be null until fillComplete() is called. | |
| const RCP< const Map > | getDomainMap (size_t i) const |
Returns the Map associated with the i'th block domain of this operator. This will be null until fillComplete() is called. | |
| const RCP< const Map > | getRangeMap () const |
| const RCP< const Map > | getRangeMap (size_t i) const |
| const RCP< const MapExtractor > | getRangeMapExtractor () |
| Returns map extractor class for range map. | |
| const RCP< const MapExtractor > | getDomainMapExtractor () |
| Returns map extractor for domain map. | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
| Return a simple one-line description of this object. | |
| void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
| Print the object with some verbosity level to an FancyOStream object. | |
| RCP< const CrsGraph > | getCrsGraph () const |
| Returns the CrsGraph associated with this matrix. | |
Block matrix access | |
| virtual size_t | Rows () const |
| number of row blocks | |
| virtual size_t | Cols () const |
| number of column blocks | |
| Teuchos::RCP< CrsMatrix > | getMatrix (size_t r, size_t c) const |
| return block (r,c) | |
| void | setMatrix (size_t r, size_t c, Teuchos::RCP< CrsMatrix > mat) |
| set matrix block | |
| Teuchos::RCP< CrsMatrix > | Merge () const |
| merge BlockedCrsMatrix blocks in a CrsMatrix | |
helper functions | |
| void | Add (const CrsMatrix &A, const Scalar scalarA, CrsMatrix &B, const Scalar scalarB) const |
| Add a Xpetra::CrsMatrix to another: B = B*scalarB + A*scalarA. | |
Definition at line 83 of file Xpetra_BlockedCrsMatrix.hpp.
| typedef Scalar Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type |
Reimplemented from Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 86 of file Xpetra_BlockedCrsMatrix.hpp.
| typedef LocalOrdinal Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type |
Reimplemented from Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 87 of file Xpetra_BlockedCrsMatrix.hpp.
| typedef GlobalOrdinal Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type |
Reimplemented from Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 88 of file Xpetra_BlockedCrsMatrix.hpp.
| typedef Node Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type |
Reimplemented from Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 89 of file Xpetra_BlockedCrsMatrix.hpp.
| Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedCrsMatrix | ( | Teuchos::RCP< const MapExtractor > & | rangeMaps, |
| Teuchos::RCP< const MapExtractor > & | domainMaps, | ||
| size_t | npr, | ||
| Xpetra::ProfileType | pftype = Xpetra::DynamicProfile |
||
| ) | [inline] |
Constructor.
| rangeMaps | range maps for all blocks |
| domainMaps | domain maps for all blocks |
| npr | extimated number of entries per row in each block(!) |
| pftype | Xpetra profile type |
Definition at line 107 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~BlockedCrsMatrix | ( | ) | [inline, virtual] |
Destructor.
Definition at line 124 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::insertGlobalValues | ( | GlobalOrdinal | globalRow, |
| const ArrayView< const GlobalOrdinal > & | cols, | ||
| const ArrayView< const Scalar > & | vals | ||
| ) | [inline, virtual] |
Insert matrix entries, using global IDs.
All index values must be in the global space.
globalRow exists as an ID in the global row map isLocallyIndexed() == false isStorageOptimized() == falseisGloballyIndexed() == trueglobalRow does not belong to the matrix on this node, then it will be communicated to the appropriate node when globalAssemble() is called (which will, at the latest, occur during the next call to fillComplete().) Otherwise, the entries will be inserted in the local matrix.cols, then the new values will be summed with the old values; this may happen at insertion or during the next call to fillComplete().hasColMap() == true, only (cols[i],vals[i]) where cols[i] belongs to the column map on this node will be inserted into the matrix. Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 155 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::insertLocalValues | ( | LocalOrdinal | localRow, |
| const ArrayView< const LocalOrdinal > & | cols, | ||
| const ArrayView< const Scalar > & | vals | ||
| ) | [inline, virtual] |
Insert matrix entries, using local IDs.
All index values must be in the local space.
localRow exists as an ID in the local row map isGloballyIndexed() == false isStorageOptimized() == falseisLocallyIndexed() == true Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 167 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::removeEmptyProcessesInPlace | ( | const Teuchos::RCP< const Map > & | newMap | ) | [inline] |
Definition at line 171 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValues | ( | GlobalOrdinal | globalRow, |
| const ArrayView< const GlobalOrdinal > & | cols, | ||
| const ArrayView< const Scalar > & | vals | ||
| ) | [inline, virtual] |
Replace matrix entries, using global IDs.
All index values must be in the global space.
globalRow is a global row belonging to the matrix on this node.Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 184 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValues | ( | LocalOrdinal | localRow, |
| const ArrayView< const LocalOrdinal > & | cols, | ||
| const ArrayView< const Scalar > & | vals | ||
| ) | [inline, virtual] |
Replace matrix entries, using local IDs.
All index values must be in the local space. Note that if a value is not already present for the specified location in the matrix, the input value will be ignored silently.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 195 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setAllToScalar | ( | const Scalar & | alpha | ) | [inline, virtual] |
Set all matrix entries equal to scalar.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 202 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale | ( | const Scalar & | alpha | ) | [inline, virtual] |
Scale the current values of a matrix, this = alpha*this.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 207 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::resumeFill | ( | const RCP< ParameterList > & | params = null | ) | [inline, virtual] |
Resume fill operations. After calling fillComplete(), resumeFill() must be called before initiating any changes to the matrix.
resumeFill() may be called repeatedly.
isFillActive() == true isFillComplete() == false Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 224 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::fillComplete | ( | const RCP< const Map > & | domainMap, |
| const RCP< const Map > & | rangeMap, | ||
| const RCP< ParameterList > & | params = null |
||
| ) | [inline, virtual] |
Signal that data entry is complete, specifying domain and range maps.
Off-node indices are distributed (via globalAssemble()), indices are sorted, redundant indices are eliminated, and global indices are transformed to local indices.
isFillActive() == true isFillComplete()() == false isFillActive() == false isFillComplete() == true if os == DoOptimizeStorage, then isStorageOptimized() == true Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 241 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::fillComplete | ( | const RCP< ParameterList > & | params = null | ) | [inline, virtual] |
Signal that data entry is complete.
Off-node entries are distributed (via globalAssemble()), repeated entries are summed, and global indices are transformed to local indices.
isFillActive() == true isFillComplete()() == false isFillActive() == false isFillComplete() == true if os == DoOptimizeStorage, then isStorageOptimized() == true Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 259 of file Xpetra_BlockedCrsMatrix.hpp.
| global_size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumRows | ( | ) | const [inline, virtual] |
Returns the number of global rows.
Undefined if isFillActive().
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 313 of file Xpetra_BlockedCrsMatrix.hpp.
| global_size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumCols | ( | ) | const [inline, virtual] |
Returns the number of global columns in the matrix.
Undefined if isFillActive().
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 329 of file Xpetra_BlockedCrsMatrix.hpp.
| size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumRows | ( | ) | const [inline, virtual] |
Returns the number of matrix rows owned on the calling node.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 343 of file Xpetra_BlockedCrsMatrix.hpp.
| global_size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumEntries | ( | ) | const [inline, virtual] |
Returns the global number of entries in this matrix.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 357 of file Xpetra_BlockedCrsMatrix.hpp.
| size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumEntries | ( | ) | const [inline, virtual] |
Returns the local number of entries in this matrix.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 369 of file Xpetra_BlockedCrsMatrix.hpp.
| size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumEntriesInLocalRow | ( | LocalOrdinal | localRow | ) | const [inline, virtual] |
Returns the current number of entries on this node in the specified local row.
Returns OrdinalTraits<size_t>::invalid() if the specified local row is not valid for this matrix.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 382 of file Xpetra_BlockedCrsMatrix.hpp.
| global_size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumDiags | ( | ) | const [inline, virtual] |
Returns the number of global diagonal entries, based on global row/column index comparisons.
Undefined if isFillActive().
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 389 of file Xpetra_BlockedCrsMatrix.hpp.
| size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumDiags | ( | ) | const [inline, virtual] |
Returns the number of local diagonal entries, based on global row/column index comparisons.
Undefined if isFillActive().
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 396 of file Xpetra_BlockedCrsMatrix.hpp.
| size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalMaxNumRowEntries | ( | ) | const [inline, virtual] |
Returns the maximum number of entries across all rows/columns on all nodes.
Undefined if isFillActive().
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 403 of file Xpetra_BlockedCrsMatrix.hpp.
| size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeMaxNumRowEntries | ( | ) | const [inline, virtual] |
Returns the maximum number of entries across all rows/columns on this node.
Undefined if isFillActive().
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 410 of file Xpetra_BlockedCrsMatrix.hpp.
| bool Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isLocallyIndexed | ( | ) | const [inline, virtual] |
If matrix indices of all matrix blocks are in the local range, this function returns true. Otherwise, this function returns false.
if false, then this does not automatically mean that all blocks are globally indexed. The user has to make sure, that all matrix blocks are indexed in the same way (locally or globally). Otherwise the block matrix is not valid...
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 418 of file Xpetra_BlockedCrsMatrix.hpp.
| bool Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isGloballyIndexed | ( | ) | const [inline, virtual] |
If matrix indices are in the global range, this function returns true. Otherwise, this function returns false.
if false, then this does not automatically mean that all blocks are locally indexed. The user has to make sure, that all matrix blocks are indexed in the same way (locally or globally). Otherwise the block matrix is not valid...
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 429 of file Xpetra_BlockedCrsMatrix.hpp.
| bool Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isFillComplete | ( | ) | const [inline, virtual] |
Returns true if fillComplete() has been called and the matrix is in compute mode.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 437 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalRowCopy | ( | LocalOrdinal | LocalRow, |
| const ArrayView< LocalOrdinal > & | Indices, | ||
| const ArrayView< Scalar > & | Values, | ||
| size_t & | NumEntries | ||
| ) | const [inline, virtual] |
Extract a list of entries in a specified local row of the matrix. Put into storage allocated by calling routine.
| LocalRow | - (In) Local row number for which indices are desired. |
| Indices | - (Out) Local column indices corresponding to values. |
| Values | - (Out) Matrix values. |
| NumIndices | - (Out) Number of indices. |
Note: A std::runtime_error exception is thrown if either Indices or Values is not large enough to hold the data associated with row LocalRow. If LocalRow is not valid for this node, then Indices and Values are unchanged and NumIndices is returned as OrdinalTraits<size_t>::invalid().
isLocallyIndexed()==true or hasColMap() == true Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 459 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowView | ( | GlobalOrdinal | GlobalRow, |
| ArrayView< const GlobalOrdinal > & | indices, | ||
| ArrayView< const Scalar > & | values | ||
| ) | const [inline, virtual] |
Extract a const, non-persisting view of global indices in a specified row of the matrix.
| GlobalRow | - (In) Global row number for which indices are desired. |
| Indices | - (Out) Global column indices corresponding to values. |
| Values | - (Out) Row values |
isLocallyIndexed() == false indices.size() == getNumEntriesInGlobalRow(GlobalRow)Note: If GlobalRow does not belong to this node, then indices is set to null.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 476 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalRowView | ( | LocalOrdinal | LocalRow, |
| ArrayView< const LocalOrdinal > & | indices, | ||
| ArrayView< const Scalar > & | values | ||
| ) | const [inline, virtual] |
Extract a const, non-persisting view of local indices in a specified row of the matrix.
| LocalRow | - (In) Local row number for which indices are desired. |
| Indices | - (Out) Global column indices corresponding to values. |
| Values | - (Out) Row values |
isGloballyIndexed() == false indices.size() == getNumEntriesInLocalRow(LocalRow)Note: If LocalRow does not belong to this node, then indices is set to null.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 490 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalDiagCopy | ( | Vector & | diag | ) | const [inline, virtual] |
Get a copy of the diagonal entries owned by this node, with local row idices.
Returns a distributed Vector object partitioned according to this matrix's row map, containing the the zero and non-zero diagonals owned by this node.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 498 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual ScalarTraits<Scalar>::magnitudeType Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getFrobeniusNorm | ( | ) | const [inline, virtual] |
Get Frobenius norm of the matrix.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 503 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::apply | ( | const MultiVector & | X, |
| MultiVector & | Y, | ||
| Teuchos::ETransp | mode = Teuchos::NO_TRANS, |
||
| Scalar | alpha = ScalarTraits<Scalar>::one(), |
||
| Scalar | beta = ScalarTraits<Scalar>::zero() |
||
| ) | const [inline, virtual] |
Computes the sparse matrix-multivector multiplication.
Performs
, with one special exceptions:
beta == 0, apply() overwrites Y, so that any values in Y (including NaNs) are ignored. Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 541 of file Xpetra_BlockedCrsMatrix.hpp.
| const RCP<const Map > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap | ( | ) | const [inline, virtual] |
Returns the Map associated with the full domain of this operator. This will be null until fillComplete() is called.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 601 of file Xpetra_BlockedCrsMatrix.hpp.
| const RCP<const Map > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap | ( | size_t | i | ) | const [inline] |
Returns the Map associated with the i'th block domain of this operator. This will be null until fillComplete() is called.
Definition at line 605 of file Xpetra_BlockedCrsMatrix.hpp.
| const RCP<const Map > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap | ( | ) | const [inline, virtual] |
Returns the Map associated with the full range of this operator. This will be null until fillComplete() is called.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 609 of file Xpetra_BlockedCrsMatrix.hpp.
| const RCP<const Map > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap | ( | size_t | i | ) | const [inline] |
Returns the Map associated with the i'th block range of this operator. This will be null until fillComplete() is called.
Definition at line 613 of file Xpetra_BlockedCrsMatrix.hpp.
| const RCP<const MapExtractor> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMapExtractor | ( | ) | [inline] |
Returns map extractor class for range map.
Definition at line 616 of file Xpetra_BlockedCrsMatrix.hpp.
| const RCP<const MapExtractor> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMapExtractor | ( | ) | [inline] |
Returns map extractor for domain map.
Definition at line 619 of file Xpetra_BlockedCrsMatrix.hpp.
| const Teuchos::RCP< const Map > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMap | ( | ) | const [inline, virtual] |
Implements DistObject interface.
Access function for the Tpetra::Map this DistObject was constructed with.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 627 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doImport | ( | const Matrix & | source, |
| const Import & | importer, | ||
| CombineMode | CM | ||
| ) | [inline, virtual] |
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 632 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doExport | ( | const Matrix & | dest, |
| const Import & | importer, | ||
| CombineMode | CM | ||
| ) | [inline, virtual] |
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 637 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doImport | ( | const Matrix & | source, |
| const Export & | exporter, | ||
| CombineMode | CM | ||
| ) | [inline, virtual] |
Import (using an Exporter).
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 642 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doExport | ( | const Matrix & | dest, |
| const Export & | exporter, | ||
| CombineMode | CM | ||
| ) | [inline, virtual] |
Export (using an Importer).
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 647 of file Xpetra_BlockedCrsMatrix.hpp.
| std::string Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description | ( | ) | const [inline, virtual] |
Return a simple one-line description of this object.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 657 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe | ( | Teuchos::FancyOStream & | out, |
| const Teuchos::EVerbosityLevel | verbLevel = Teuchos::Describable::verbLevel_default |
||
| ) | const [inline, virtual] |
Print the object with some verbosity level to an FancyOStream object.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 660 of file Xpetra_BlockedCrsMatrix.hpp.
| RCP<const CrsGraph> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getCrsGraph | ( | ) | const [inline, virtual] |
Returns the CrsGraph associated with this matrix.
Implements Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 684 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Rows | ( | ) | const [inline, virtual] |
number of row blocks
Definition at line 694 of file Xpetra_BlockedCrsMatrix.hpp.
| virtual size_t Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Cols | ( | ) | const [inline, virtual] |
number of column blocks
Definition at line 697 of file Xpetra_BlockedCrsMatrix.hpp.
| Teuchos::RCP<CrsMatrix> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMatrix | ( | size_t | r, |
| size_t | c | ||
| ) | const [inline] |
return block (r,c)
Definition at line 700 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setMatrix | ( | size_t | r, |
| size_t | c, | ||
| Teuchos::RCP< CrsMatrix > | mat | ||
| ) | [inline] |
set matrix block
Definition at line 703 of file Xpetra_BlockedCrsMatrix.hpp.
| Teuchos::RCP<CrsMatrix> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Merge | ( | ) | const [inline] |
merge BlockedCrsMatrix blocks in a CrsMatrix
Definition at line 716 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Add | ( | const CrsMatrix & | A, |
| const Scalar | scalarA, | ||
| CrsMatrix & | B, | ||
| const Scalar | scalarB | ||
| ) | const [inline, private] |
Add a Xpetra::CrsMatrix to another: B = B*scalarB + A*scalarA.
Note, that this routine works only correctly if A only has entries which are empty (zero) in B. We use the insertGlobalValues routine for inserting the new values from A in B. The sumIntoGlobalValues routine is not implemented in Xpetra (and would not extend the graph of B for new entries). Here we need something to catch the exceptions of a future implementation of sumIntoGlobalValues that then adds the remaining new entries with insertGlobal Values.
This routine is private and used only by Merge. Since the blocks in BlockedCrsMatrix are seperated, this routine works for merging a BlockedCrsMatrix.
Definition at line 750 of file Xpetra_BlockedCrsMatrix.hpp.
| void Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::CreateDefaultView | ( | ) | [inline, private] |
Definition at line 790 of file Xpetra_BlockedCrsMatrix.hpp.
Teuchos::RCP<const MapExtractor> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::domainmaps_ [private] |
Definition at line 800 of file Xpetra_BlockedCrsMatrix.hpp.
Teuchos::RCP<const MapExtractor> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::rangemaps_ [private] |
Definition at line 801 of file Xpetra_BlockedCrsMatrix.hpp.
Teuchos::RCP<Map> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::fullrowmap_ [private] |
Definition at line 802 of file Xpetra_BlockedCrsMatrix.hpp.
Teuchos::RCP<Map> Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::fullcolmap_ [private] |
Definition at line 803 of file Xpetra_BlockedCrsMatrix.hpp.
std::vector<Teuchos::RCP<CrsMatrix> > Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::blocks_ [private] |
Definition at line 805 of file Xpetra_BlockedCrsMatrix.hpp.
1.7.6.1