42 #ifndef TPETRA_IMPORTEXPORTDATA_DEF_HPP 43 #define TPETRA_IMPORTEXPORTDATA_DEF_HPP 45 #include "Tpetra_Map.hpp" 46 #include "Teuchos_FancyOStream.hpp" 47 #include "Teuchos_ParameterList.hpp" 51 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
59 distributor_ (source->getComm (), out_),
60 isLocallyComplete_ (true)
63 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
67 const Teuchos::RCP<Teuchos::FancyOStream>& out) :
76 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
80 const Teuchos::RCP<Teuchos::ParameterList>& plist) :
89 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
93 const Teuchos::RCP<Teuchos::FancyOStream>& out,
94 const Teuchos::RCP<Teuchos::ParameterList>& plist) :
103 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
104 Teuchos::RCP<ImportExportData<LocalOrdinal, GlobalOrdinal, Node> >
107 using Teuchos::ArrayView;
109 Teuchos::RCP<ImportExportData<LocalOrdinal,GlobalOrdinal,Node> > tData =
123 tData->exportPIDs_.resize(tData->exportLIDs_.size());
133 bool isLocallyComplete =
true;
134 for (
size_t i = 0, j = 0; i < NumReceives; ++i) {
135 const int pid = ProcsFrom[i];
137 isLocallyComplete =
false;
139 for (
size_t k = 0; k < LengthsFrom[i]; ++k) {
140 tData->exportPIDs_[j] = pid;
144 tData->isLocallyComplete_ = isLocallyComplete;
150 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
164 #define TPETRA_IMPORTEXPORTDATA_INSTANT(LO, GO, NODE) \ 166 namespace Classes { template class ImportExportData< LO , GO , NODE >; } 168 #endif // TPETRA_IMPORTEXPORTDATA_DEF_HPP Namespace Tpetra contains the class and methods constituting the Tpetra library.
bool isLocallyComplete_
Is this Export or Import locally complete?
Teuchos::RCP< Distributor > getReverse() const
A reverse communication plan Distributor.
Teuchos::Array< LocalOrdinal > exportLIDs_
"Outgoing" local indices.
Teuchos::RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > reverseClone()
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor...
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > target_
Target Map of the Import or Export.
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.
Distributor distributor_
Object that actually distributes (sends and receives) data.
Teuchos::Array< LocalOrdinal > remoteLIDs_
"Incoming" indices.
Implementation detail of Import and Export.
~ImportExportData()
Destructor.
Teuchos::ArrayView< const int > getProcsFrom() const
Ranks of the processes sending values to this process.
Teuchos::RCP< Teuchos::FancyOStream > out_
Output stream for debug output.
size_t numSameIDs_
Number of initial identical indices.
Teuchos::Array< LocalOrdinal > permuteFromLIDs_
Index of source Map LIDs from which to permute.
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.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > source_
Source Map of the Import or Export.
A parallel distribution of indices over processes.