|
Ifpack2 Templated Preconditioning Package
Version 1.0
|
Sparse matrix (Tpetra::RowMatrix subclass) with ghost rows. More...
#include <Ifpack2_OverlappingRowMatrix_decl.hpp>
Public Types | |
Typedefs | |
| typedef MatrixType::scalar_type | scalar_type |
|
typedef MatrixType::local_ordinal_type | local_ordinal_type |
|
typedef MatrixType::global_ordinal_type | global_ordinal_type |
| typedef MatrixType::node_type | node_type |
|
typedef Teuchos::ScalarTraits < scalar_type >::magnitudeType | magnitude_type |
|
typedef Tpetra::RowMatrix < scalar_type, local_ordinal_type, global_ordinal_type, node_type > | row_matrix_type |
Public Member Functions | |
Constructors and destructor | |
| OverlappingRowMatrix (const Teuchos::RCP< const row_matrix_type > &A, const int overlapLevel) | |
| OverlappingRowMatrix (const Teuchos::RCP< const row_matrix_type > &A, const int overlapLevel, const int subdomainID) | |
| Subdomain constructor (NOT CURRENTLY IMPLEMENTED). | |
| ~OverlappingRowMatrix () | |
| Destructor. | |
Matrix query methods | |
| virtual Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
| The communicator over which the matrix is distributed. | |
| virtual Teuchos::RCP< node_type > | getNode () const |
| The matrix's Kokkos Node instance. | |
| virtual Teuchos::RCP< const Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > > | getRowMap () const |
| The Map that describes the distribution of rows over processes. | |
| virtual Teuchos::RCP< const Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > > | getColMap () const |
| The Map that describes the distribution of columns over processes. | |
| virtual Teuchos::RCP< const Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > > | getDomainMap () const |
| The Map that describes the domain of this matrix. | |
| virtual Teuchos::RCP< const Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > > | getRangeMap () const |
| The Map that describes the range of this matrix. | |
| virtual Teuchos::RCP< const Tpetra::RowGraph < local_ordinal_type, global_ordinal_type, node_type > > | getGraph () const |
| This matrix's graph. | |
| virtual global_size_t | getGlobalNumRows () const |
| The global number of rows in this matrix. | |
| virtual global_size_t | getGlobalNumCols () const |
| The global number of columns in this matrix. | |
| virtual size_t | getNodeNumRows () const |
| The number of rows owned by the calling process. | |
| virtual size_t | getNodeNumCols () const |
| The number of columns owned by the calling process. | |
| virtual global_ordinal_type | getIndexBase () const |
| The index base for global indices for this matrix. | |
| virtual global_size_t | getGlobalNumEntries () const |
| The global number of entries in this matrix. | |
| virtual size_t | getNodeNumEntries () const |
| The number of entries in this matrix owned by the calling process. | |
| virtual size_t | getNumEntriesInGlobalRow (global_ordinal_type globalRow) const |
| The number of entries in the given global row that are owned by the calling process. | |
| virtual size_t | getNumEntriesInLocalRow (local_ordinal_type localRow) const |
| The number of entries in the given local row that are owned by the calling process. | |
| virtual global_size_t | getGlobalNumDiags () const |
| The global number of diagonal entries. | |
| virtual size_t | getNodeNumDiags () const |
| The number of diagonal entries owned by the calling process. | |
| virtual size_t | getGlobalMaxNumRowEntries () const |
| The maximum number of entries in any row on any process. | |
| virtual size_t | getNodeMaxNumRowEntries () const |
| The maximum number of entries in any row on the calling process. | |
| virtual bool | hasColMap () const |
| Whether this matrix has a column Map. | |
| virtual bool | isLowerTriangular () const |
| Whether this matrix is lower triangular. | |
| virtual bool | isUpperTriangular () const |
| Whether this matrix is upper triangular. | |
| virtual bool | isLocallyIndexed () const |
| Whether this matrix is locally indexed. | |
| virtual bool | isGloballyIndexed () const |
| Whether this matrix is globally indexed. | |
| virtual bool | isFillComplete () const |
true if fillComplete() has been called, else false. | |
| virtual bool | supportsRowViews () const |
true if row views are supported, else false. | |
Extraction methods | |
| virtual void | getGlobalRowCopy (global_ordinal_type GlobalRow, const Teuchos::ArrayView< global_ordinal_type > &Indices, const Teuchos::ArrayView< scalar_type > &Values, size_t &NumEntries) const |
| Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage. | |
| virtual void | getLocalRowCopy (local_ordinal_type LocalRow, const Teuchos::ArrayView< local_ordinal_type > &Indices, const Teuchos::ArrayView< scalar_type > &Values, size_t &NumEntries) const |
| Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine. | |
| virtual void | getGlobalRowView (global_ordinal_type GlobalRow, Teuchos::ArrayView< const global_ordinal_type > &indices, Teuchos::ArrayView< const scalar_type > &values) const |
| Extract a const, non-persisting view of global indices in a specified row of the matrix. | |
| virtual void | getLocalRowView (local_ordinal_type LocalRow, Teuchos::ArrayView< const local_ordinal_type > &indices, Teuchos::ArrayView< const scalar_type > &values) const |
| Extract a const, non-persisting view of local indices in a specified row of the matrix. | |
| virtual void | getLocalDiagCopy (Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &diag) const |
| Get a copy of the diagonal entries owned by this node, with local row indices. | |
Mathematical methods | |
| virtual void | leftScale (const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &x) |
| Scales the RowMatrix on the left with the Vector x. | |
| virtual void | rightScale (const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &x) |
| Scales the RowMatrix on the right with the Vector x. | |
| virtual Teuchos::ScalarTraits < scalar_type >::magnitudeType | getFrobeniusNorm () const |
| Returns the Frobenius norm of the matrix. | |
| virtual void | apply (const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const |
| Computes the operator-multivector application. | |
| virtual bool | hasTransposeApply () const |
| Whether this operator's apply() method can apply the adjoint (transpose). | |
| virtual void | importMultiVector (const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &OvX, Tpetra::CombineMode CM=Tpetra::INSERT) |
| virtual void | exportMultiVector (const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &OvX, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::CombineMode CM=Tpetra::ADD) |
Sparse matrix (Tpetra::RowMatrix subclass) with ghost rows.
| MatrixType | Tpetra::RowMatrix or Tpetra::CrsMatrix specialization. |
| Ifpack2::OverlappingRowMatrix< MatrixType >::OverlappingRowMatrix | ( | const Teuchos::RCP< const row_matrix_type > & | A, |
| const int | overlapLevel | ||
| ) |
Standard constructor.
| A | [in] The input matrix. Currently this class requires that A be a Tpetra::CrsMatrix instance with the same first four template parameters as MatrixType, and with a default fifth template parameter. Furthermore, A must have a nonoverlapping row Map and must be distributed over more than one MPI process. |
| overlapLevel | [in] The number of levels of overlap. |
| Ifpack2::OverlappingRowMatrix< MatrixType >::OverlappingRowMatrix | ( | const Teuchos::RCP< const row_matrix_type > & | A, |
| const int | overlapLevel, | ||
| const int | subdomainID | ||
| ) |
Subdomain constructor (NOT CURRENTLY IMPLEMENTED).
| Ifpack2::OverlappingRowMatrix< MatrixType >::~OverlappingRowMatrix | ( | ) |
Destructor.
| Teuchos::RCP< const Teuchos::Comm< int > > Ifpack2::OverlappingRowMatrix< MatrixType >::getComm | ( | ) | const [virtual] |
The communicator over which the matrix is distributed.
| Teuchos::RCP< typename MatrixType::node_type > Ifpack2::OverlappingRowMatrix< MatrixType >::getNode | ( | ) | const [virtual] |
The matrix's Kokkos Node instance.
| Teuchos::RCP< const Tpetra::Map< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > Ifpack2::OverlappingRowMatrix< MatrixType >::getRowMap | ( | ) | const [virtual] |
The Map that describes the distribution of rows over processes.
| Teuchos::RCP< const Tpetra::Map< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > Ifpack2::OverlappingRowMatrix< MatrixType >::getColMap | ( | ) | const [virtual] |
The Map that describes the distribution of columns over processes.
| Teuchos::RCP< const Tpetra::Map< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > Ifpack2::OverlappingRowMatrix< MatrixType >::getDomainMap | ( | ) | const [virtual] |
The Map that describes the domain of this matrix.
The domain is the distribution of valid input vectors of apply().
| Teuchos::RCP< const Tpetra::Map< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > Ifpack2::OverlappingRowMatrix< MatrixType >::getRangeMap | ( | ) | const [virtual] |
The Map that describes the range of this matrix.
The domain is the distribution of valid output vectors of apply().
| Teuchos::RCP< const Tpetra::RowGraph< typename MatrixType::local_ordinal_type, typename MatrixType::global_ordinal_type, typename MatrixType::node_type > > Ifpack2::OverlappingRowMatrix< MatrixType >::getGraph | ( | ) | const [virtual] |
This matrix's graph.
| global_size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalNumRows | ( | ) | const [virtual] |
The global number of rows in this matrix.
| global_size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalNumCols | ( | ) | const [virtual] |
The global number of columns in this matrix.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNodeNumRows | ( | ) | const [virtual] |
The number of rows owned by the calling process.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNodeNumCols | ( | ) | const [virtual] |
The number of columns owned by the calling process.
This is the number of columns needed to apply the forward operator on the calling process, that is, the number of elements listed in the column Map on the calling process.
| MatrixType::global_ordinal_type Ifpack2::OverlappingRowMatrix< MatrixType >::getIndexBase | ( | ) | const [virtual] |
The index base for global indices for this matrix.
| Tpetra::global_size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalNumEntries | ( | ) | const [virtual] |
The global number of entries in this matrix.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNodeNumEntries | ( | ) | const [virtual] |
The number of entries in this matrix owned by the calling process.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNumEntriesInGlobalRow | ( | global_ordinal_type | globalRow | ) | const [virtual] |
The number of entries in the given global row that are owned by the calling process.
| globalRow | [in] Global index of the row. |
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNumEntriesInLocalRow | ( | local_ordinal_type | localRow | ) | const [virtual] |
The number of entries in the given local row that are owned by the calling process.
| globalRow | [in] Local index of the row. |
| global_size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalNumDiags | ( | ) | const [virtual] |
The global number of diagonal entries.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNodeNumDiags | ( | ) | const [virtual] |
The number of diagonal entries owned by the calling process.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalMaxNumRowEntries | ( | ) | const [virtual] |
The maximum number of entries in any row on any process.
| size_t Ifpack2::OverlappingRowMatrix< MatrixType >::getNodeMaxNumRowEntries | ( | ) | const [virtual] |
The maximum number of entries in any row on the calling process.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::hasColMap | ( | ) | const [virtual] |
Whether this matrix has a column Map.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::isLowerTriangular | ( | ) | const [virtual] |
Whether this matrix is lower triangular.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::isUpperTriangular | ( | ) | const [virtual] |
Whether this matrix is upper triangular.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::isLocallyIndexed | ( | ) | const [virtual] |
Whether this matrix is locally indexed.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::isGloballyIndexed | ( | ) | const [virtual] |
Whether this matrix is globally indexed.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::isFillComplete | ( | ) | const [virtual] |
true if fillComplete() has been called, else false.
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::supportsRowViews | ( | ) | const [virtual] |
true if row views are supported, else false.
| void Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalRowCopy | ( | global_ordinal_type | GlobalRow, |
| const Teuchos::ArrayView< global_ordinal_type > & | Indices, | ||
| const Teuchos::ArrayView< scalar_type > & | Values, | ||
| size_t & | NumEntries | ||
| ) | const [virtual] |
Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.
| LocalRow | - (In) Global row number for which indices are desired. |
| Indices | - (Out) Global column indices corresponding to values. |
| Values | - (Out) Matrix values. |
| NumEntries | - (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 GlobalRow. If GlobalRow does not belong to this node, then Indices and Values are unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().
| void Ifpack2::OverlappingRowMatrix< MatrixType >::getLocalRowCopy | ( | local_ordinal_type | LocalRow, |
| const Teuchos::ArrayView< local_ordinal_type > & | Indices, | ||
| const Teuchos::ArrayView< scalar_type > & | Values, | ||
| size_t & | NumEntries | ||
| ) | const [virtual] |
Extract a list of entries in a specified local row of the graph. 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 Teuchos::OrdinalTraits<size_t>::invalid().
| void Ifpack2::OverlappingRowMatrix< MatrixType >::getGlobalRowView | ( | global_ordinal_type | GlobalRow, |
| Teuchos::ArrayView< const global_ordinal_type > & | indices, | ||
| Teuchos::ArrayView< const scalar_type > & | values | ||
| ) | const [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.
| void Ifpack2::OverlappingRowMatrix< MatrixType >::getLocalRowView | ( | local_ordinal_type | LocalRow, |
| Teuchos::ArrayView< const local_ordinal_type > & | indices, | ||
| Teuchos::ArrayView< const scalar_type > & | values | ||
| ) | const [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.
| void Ifpack2::OverlappingRowMatrix< MatrixType >::getLocalDiagCopy | ( | Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > & | diag | ) | const [virtual] |
Get a copy of the diagonal entries owned by this node, with local row indices.
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.
| void Ifpack2::OverlappingRowMatrix< MatrixType >::leftScale | ( | const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > & | x | ) | [virtual] |
Scales the RowMatrix on the left with the Vector x.
This matrix will be scaled such that A(i,j) = x(i)*A(i,j) where i denoes the global row number of A and j denotes the global column number of A.
| x | A vector to left scale this matrix. |
| void Ifpack2::OverlappingRowMatrix< MatrixType >::rightScale | ( | const Tpetra::Vector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > & | x | ) | [virtual] |
Scales the RowMatrix on the right with the Vector x.
This matrix will be scaled such that A(i,j) = x(j)*A(i,j) where i denoes the global row number of A and j denotes the global column number of A.
| x | A vector to right scale this matrix. |
| Teuchos::ScalarTraits< typename MatrixType::scalar_type >::magnitudeType Ifpack2::OverlappingRowMatrix< MatrixType >::getFrobeniusNorm | ( | ) | const [virtual] |
Returns the Frobenius norm of the matrix.
Computes and returns the Frobenius norm of the matrix, defined as: \( \|A\|_F = \sqrt{\sum_{i,j} \|\a_{ij}\|^2} \)
| void Ifpack2::OverlappingRowMatrix< MatrixType >::apply | ( | const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > & | X, |
| Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > & | Y, | ||
| Teuchos::ETransp | mode = Teuchos::NO_TRANS, |
||
| scalar_type | alpha = Teuchos::ScalarTraits<scalar_type>::one(), |
||
| scalar_type | beta = Teuchos::ScalarTraits<scalar_type>::zero() |
||
| ) | const [virtual] |
Computes the operator-multivector application.
Loosely, performs \(Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\). However, the details of operation vary according to the values of alpha and beta. Specifically
beta == 0, apply() must overwrite Y, so that any values in Y (including NaNs) are ignored.alpha == 0, apply() may short-circuit the operator, so that any values in X (including NaNs) are ignored.This is analagous to the *Multiply* function in Ifpack, not the *Apply*
| bool Ifpack2::OverlappingRowMatrix< MatrixType >::hasTransposeApply | ( | ) | const [virtual] |
Whether this operator's apply() method can apply the adjoint (transpose).
1.7.6.1