43 #ifndef IFPACK2_OVERLAPGRAPH_HPP
44 #define IFPACK2_OVERLAPGRAPH_HPP
46 #include "Ifpack2_ConfigDefs.hpp"
47 #include "Tpetra_CrsGraph.hpp"
48 #include "Tpetra_Import.hpp"
50 #include "Ifpack2_CreateOverlapGraph.hpp"
72 template<class LocalOrdinal = typename Tpetra::CrsGraph<>::local_ordinal_type,
73 class GlobalOrdinal =
typename Tpetra::CrsGraph<LocalOrdinal>::global_ordinal_type,
74 class Node =
typename Tpetra::CrsGraph<LocalOrdinal, GlobalOrdinal>::node_type>
78 typedef Tpetra::CrsGraph<LocalOrdinal, GlobalOrdinal, Node>
graph_type;
96 const Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node>&
100 const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node>&
104 const Tpetra::Import<LocalOrdinal,GlobalOrdinal,Node>&
126 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
130 : UserMatrixGraph_ (UserMatrixGraph_in),
131 OverlapLevel_ (OverlapLevel_in),
132 IsOverlapped_ (OverlapLevel_in > 0 && UserMatrixGraph_in->getDomainMap ()->isDistributed ())
137 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
140 : UserMatrixGraph_ (Source.UserMatrixGraph_),
141 OverlapRowMap_ (Source.OverlapRowMap_),
142 OverlapLevel_ (Source.OverlapLevel_),
143 IsOverlapped_ (Source.IsOverlapped_)
146 typedef Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> map_type;
149 if (! OverlapGraph_.
is_null ()) {
152 if (! OverlapRowMap_.
is_null ()) {
153 OverlapRowMap_ =
rcp (
new map_type (*OverlapRowMap_));
160 #endif // IFPACK2_OVERLAPGRAPH_HPP
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > & getOverlapImporter() const
Return the Import object.
Definition: Ifpack2_OverlapGraph.hpp:105
Construct an overlapped graph from a given nonoverlapping graph.
Definition: Ifpack2_OverlapGraph.hpp:75
Teuchos::RCP< const GraphType > createOverlapGraph(const Teuchos::RCP< const GraphType > &inputGraph, const int overlapLevel)
Construct an overlapped graph for use with Ifpack2 preconditioners.
Definition: Ifpack2_CreateOverlapGraph.hpp:73
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > & getOverlapRowMap() const
Return the overlap graph's row Map.
Definition: Ifpack2_OverlapGraph.hpp:101
const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > & getOverlapGraph() const
Return the overlap graph.
Definition: Ifpack2_OverlapGraph.hpp:97
int OverlapLevel() const
Return the level of overlap used to create this graph.
Definition: Ifpack2_OverlapGraph.hpp:114
OverlapGraph(const Teuchos::RCP< const graph_type > &UserMatrixGraph_in, int OverlapLevel_in)
Constructor that takes a graph and the level of overlap.
Definition: Ifpack2_OverlapGraph.hpp:128
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > graph_type
The Tpetra::CrsGraph specialization that this class uses.
Definition: Ifpack2_OverlapGraph.hpp:78
virtual ~OverlapGraph()
Destructor (virtual for memory safety of derived classes).
Definition: Ifpack2_OverlapGraph.hpp:93