46 #ifndef XPETRA_TPETRAIMPORT_DEF_HPP
47 #define XPETRA_TPETRAIMPORT_DEF_HPP
54 #include "Xpetra_TpetraMap.hpp"
55 #include "Tpetra_Import.hpp"
56 #include "Tpetra_Distributor.hpp"
60 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
64 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
68 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
72 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
76 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
78 {
XPETRA_MONITOR(
"TpetraImport::getNumSameIDs");
return import_->getNumSameIDs(); }
80 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
82 {
XPETRA_MONITOR(
"TpetraImport::getNumPermuteIDs");
return import_->getNumPermuteIDs(); }
84 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
86 {
XPETRA_MONITOR(
"TpetraImport::getPermuteFromLIDs");
return import_->getPermuteFromLIDs(); }
88 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
90 {
XPETRA_MONITOR(
"TpetraImport::getPermuteToLIDs");
return import_->getPermuteToLIDs(); }
92 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
94 {
XPETRA_MONITOR(
"TpetraImport::getNumRemoteIDs");
return import_->getNumRemoteIDs(); }
96 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
98 {
XPETRA_MONITOR(
"TpetraImport::setDistributorParameters"); import_->getDistributor().setParameterList(params); }
100 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
102 {
XPETRA_MONITOR(
"TpetraImport::getRemoteLIDs");
return import_->getRemoteLIDs(); }
104 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
106 {
XPETRA_MONITOR(
"TpetraImport::getNumExportIDs");
return import_->getNumExportIDs(); }
108 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
110 {
XPETRA_MONITOR(
"TpetraImport::getExportLIDs");
return import_->getExportLIDs(); }
112 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
114 {
XPETRA_MONITOR(
"TpetraImport::getExportPIDs");
return import_->getExportPIDs(); }
116 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
120 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
124 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
128 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
132 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
137 #ifdef HAVE_XPETRA_EPETRA
139 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
140 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
223 void print(std::ostream &os)
const { }
231 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) {
242 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
243 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
326 void print(std::ostream &os)
const { }
334 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) {
345 #endif // HAVE_XPETRA_EPETRA
void print(std::ostream &os) const
Print the Import's data to the given output stream.
TpetraImport(const Import< LocalOrdinal, GlobalOrdinal, Node > &import)
Copy constructor.
size_t getNumSameIDs() const
Number of initial identical IDs.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The Target Map used to construct this Import object.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The Target Map used to construct this Import object.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
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.
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
~TpetraImport()
Destructor.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
TpetraImport(const Import< LocalOrdinal, GlobalOrdinal, Node > &import)
Copy constructor.
void print(std::ostream &os) const
Print the Import's data to the given output stream.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
TpetraImport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct an Import from the source and target Maps.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
TpetraImport(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).
TpetraImport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct an Import from the source and target Maps.
~TpetraImport()
Destructor.
TpetraImport(const RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &import)
TpetraImport constructor to wrap a Tpetra::Import object.
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.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
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.
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The Target Map used to construct this Import object.
TpetraImport(const RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &import)
TpetraImport constructor to wrap a Tpetra::Import object.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
TpetraImport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct an Import from the source and target Maps.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on distributor.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
#define XPETRA_MONITOR(funcName)
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
void print(std::ostream &os) const
Print the Import's data to the given output stream.
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.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
TpetraImport(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).
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
~TpetraImport()
Destructor.
size_t getNumSameIDs() const
Number of initial identical IDs.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.