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"
60template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
64template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
68template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
72template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
76template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
85template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
87{
XPETRA_MONITOR(
"TpetraImport::getNumSameIDs");
return import_->getNumSameIDs(); }
89template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
91{
XPETRA_MONITOR(
"TpetraImport::getNumPermuteIDs");
return import_->getNumPermuteIDs(); }
93template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
95{
XPETRA_MONITOR(
"TpetraImport::getPermuteFromLIDs");
return import_->getPermuteFromLIDs(); }
97template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
99{
XPETRA_MONITOR(
"TpetraImport::getPermuteToLIDs");
return import_->getPermuteToLIDs(); }
101template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
103{
XPETRA_MONITOR(
"TpetraImport::getNumRemoteIDs");
return import_->getNumRemoteIDs(); }
105template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
108 import_->getDistributor().setParameterList(params);
109 auto revDistor = import_->getDistributor().getReverse(
false);
110 if (!revDistor.is_null())
111 revDistor->setParameterList(params);
114template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
116{
XPETRA_MONITOR(
"TpetraImport::getRemoteLIDs");
return import_->getRemoteLIDs(); }
118template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
120{
XPETRA_MONITOR(
"TpetraImport::getNumExportIDs");
return import_->getNumExportIDs(); }
122template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
124{
XPETRA_MONITOR(
"TpetraImport::getExportLIDs");
return import_->getExportLIDs(); }
126template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
128{
XPETRA_MONITOR(
"TpetraImport::getExportPIDs");
return import_->getExportPIDs(); }
130template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
134template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
138template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
142template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
146template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
151#ifdef HAVE_XPETRA_EPETRA
153#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
154 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
194 return Teuchos::null;
244 void print(std::ostream &os)
const { }
252 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) {
263#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
264 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
303 return Teuchos::null;
353 void print(std::ostream &os)
const { }
361 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) {
#define XPETRA_MONITOR(funcName)
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
size_t getNumSameIDs() const
Number of initial identical IDs.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The Target Map used to construct this Import object.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
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.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > createRemoteOnlyImport(const Teuchos::RCP< const map_type > &remoteTarget) const
Special "constructor".
TpetraImport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct an Import from the source and target Maps.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
~TpetraImport()
Destructor.
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.
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 LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
TpetraImport(const RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &import)
TpetraImport constructor to wrap a Tpetra::Import object.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
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.
TpetraImport(const Import< LocalOrdinal, GlobalOrdinal, Node > &import)
Copy constructor.
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).
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
void print(std::ostream &os) const
Print the Import's data to the given output stream.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > createRemoteOnlyImport(const Teuchos::RCP< const map_type > &remoteTarget) const
Special "constructor".
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
~TpetraImport()
Destructor.
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)
Construct an Import from the source and target Maps.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
size_t getNumSameIDs() const
Number of initial identical IDs.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
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.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on distributor.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The Target Map used to construct this Import object.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
size_t getNumSameIDs() const
Number of initial identical IDs.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > createRemoteOnlyImport(const Teuchos::RCP< const map_type > &remoteTarget) const
Special "constructor".
~TpetraImport()
Destructor.
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 print(std::ostream &os) const
Print the Import's data to the given output stream.
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.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
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)