42 #ifndef TPETRA_IMPORTEXPORTDATA_DEF_HPP 43 #define TPETRA_IMPORTEXPORTDATA_DEF_HPP 45 #ifdef DOXYGEN_USE_ONLY 46 # include <Tpetra_ImportExportData_decl.hpp> 47 #endif // DOXYGEN_USE_ONLY 49 #include <Tpetra_Map.hpp> 52 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
56 : out_ (
Teuchos::getFancyOStream (
Teuchos::rcpFromRef (std::cerr)))
60 , comm_ (source->getComm())
61 , distributor_ (comm_, out_)
64 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
73 ,
comm_ (source->getComm())
77 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
86 ,
comm_ (source->getComm())
90 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
100 ,
comm_ (source->getComm())
104 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
112 tData->comm_ =
comm_;
123 tData->exportPIDs_.resize(tData->exportLIDs_.size());
130 for (
size_t i = 0, j = 0; i < NumReceives; ++i) {
131 const int pid = ProcsFrom[i];
132 for (
size_t k = 0; k < LengthsFrom[i]; ++k) {
133 tData->exportPIDs_[j] = pid;
141 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
154 #define TPETRA_IMPORTEXPORTDATA_INSTANT(LO, GO, NODE) \ 156 template class ImportExportData< LO , GO , NODE >; 158 #endif // TPETRA_IMPORTEXPORTDATA_DEF_HPP size_t numSameIDs_
Number of initial identical indices.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Teuchos::RCP< const Teuchos::Comm< int > > comm_
Communicator over which the source and target objects are distributed.
~ImportExportData()
Destructor.
size_t getNumReceives() const
The number of processes from which we will receive data.
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.
ArrayView< const size_t > getLengthsFrom() const
Number of values this process will receive from each process.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::Array< LocalOrdinal > exportLIDs_
"Outgoing" local indices.
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.
Describes a parallel distribution of objects 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.
ArrayView< const int > getImagesFrom() const
Ranks of the processes sending values to this process.
Teuchos::RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > reverseClone()
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor...
Teuchos::Array< LocalOrdinal > remoteLIDs_
"Incoming" indices.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > source_
Source Map of the Import or Export.
const RCP< Distributor > & getReverse() const
A reverse communication plan Distributor.