Inherits RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type >.
|
|
| | LocalFilter (const Teuchos::RCP< const Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > &Matrix) |
| | Constructor. More...
|
| |
| virtual | ~LocalFilter () |
| | Destructor. More...
|
| |
|
| virtual const Teuchos::RCP< const Teuchos::Comm< int > > & | getComm () const |
| | Returns the communicator. More...
|
| |
| virtual Teuchos::RCP< node_type > | getNode () const |
| | Returns the underlying Kokkos Node object. More...
|
| |
| virtual const Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > & | getRowMap () const |
| | Returns the Map that describes the row distribution in this matrix. More...
|
| |
| virtual const Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > & | getColMap () const |
| | Returns the Map that describes the column distribution in this matrix. More...
|
| |
| virtual const Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > & | getDomainMap () const |
| | Returns the Map that describes the domain distribution in this matrix. More...
|
| |
| virtual const Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > & | getRangeMap () const |
| | Returns the Map that describes the range distribution in this matrix. More...
|
| |
| virtual Teuchos::RCP< const Tpetra::RowGraph< local_ordinal_type, global_ordinal_type, node_type > > | getGraph () const |
| | The (locally filtered) matrix's graph. More...
|
| |
| virtual global_size_t | getGlobalNumRows () const |
| | The number of global rows in this matrix. More...
|
| |
| virtual global_size_t | getGlobalNumCols () const |
| | The number of global columns in this matrix. More...
|
| |
| virtual size_t | getNodeNumRows () const |
| | The number of rows owned on the calling process. More...
|
| |
| virtual size_t | getNodeNumCols () const |
| | The number of columns in the (locally filtered) matrix. More...
|
| |
| virtual global_ordinal_type | getIndexBase () const |
| | Returns the index base for global indices for this matrix. More...
|
| |
| virtual global_size_t | getGlobalNumEntries () const |
| | Returns the global number of entries in this matrix. More...
|
| |
| virtual size_t | getNodeNumEntries () const |
| | Returns the local number of entries in this matrix. More...
|
| |
| virtual size_t | getNumEntriesInGlobalRow (global_ordinal_type globalRow) const |
| | The current number of entries on this node in the specified global row. More...
|
| |
| virtual size_t | getNumEntriesInLocalRow (local_ordinal_type localRow) const |
| | The current number of entries on this node in the specified local row. More...
|
| |
| virtual global_size_t | getGlobalNumDiags () const |
| | The number of global diagonal entries, based on global row/column index comparisons. More...
|
| |
| virtual size_t | getNodeNumDiags () const |
| | The number of local diagonal entries, based on global row/column index comparisons. More...
|
| |
| virtual size_t | getGlobalMaxNumRowEntries () const |
| | The maximum number of entries across all rows/columns on all processes. More...
|
| |
| virtual size_t | getNodeMaxNumRowEntries () const |
| | The maximum number of entries across all rows/columns on this process. More...
|
| |
| virtual bool | hasColMap () const |
| | Whether this matrix has a well-defined column Map. More...
|
| |
| virtual bool | isLowerTriangular () const |
| | Whether this matrix is lower triangular. More...
|
| |
| virtual bool | isUpperTriangular () const |
| | Whether this matrix is upper triangular. More...
|
| |
| virtual bool | isLocallyIndexed () const |
| | Whether the underlying sparse matrix is locally (opposite of globally) indexed. More...
|
| |
| virtual bool | isGloballyIndexed () const |
| | Whether the underlying sparse matrix is globally (opposite of locally) indexed. More...
|
| |
| virtual bool | isFillComplete () const |
| | Returns true if fillComplete() has been called. More...
|
| |
| virtual bool | supportsRowViews () const |
| | Returns true if RowViews are supported. More...
|
| |
|
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
|
| 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. More...
|
| |
| 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. More...
|
| |
| virtual magnitude_type | getFrobeniusNorm () const |
| | The Frobenius norm of the (locally filtered) matrix. More...
|
| |
| 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. More...
|
| |
| virtual bool | hasTransposeApply () const |
| | Indicates whether this operator supports applying the adjoint operator. More...
|
| |
|
| virtual TPETRA_DEPRECATED void | getGlobalRowView (global_ordinal_type GlobalRow, Teuchos::ArrayRCP< const global_ordinal_type > &indices, Teuchos::ArrayRCP< const scalar_type > &values) const |
| | Deprecated. Get a persisting const view of the entries in a specified global row of this matrix. More...
|
| |
| virtual TPETRA_DEPRECATED void | getLocalRowView (local_ordinal_type LocalRow, Teuchos::ArrayRCP< const local_ordinal_type > &indices, Teuchos::ArrayRCP< const scalar_type > &values) const |
| | Deprecated. Get a persisting const view of the entries in a specified local row of this matrix. More...
|
| |
|
| typedef MatrixType::scalar_type | scalar_type |
| | The type of the entries of the input MatrixType. More...
|
| |
| typedef MatrixType::local_ordinal_type | local_ordinal_type |
| | The type of local indices in the input MatrixType. More...
|
| |
| typedef MatrixType::global_ordinal_type | global_ordinal_type |
| | The type of global indices in the input MatrixType. More...
|
| |
| typedef MatrixType::node_type | node_type |
| | The type of the Kokkos Node used by the input MatrixType. More...
|
| |
| typedef Teuchos::ScalarTraits< scalar_type >::magnitudeType | magnitude_type |
| | The type of the magnitude (absolute value) of a matrix entry. More...
|
| |
| TEUCHOS_DEPRECATED typedef MatrixType::scalar_type | Scalar |
| | Preserved only for backwards compatibility. Please use "scalar_type". More...
|
| |
| TEUCHOS_DEPRECATED typedef MatrixType::local_ordinal_type | LocalOrdinal |
| | Preserved only for backwards compatibility. Please use "local_ordinal_type". More...
|
| |
| TEUCHOS_DEPRECATED typedef MatrixType::global_ordinal_type | GlobalOrdinal |
| | Preserved only for backwards compatibility. Please use "global_ordinal_type". More...
|
| |
| TEUCHOS_DEPRECATED typedef MatrixType::node_type | Node |
| | Preserved only for backwards compatibility. Please use "node_type". More...
|
| |
| TEUCHOS_DEPRECATED typedef Teuchos::ScalarTraits< scalar_type >::magnitudeType | magnitudeType |
| | Preserved only for backwards compatibility. Please use "magnitude_type". More...
|
| |
template<class MatrixType>
class Ifpack2::LocalFilter< MatrixType >
Access only local rows and columns of a sparse matrix.
- Template Parameters
-
| MatrixType | A specialization of either Tpetra::RowMatrix, or Tpetra::CrsMatrix (which is a subclass of Tpetra::CrsMatrix). |
For the template parameter of this class, it is better to use the most specific type you can, as long as that type is the same as the type of the object you plan to give to LocalFilter's constructor. "Most specific" means, for example, Tpetra::CrsMatrix instead of Tpetra::RowMatrix, if you plan to give a Tpetra::CrsMatrix to this object's constructor.
This class provides a view of only the local rows and columns of an existing sparse matrix. "Local rows" are those owned by the row Map on the calling process; "local columns" are owned by both the column Map and the domain Map on the calling process. The view's communicator contains only the local process (in MPI terms, MPI_COMM_SELF), and each process will have its own distinct view of its local part of the matrix.
Here is an example of how to apply a LocalFilter to an existing Tpetra sparse matrix:
#include "Ifpack2_LocalFilter.hpp"
using Teuchos::RCP;
typedef Tpetra::RowMatrix<double> crs_matrix_type;
typedef Tpetra::CrsMatrix<double> crs_matrix_type;
RCP<crs_matrix_type> A = ...;
A->FillComplete ();
This class does not necessarily copy the entire sparse matrix; it may choose instead just to "filter out" the nonlocal entries.
The intended use case of this class is to use Ifpack2 incomplete factorizations as subdomain solvers, where each process has exactly one subdomain. LocalFilter "hides" the remote columns of the matrix, making it square and thus a suitable input for local linear solvers.