10 #ifndef XPETRA_EPETRAIMPORT_HPP
11 #define XPETRA_EPETRAIMPORT_HPP
21 #include "Epetra_Import.h"
23 #if defined(XPETRA_ENABLE_DEPRECATED_CODE)
25 #if defined(Xpetra_SHOW_DEPRECATED_WARNINGS)
26 #warning "The header file Trilinos/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp is deprecated."
30 #error "The header file Trilinos/packages/xpetra/src/Import/Xpetra_EpetraImport.hpp is deprecated."
35 template <
class GlobalOrdinal,
class Node>
36 XPETRA_DEPRECATED RCP<const Import<int, GlobalOrdinal, Node> >
toXpetra(
const Epetra_Import *
import);
39 template <
class EpetraGlobalOrdinal,
class Node>
41 :
public Import<int, EpetraGlobalOrdinal, Node> {
52 EpetraImportT(
const Teuchos::RCP<const map_type> &source,
const Teuchos::RCP<const map_type> &target)
67 Teuchos::RCP<const Import<LocalOrdinal, GlobalOrdinal, Node> >
78 return import_->NumSameIDs();
84 return import_->NumPermuteIDs();
102 return import_->NumRemoteIDs();
120 return import_->NumExportIDs();
132 return ArrayView<const int>(import_->ExportPIDs(), import_->NumExportIDs());
136 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
getSourceMap()
const {
138 return toXpetra<GlobalOrdinal, Node>(import_->SourceMap());
142 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
getTargetMap()
const {
144 return toXpetra<GlobalOrdinal, Node>(import_->TargetMap());
155 void print(std::ostream &os)
const {
181 #endif // XPETRA_EPETRAIMPORT_HPP
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
EpetraImportT(const RCP< const Epetra_Import > &import)
EpetraImportT constructor to wrap a Epetra_Import object.
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.
EpetraGlobalOrdinal GlobalOrdinal
RCP< const Epetra_Import > getEpetra_Import() const
Get the underlying Epetra import.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
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.
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.
EpetraImportT(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct an Import from the source and target Maps.
RCP< const Epetra_Import > import_
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The Source Map used to construct this Import object.
Exception throws when you call an unimplemented method of Xpetra.
~EpetraImportT()
Destructor.
#define XPETRA_MONITOR(funcName)
Teuchos::RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > createRemoteOnlyImport(const Teuchos::RCP< const map_type > &remoteTarget) const
Special "constructor".
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
ArrayView< const LocalOrdinal > getRemotePIDs() 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.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The Target Map used to construct this Import object.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)