10#ifndef XPETRA_TPETRAEXPORT_DEF_HPP
11#define XPETRA_TPETRAEXPORT_DEF_HPP
14#include "Tpetra_Distributor.hpp"
18template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
25template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
33template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
39template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
44template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
49 return export_->getNumSameIDs();
52template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
57 return export_->getNumPermuteIDs();
60template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
65 return export_->getPermuteFromLIDs();
68template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
73 return export_->getPermuteToLIDs();
76template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
81 return export_->getNumRemoteIDs();
84template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
89 return export_->getRemoteLIDs();
92template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
97 return export_->getNumExportIDs();
100template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
105 return export_->getExportLIDs();
108template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
113 return export_->getExportPIDs();
116template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
121 return toXpetra(export_->getSourceMap());
124template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
129 return toXpetra(export_->getTargetMap());
132template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
136 export_->getDistributor().setParameterList(params);
137 auto revDistor = export_->getDistributor().getReverse(
false);
138 if (!revDistor.is_null())
139 revDistor->setParameterList(params);
142template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
144 print(std::ostream& os)
const {
149template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
152 const RCP<
const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp)
156template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
163#ifdef HAVE_XPETRA_EPETRA
165#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
170 :
public Export<int, int, EpetraNode> {
258 void print(std::ostream& os)
const {
267 TpetraExport(
const RCP<
const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp) {
281#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
286 :
public Export<int, long long, EpetraNode> {
374 void print(std::ostream& os)
const {
383 TpetraExport(
const RCP<
const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp) {
#define XPETRA_MONITOR(funcName)
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
void print(std::ostream &os) const
Print the Export's data to the given output stream.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
TpetraExport(const RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > &exp)
TpetraExport constructor to wrap a Tpetra::Export object.
~TpetraExport()
Destructor.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
TpetraExport(const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs)
Copy constructor.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Export() const
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (with list of parameters).
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The target Map used to construct this Export.
size_t getNumSameIDs() const
Number of initial identical IDs.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The source Map used to construct this Export.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Export() const
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (with list of parameters).
size_t getNumSameIDs() const
Number of initial identical IDs.
~TpetraExport()
Destructor.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
void print(std::ostream &os) const
Print the Export's data to the given output stream.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The target Map used to construct this Export.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The source Map used to construct this Export.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
TpetraExport(const RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > &exp)
TpetraExport constructor to wrap a Tpetra::Export object.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
TpetraExport(const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs)
Copy constructor.
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.
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.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
~TpetraExport()
Destructor.
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
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)