42 #ifndef TPETRA_IMPORTEXPORTDATA_DEF_HPP 43 #define TPETRA_IMPORTEXPORTDATA_DEF_HPP 45 #include <Tpetra_ImportExportData_decl.hpp> 47 #include <Tpetra_Map.hpp> 50 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
58 distributor_ (source->getComm (), out_),
59 isLocallyComplete_ (true)
62 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
66 const Teuchos::RCP<Teuchos::FancyOStream>& out) :
75 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
79 const Teuchos::RCP<Teuchos::ParameterList>& plist) :
88 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
92 const Teuchos::RCP<Teuchos::FancyOStream>& out,
93 const Teuchos::RCP<Teuchos::ParameterList>& plist) :
102 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
103 Teuchos::RCP<ImportExportData<LocalOrdinal, GlobalOrdinal, Node> >
106 using Teuchos::ArrayView;
108 Teuchos::RCP<ImportExportData<LocalOrdinal,GlobalOrdinal,Node> > tData =
122 tData->exportPIDs_.resize(tData->exportLIDs_.size());
132 bool isLocallyComplete =
true;
133 for (
size_t i = 0, j = 0; i < NumReceives; ++i) {
134 const int pid = ProcsFrom[i];
136 isLocallyComplete =
false;
138 for (
size_t k = 0; k < LengthsFrom[i]; ++k) {
139 tData->exportPIDs_[j] = pid;
143 tData->isLocallyComplete_ = isLocallyComplete;
149 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
162 #define TPETRA_IMPORTEXPORTDATA_INSTANT(LO, GO, NODE) \ 164 template class ImportExportData< LO , GO , NODE >; 166 #endif // TPETRA_IMPORTEXPORTDATA_DEF_HPP size_t numSameIDs_
Number of initial identical indices.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
bool isLocallyComplete_
Is this Export or Import locally complete?
~ImportExportData()
Destructor.
Teuchos::RCP< Distributor > getReverse() const
A reverse communication plan Distributor.
Teuchos::Array< LocalOrdinal > permuteToLIDs_
Index of target Map LIDs to which to permute.
ImportExportData(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Constructor.
Teuchos::ArrayView< const size_t > getLengthsFrom() const
Number of values this process will receive from each process.
size_t getNumReceives() const
The number of processes from which we will receive data.
Teuchos::Array< LocalOrdinal > exportLIDs_
"Outgoing" local indices.
Teuchos::ArrayView< const int > getProcsFrom() const
Ranks of the processes sending values to this process.
Implementation detail of Import and Export.
Teuchos::Array< LocalOrdinal > permuteFromLIDs_
Index of source Map LIDs from which to permute.
Teuchos::RCP< Teuchos::FancyOStream > out_
Output stream for debug output.
A parallel distribution of indices over processes.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > target_
Target Map of the Import or Export.
Distributor distributor_
Object that actually distributes (sends and receives) data.
Teuchos::Array< LocalOrdinal > remoteLIDs_
"Incoming" indices.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > source_
Source Map of the Import or Export.
Teuchos::RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > reverseClone()
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor...