Ifpack2 Templated Preconditioning Package
Version 1.0
|
Sparse graph (Tpetra::RowGraph subclass) with ghost rows. More...
#include <Ifpack2_Details_OverlappingRowGraph_decl.hpp>
Public Types | |
Typedefs | |
typedef GraphType::local_ordinal_type | local_ordinal_type |
typedef GraphType::global_ordinal_type | global_ordinal_type |
typedef GraphType::node_type | node_type |
typedef GraphType::local_inds_host_view_type | local_inds_host_view_type |
typedef GraphType::nonconst_local_inds_host_view_type | nonconst_local_inds_host_view_type |
typedef GraphType::global_inds_host_view_type | global_inds_host_view_type |
typedef GraphType::nonconst_global_inds_host_view_type | nonconst_global_inds_host_view_type |
typedef Tpetra::Export < local_ordinal_type, global_ordinal_type, node_type > | export_type |
typedef Tpetra::Import < local_ordinal_type, global_ordinal_type, node_type > | import_type |
typedef Tpetra::Map < local_ordinal_type, global_ordinal_type, node_type > | map_type |
typedef Tpetra::RowGraph < local_ordinal_type, global_ordinal_type, node_type > | row_graph_type |
Public Types inherited from Ifpack2::Details::RowGraph< GraphType > | |
typedef GraphType::local_ordinal_type | local_ordinal_type |
typedef GraphType::global_ordinal_type | global_ordinal_type |
typedef GraphType::node_type | node_type |
typedef GraphType::local_inds_host_view_type | local_inds_host_view_type |
typedef GraphType::nonconst_local_inds_host_view_type | nonconst_local_inds_host_view_type |
typedef GraphType::global_inds_host_view_type | global_inds_host_view_type |
typedef GraphType::nonconst_global_inds_host_view_type | nonconst_global_inds_host_view_type |
Public Member Functions | |
Constructors and destructor | |
OverlappingRowGraph (const Teuchos::RCP< const row_graph_type > &nonoverlappingGraph, const Teuchos::RCP< const row_graph_type > &overlappingGraph, const Teuchos::RCP< const map_type > &rowMap, const Teuchos::RCP< const map_type > &colMap, const Tpetra::global_size_t numGlobalRows, const Tpetra::global_size_t numGlobalCols, const Tpetra::global_size_t numGlobalNonzeros, const size_t maxNumEntries, const Teuchos::RCP< const import_type > &nonoverlappingImporter, const Teuchos::RCP< const import_type > &overlappingImporter) | |
virtual | ~OverlappingRowGraph () |
Destructor. More... | |
Matrix query methods | |
virtual Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
The communicator over which the graph is distributed. More... | |
virtual Teuchos::RCP< const map_type > | getRowMap () const |
The Map that describes the distribution of rows over processes. More... | |
virtual Teuchos::RCP< const map_type > | getColMap () const |
The Map that describes the distribution of columns over processes. More... | |
virtual Teuchos::RCP< const map_type > | getDomainMap () const |
The Map that describes the domain of this graph. More... | |
virtual Teuchos::RCP< const map_type > | getRangeMap () const |
The Map that describes the range of this graph. More... | |
virtual Teuchos::RCP< const import_type > | getImporter () const |
Import object (from domain Map to column Map). More... | |
virtual Teuchos::RCP< const export_type > | getExporter () const |
Export object (from row Map to range Map). More... | |
virtual global_size_t | getGlobalNumRows () const |
The global number of rows in this graph. More... | |
virtual global_size_t | getGlobalNumCols () const |
The global number of columns in this graph. More... | |
virtual size_t | getLocalNumRows () const |
The number of rows owned by the calling process. More... | |
virtual size_t | getLocalNumCols () const |
The number of columns owned by the calling process. More... | |
virtual global_ordinal_type | getIndexBase () const |
The index base for global indices for this graph. More... | |
virtual global_size_t | getGlobalNumEntries () const |
The global number of entries in this graph. More... | |
virtual size_t | getLocalNumEntries () const |
The number of entries in this graph owned by the calling process. More... | |
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. More... | |
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. More... | |
virtual size_t | getGlobalMaxNumRowEntries () const |
The maximum number of entries in any row on any process. More... | |
virtual size_t | getLocalMaxNumRowEntries () const |
The maximum number of entries in any row on the calling process. More... | |
virtual bool | hasColMap () const |
Whether this graph has a column Map. More... | |
virtual bool | isLocallyIndexed () const |
Whether this graph is locally indexed. More... | |
virtual bool | isGloballyIndexed () const |
Whether this graph is globally indexed. More... | |
virtual bool | isFillComplete () const |
true if fillComplete() has been called, else false . More... | |
Extraction methods | |
virtual void | getGlobalRowCopy (global_ordinal_type globalRow, nonconst_global_inds_host_view_type &gblColInds, size_t &numIndices) const |
Copy out a list of column indices in the given global row that are owned by the calling process. More... | |
virtual void | getLocalRowCopy (local_ordinal_type localRow, nonconst_local_inds_host_view_type &gblColInds, size_t &numIndices) const |
Copy out a list of local column indices in the given local row that are owned by the calling process. More... | |
virtual void | getLocalRowView (const local_ordinal_type lclRow, local_inds_host_view_type &lclColInds) const |
Get a constant, nonpersisting, locally indexed view of the given row of the graph. More... | |
virtual void | getGlobalRowView (const global_ordinal_type gblRow, global_inds_host_view_type &gblColInds) const |
Get a const, non-persisting view of the given global row's global column indices, as a Teuchos::ArrayView. More... | |
Public Member Functions inherited from Ifpack2::Details::RowGraph< GraphType > | |
virtual | ~RowGraph ()=default |
Destructor (virtual for memory safety of derived classes) More... | |
Sparse graph (Tpetra::RowGraph subclass) with ghost rows.
GraphType | Tpetra::RowGraph or Tpetra::CrsGraph specialization. |
This class is meant to be created by and used with OverlappingRowMatrix. It is the subclass of Tpetra::RowGraph returned by that class' getGraph() method.
Ifpack2::Details::OverlappingRowGraph< GraphType >::OverlappingRowGraph | ( | const Teuchos::RCP< const row_graph_type > & | nonoverlappingGraph, |
const Teuchos::RCP< const row_graph_type > & | overlappingGraph, | ||
const Teuchos::RCP< const map_type > & | rowMap, | ||
const Teuchos::RCP< const map_type > & | colMap, | ||
const Tpetra::global_size_t | numGlobalRows, | ||
const Tpetra::global_size_t | numGlobalCols, | ||
const Tpetra::global_size_t | numGlobalNonzeros, | ||
const size_t | maxNumEntries, | ||
const Teuchos::RCP< const import_type > & | nonoverlappingImporter, | ||
const Teuchos::RCP< const import_type > & | overlappingImporter | ||
) |
Standard constructor.
nonoverlappingGraph | [in] Graph containing only the nonoverlapping rows. |
overlappingGraph | [in] Graph containing only the overlapping rows. |
rowMap | [in] Map which is the union of the row Maps of the two graphs. |
colMap | [in] Column Map. |
numGlobalRows | [in] Global number of rows. |
numGlobalCols | [in] Global number of columns. |
numGlobalNonzeros | [in] Global number of entries. |
maxNumEntries | [in] Max number of entries in any row owned by this process. |
nonoverlappingImporter | [in] Import from the nonoverlapping graph's row Map, to the row Map representing the entire graph (nonoverlapping + overlapping). |
overlappingImporter | [in] Import from the nonoverlapping graph's row Map, to the overlapping graph's row Map. |
|
virtual |
Destructor.
|
virtual |
The communicator over which the graph is distributed.
|
virtual |
The Map that describes the distribution of rows over processes.
|
virtual |
The Map that describes the distribution of columns over processes.
|
virtual |
The Map that describes the domain of this graph.
The domain is the distribution of valid input vectors of apply(), for a matrix whose graph is *this
.
|
virtual |
The Map that describes the range of this graph.
The range is the distribution of valid output vectors of apply(), for a matrix whose graph is *this
.
|
virtual |
Import object (from domain Map to column Map).
|
virtual |
Export object (from row Map to range Map).
|
virtual |
The global number of rows in this graph.
|
virtual |
The global number of columns in this graph.
|
virtual |
The number of rows owned by the calling process.
|
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.
|
virtual |
The index base for global indices for this graph.
|
virtual |
The global number of entries in this graph.
|
virtual |
The number of entries in this graph owned by the calling process.
|
virtual |
The number of entries in the given global row that are owned by the calling process.
globalRow | [in] Global index of the row. |
|
virtual |
The number of entries in the given local row that are owned by the calling process.
globalRow | [in] Local index of the row. |
|
virtual |
The maximum number of entries in any row on any process.
|
virtual |
The maximum number of entries in any row on the calling process.
|
virtual |
Whether this graph has a column Map.
|
virtual |
Whether this graph is locally indexed.
|
virtual |
Whether this graph is globally indexed.
|
virtual |
true
if fillComplete() has been called, else false
.
|
virtual |
Copy out a list of column indices in the given global row that are owned by the calling process.
globalRow | [in] Global index of the row. |
indices | [out] Global column indices in that row that are owned by the calling process. |
numIndices | [out] Number of indices returned in indices . |
This method throws std::runtime_error if indices
is not large enough to hold the column indices in row globalRow
. If row globalRow
does not belong to this process, then indices
is not modified and numIndices
is set to Teuchos::OrdinalTraits<size_t>::invalid() on output.
|
virtual |
Copy out a list of local column indices in the given local row that are owned by the calling process.
This method only makes sense to call if the graph has a column Map, since the local column indices are computed with respect to the column Map.
localRow | [in] Local index of the row. |
indices | [out] Local column indices in that row that are owned by the calling process. |
numIndices | [out] Number of indices returned in indices . |
This method throws std::runtime_error if indices
is not large enough to hold the column indices in row localRow
. If row localRow
does not belong to this process, then indices
is not modified and numIndices
is set to Teuchos::OrdinalTraits<size_t>::invalid() on output.
|
virtual |
Get a constant, nonpersisting, locally indexed view of the given row of the graph.
The returned views of the column indices are not guaranteed to persist beyond the lifetime of this
. Furthermore, some RowGraph implementations allow changing the values, or the indices and values. Any such changes invalidate the returned views.
This method only gets the entries in the given row that are stored on the calling process. Note that if the graph has an overlapping row Map, it is possible that the calling process does not store all the entries in that row.
isLocallyIndexed () && supportsRowViews ()
indices.size () == getNumEntriesInGlobalRow (LocalRow)
lclRow | [in] Local index of the row. |
lclColInds | [out] Local indices of the columns in the row. If the given row is not a valid row index on the calling process, then the result has no entries (its size is zero). |
Subclasses are expected to implement this method. We would have made this method pure virtual, but that would have broken backwards compatibility, since we added the method at least one major release after introducing this class.
|
virtual |
Get a const, non-persisting view of the given global row's global column indices, as a Teuchos::ArrayView.
gblRow | [in] Global index of the row. |
gblColInds | [out] Global column indices in the row. If the given row is not a valid row index on the calling process, then the result has no entries (its size is zero). |
! isLocallyIndexed()
gblColInds.size() == getNumEntriesInGlobalRow(gblRow)
Subclasses are expected to implement this method. We would have made this method pure virtual, but that would have broken backwards compatibility, since we added the method at least one major release after introducing this class.