Ifpack2 Templated Preconditioning Package Version 1.0
Loading...
Searching...
No Matches
Ifpack2_Details_OverlappingRowGraph_decl.hpp
1// @HEADER
2// *****************************************************************************
3// Ifpack2: Templated Object-Oriented Algebraic Preconditioner Package
4//
5// Copyright 2009 NTESS and the Ifpack2 contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef IFPACK2_DETAILS_OVERLAPPINGROWGRAPH_DECL_HPP
11#define IFPACK2_DETAILS_OVERLAPPINGROWGRAPH_DECL_HPP
12
13#include <Ifpack2_ConfigDefs.hpp>
14#include "Ifpack2_Details_RowGraph.hpp"
15#include <Tpetra_Import_decl.hpp>
16#include <Tpetra_Export_decl.hpp>
17
18namespace Ifpack2 {
19namespace Details {
20
31template<class GraphType>
33 virtual public Ifpack2::Details::RowGraph<GraphType> {
34public:
36
37 typedef typename GraphType::local_ordinal_type local_ordinal_type;
38 typedef typename GraphType::global_ordinal_type global_ordinal_type;
39 typedef typename GraphType::node_type node_type;
40 typedef typename GraphType::local_inds_host_view_type local_inds_host_view_type;
41 typedef typename GraphType::nonconst_local_inds_host_view_type nonconst_local_inds_host_view_type;
42 typedef typename GraphType::global_inds_host_view_type global_inds_host_view_type;
43 typedef typename GraphType::nonconst_global_inds_host_view_type nonconst_global_inds_host_view_type;
44
45 typedef Tpetra::Export<local_ordinal_type, global_ordinal_type, node_type> export_type;
46 typedef Tpetra::Import<local_ordinal_type, global_ordinal_type, node_type> import_type;
47 typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type> map_type;
48 typedef Tpetra::RowGraph<local_ordinal_type, global_ordinal_type, node_type> row_graph_type;
49
51
53
73 OverlappingRowGraph (const Teuchos::RCP<const row_graph_type>& nonoverlappingGraph,
74 const Teuchos::RCP<const row_graph_type>& overlappingGraph,
75 const Teuchos::RCP<const map_type>& rowMap,
76 const Teuchos::RCP<const map_type>& colMap,
77 const Tpetra::global_size_t numGlobalRows,
78 const Tpetra::global_size_t numGlobalCols,
79 const Tpetra::global_size_t numGlobalNonzeros,
80 const size_t maxNumEntries,
81 const Teuchos::RCP<const import_type>& nonoverlappingImporter,
82 const Teuchos::RCP<const import_type>& overlappingImporter);
84 virtual ~OverlappingRowGraph ();
85
87
89
91 virtual Teuchos::RCP<const Teuchos::Comm<int> > getComm () const;
92
93
95 virtual Teuchos::RCP<const map_type> getRowMap () const;
96
98 virtual Teuchos::RCP<const map_type> getColMap () const;
99
104 virtual Teuchos::RCP<const map_type> getDomainMap () const;
105
110 virtual Teuchos::RCP<const map_type> getRangeMap () const;
111
113 virtual Teuchos::RCP<const import_type> getImporter () const;
114
116 virtual Teuchos::RCP<const export_type> getExporter () const;
117
119 virtual global_size_t getGlobalNumRows () const;
120
122 virtual global_size_t getGlobalNumCols () const;
123
125 virtual size_t getLocalNumRows () const;
126
132 virtual size_t getLocalNumCols () const;
133
135 virtual global_ordinal_type getIndexBase () const;
136
138 virtual global_size_t getGlobalNumEntries () const;
139
141 virtual size_t getLocalNumEntries () const;
142
152 virtual size_t getNumEntriesInGlobalRow (global_ordinal_type globalRow) const;
153
163 virtual size_t getNumEntriesInLocalRow (local_ordinal_type localRow) const;
164
166 virtual size_t getGlobalMaxNumRowEntries () const;
167
169 virtual size_t getLocalMaxNumRowEntries() const;
170
172 virtual bool hasColMap() const;
173
175 virtual bool isLocallyIndexed () const;
176
178 virtual bool isGloballyIndexed () const;
179
181 virtual bool isFillComplete() const;
182
184
186
200 virtual void
201 getGlobalRowCopy (global_ordinal_type globalRow,
202 nonconst_global_inds_host_view_type& gblColInds,
203 size_t& numIndices) const;
204
222 virtual void
223 getLocalRowCopy (local_ordinal_type localRow,
224 nonconst_local_inds_host_view_type& gblColInds,
225 size_t& numIndices) const;
226
254 virtual void
255 getLocalRowView (const local_ordinal_type lclRow,
256 local_inds_host_view_type & lclColInds) const;
257
273 virtual void
274 getGlobalRowView (const global_ordinal_type gblRow,
275 global_inds_host_view_type& gblColInds) const;
276
278private:
280
281 Teuchos::RCP<const row_graph_type> nonoverlappingGraph_;
282 Teuchos::RCP<const row_graph_type> overlappingGraph_;
283 Teuchos::RCP<const map_type> rowMap_;
284 Teuchos::RCP<const map_type> colMap_;
285 const Tpetra::global_size_t numGlobalRows_;
286 const Tpetra::global_size_t numGlobalCols_;
287 const Tpetra::global_size_t numGlobalNonzeros_;
288 const size_t maxNumEntries_;
289 Teuchos::RCP<const import_type> nonoverlappingImporter_;
290 Teuchos::RCP<const import_type> overlappingImporter_;
292};
293
294} // namespace Details
295} // namespace Ifpack2
296
297#endif // IFPACK2_DETAILS_OVERLAPPINGROWGRAPH_DECL_HPP
virtual size_t getLocalMaxNumRowEntries() const
The maximum number of entries in any row on the calling process.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:197
virtual Teuchos::RCP< const map_type > getRangeMap() const
The Map that describes the range of this graph.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:86
virtual bool isLocallyIndexed() const
Whether this graph is locally indexed.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:211
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.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:177
virtual bool isGloballyIndexed() const
Whether this graph is globally indexed.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:218
virtual global_size_t getGlobalNumEntries() const
The global number of entries in this graph.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:146
virtual size_t getGlobalMaxNumRowEntries() const
The maximum number of entries in any row on any process.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:190
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.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:233
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.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:290
virtual bool isFillComplete() const
true if fillComplete() has been called, else false.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:225
virtual bool hasColMap() const
Whether this graph has a column Map.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:204
virtual Teuchos::RCP< const map_type > getRowMap() const
The Map that describes the distribution of rows over processes.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:62
virtual Teuchos::RCP< const import_type > getImporter() const
Import object (from domain Map to column Map).
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:94
virtual global_size_t getGlobalNumRows() const
The global number of rows in this graph.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:109
virtual Teuchos::RCP< const map_type > getColMap() const
The Map that describes the distribution of columns over processes.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:70
virtual size_t getLocalNumEntries() const
The number of entries in this graph owned by the calling process.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:153
virtual size_t getLocalNumCols() const
The number of columns owned by the calling process.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:131
virtual global_size_t getGlobalNumCols() const
The global number of columns in this graph.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:116
virtual size_t getLocalNumRows() const
The number of rows owned by the calling process.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:123
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::Array...
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:272
virtual Teuchos::RCP< const map_type > getDomainMap() const
The Map that describes the domain of this graph.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:78
virtual ~OverlappingRowGraph()
Destructor.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:47
virtual Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
The communicator over which the graph is distributed.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:52
virtual Teuchos::RCP< const export_type > getExporter() const
Export object (from row Map to range Map).
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:102
virtual global_ordinal_type getIndexBase() const
The index base for global indices for this graph.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:139
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)
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:23
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.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:163
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.
Definition Ifpack2_Details_OverlappingRowGraph_def.hpp:253
All Ifpack2 implementations of Tpetra::RowGraph must inherit from this class.
Definition Ifpack2_Details_RowGraph.hpp:33
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:41