Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_TpetraExport_decl.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef XPETRA_TPETRAEXPORT_DECL_HPP
11#define XPETRA_TPETRAEXPORT_DECL_HPP
12
13/* this file is automatically generated - do not edit (see script/tpetra.py) */
14
16
17#include "Xpetra_Export.hpp"
18#include "Xpetra_Exceptions.hpp"
19
21#include "Tpetra_Export.hpp"
22
23// Note: 'export' is a reserved keyword in C++. Do not use 'export' as a variable name.
24
25namespace Xpetra {
26
27// TODO: move that elsewhere
28template <class LocalOrdinal, class GlobalOrdinal, class Node>
29const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>& toTpetra(const Export<LocalOrdinal, GlobalOrdinal, Node>&);
30
31template <class LocalOrdinal, class GlobalOrdinal, class Node>
32RCP<const Export<LocalOrdinal, GlobalOrdinal, Node>>
33toXpetra(const RCP<const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp);
34
35template <class LocalOrdinal,
36 class GlobalOrdinal,
37 class Node>
39 : public Export<LocalOrdinal, GlobalOrdinal, Node> {
40 public:
43
45
46
49
52 const Teuchos::RCP<const map_type>& target,
54
57
60
62
64
65
67 size_t getNumSameIDs() const;
68
70 size_t getNumPermuteIDs() const;
71
74
77
79 size_t getNumRemoteIDs() const;
80
83
85 size_t getNumExportIDs() const;
86
89
92
95
98
101
103
105
106
108 void print(std::ostream& os) const;
109
111
113
114
116 TpetraExport(const RCP<const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp);
117
119
121
122 private:
124
125}; // TpetraExport class
126
127// --------------
128// Free functions
129// --------------
130
131// TODO: move that elsewhere
132template <class LocalOrdinal, class GlobalOrdinal, class Node>
133const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>&
135 // TODO: throw exception
137 dynamic_cast<const TpetraExport<LocalOrdinal, GlobalOrdinal, Node>&>(exp);
138 return *tpetraExport.getTpetra_Export();
139}
140
141template <class LocalOrdinal, class GlobalOrdinal, class Node>
143 typedef TpetraExport<LocalOrdinal, GlobalOrdinal, Node> TpetraExportClass;
144 if (exportObj != Teuchos::null) {
145 XPETRA_RCP_DYNAMIC_CAST(const TpetraExportClass, rcpFromRef(*exportObj), tpetraExport, "toTpetra");
146 return tpetraExport->getTpetra_Export();
147 }
148 return Teuchos::null;
149}
150
151template <class LocalOrdinal, class GlobalOrdinal, class Node>
152RCP<const Export<LocalOrdinal, GlobalOrdinal, Node>>
153toXpetra(const RCP<const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp) {
154 if (!exp.is_null())
156
157 return Teuchos::null;
158}
159
160} // namespace Xpetra
161
162#endif // XPETRA_TPETRAEXPORT_DECL_HPP
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set distributor parameters.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The source Map used to construct this Export.
size_t getNumSameIDs() const
Number of initial identical IDs.
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The target Map used to construct this Export.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Export() const
void print(std::ostream &os) const
Print the Export's data to the given output stream.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > export_
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)