46 #ifndef XPETRA_TPETRAIMPORT_HPP 47 #define XPETRA_TPETRAIMPORT_HPP 57 #include "Tpetra_Import.hpp" 62 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
63 const Tpetra::Import<LocalOrdinal,GlobalOrdinal,Node> &
toTpetra(
const Import<LocalOrdinal,GlobalOrdinal,Node> &);
65 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
66 RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> >
toXpetra(
const RCP<
const Tpetra::Import<LocalOrdinal,GlobalOrdinal,Node> > &
import);
69 template <class LocalOrdinal = Import<>::local_ordinal_type,
73 :
public Import<LocalOrdinal, GlobalOrdinal, Node>
85 TpetraImport(
const Teuchos::RCP< const map_type > &source,
const Teuchos::RCP< const map_type > &target)
89 TpetraImport(
const Teuchos::RCP< const map_type > &source,
const Teuchos::RCP< const map_type > &target,
const Teuchos::RCP< Teuchos::ParameterList > &plist)
94 :
import_(Teuchos::rcp(new Tpetra::
Import< LocalOrdinal, GlobalOrdinal, Node >(
toTpetra(import)))) { }
151 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) :
import_(import) { }
159 RCP<const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > >
import_;
163 #ifdef HAVE_XPETRA_EPETRA 165 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 166 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 185 TpetraImport(
const Teuchos::RCP< const map_type > &source,
const Teuchos::RCP< const map_type > &target) {
190 TpetraImport(
const Teuchos::RCP< const map_type > &source,
const Teuchos::RCP< const map_type > &target,
const Teuchos::RCP< Teuchos::ParameterList > &plist) {
214 ArrayView< const LocalOrdinal >
getPermuteFromLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
217 ArrayView< const LocalOrdinal >
getPermuteToLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
223 ArrayView< const LocalOrdinal >
getRemoteLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
229 ArrayView< const LocalOrdinal >
getExportLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
232 ArrayView< const int >
getExportPIDs()
const {
return Teuchos::ArrayView<const int>(); }
235 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getSourceMap()
const {
return Teuchos::null; }
238 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getTargetMap()
const {
return Teuchos::null; }
246 void print(std::ostream &os)
const { }
254 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) {
258 RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > >
getTpetra_Import()
const {
return Teuchos::null; }
265 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ 266 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) 285 TpetraImport(
const Teuchos::RCP< const map_type > &source,
const Teuchos::RCP< const map_type > &target) {
290 TpetraImport(
const Teuchos::RCP< const map_type > &source,
const Teuchos::RCP< const map_type > &target,
const Teuchos::RCP< Teuchos::ParameterList > &plist) {
314 ArrayView< const LocalOrdinal >
getPermuteFromLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
317 ArrayView< const LocalOrdinal >
getPermuteToLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
323 ArrayView< const LocalOrdinal >
getRemoteLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
329 ArrayView< const LocalOrdinal >
getExportLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
332 ArrayView< const int >
getExportPIDs()
const {
return Teuchos::ArrayView<const int>(); }
335 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getSourceMap()
const {
return Teuchos::null; }
338 Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > >
getTargetMap()
const {
return Teuchos::null; }
346 void print(std::ostream &os)
const { }
354 TpetraImport(
const RCP<
const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > &
import) {
358 RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > >
getTpetra_Import()
const {
return Teuchos::null; }
365 #endif // HAVE_XPETRA_EPETRA 368 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
375 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
376 RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> >
toXpetra(
const RCP<
const Tpetra::Import<LocalOrdinal,GlobalOrdinal,Node > >&
import) {
377 if (!
import.is_null())
380 return Teuchos::null;
386 #define XPETRA_TPETRAIMPORT_SHORT 387 #endif // XPETRA_TPETRAIMPORT_HPP
TpetraImport(const Import< LocalOrdinal, GlobalOrdinal, Node > &import)
Copy constructor.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > import_
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
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.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
size_t getNumSameIDs() const
Number of initial identical IDs.
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.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import 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()
Destructor.
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 > > getTargetMap() const
The Target Map used to construct this Import object.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
TpetraImport(const Import< LocalOrdinal, GlobalOrdinal, Node > &import)
Copy constructor.
size_t getNumSameIDs() const
Number of initial identical IDs.
GlobalOrdinal global_ordinal_type
RCP< const Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Import() const
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.
void print(std::ostream &os) const
Print the Import'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 > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
void print(std::ostream &os) const
Print the Import's data to the given output stream.
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(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 Import< LocalOrdinal, GlobalOrdinal, Node > &import)
Copy constructor.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
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.
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
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
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)
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 getNumRemoteIDs() const
Number of entries not on the calling process.
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.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
#define XPETRA_MONITOR(funcName)
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
size_t getNumSameIDs() const
Number of initial identical IDs.
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.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.