Tpetra parallel linear algebra
Version of the Day
|
Implementation detail of Import and Export. More...
#include <Tpetra_ImportExportData_decl.hpp>
Public Member Functions | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target) | |
Constructor. More... | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::FancyOStream > &out) | |
Constructor with output stream. More... | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist) | |
Constructor with ParameterList for Distributor. More... | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::FancyOStream > &out, const Teuchos::RCP< Teuchos::ParameterList > &plist) | |
Constructor with output stream, and ParameterList for Distributor. More... | |
~ImportExportData () | |
Destructor. More... | |
Teuchos::RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > | reverseClone () |
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor. More... | |
Public Attributes | |
Teuchos::RCP< Teuchos::FancyOStream > | out_ |
Output stream for debug output. More... | |
Teuchos::Array< LocalOrdinal > | permuteToLIDs_ |
Index of target Map LIDs to which to permute. More... | |
Teuchos::Array< LocalOrdinal > | permuteFromLIDs_ |
Index of source Map LIDs from which to permute. More... | |
Teuchos::Array< LocalOrdinal > | remoteLIDs_ |
"Incoming" indices. More... | |
Teuchos::Array< LocalOrdinal > | exportLIDs_ |
"Outgoing" local indices. More... | |
Teuchos::Array< int > | exportPIDs_ |
Ranks of the processes to which the source object sends data. More... | |
size_t | numSameIDs_ |
Number of initial identical indices. More... | |
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > | source_ |
Source Map of the Import or Export. More... | |
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > | target_ |
Target Map of the Import or Export. More... | |
Teuchos::RCP< const Teuchos::Comm< int > > | comm_ |
Communicator over which the source and target objects are distributed. More... | |
Distributor | distributor_ |
Object that actually distributes (sends and receives) data. More... | |
Implementation detail of Import and Export.
LocalOrdinal | The type of local indices. See the documentation of Map for requirements. |
GlobalOrdinal | The type of global indices. See the documentation of Map for requirements. |
Node | The Kokkos Node type. See the documentation of Map for requirements. |
Import and Export both require the same data. We use this class as a container for those data. They include incoming ("remote") and outgoing ("export") local indices (LIDs), LIDs to permute on the source and target of the Import or Export, and process ranks ("image IDs") to which to send.
Definition at line 80 of file Tpetra_ImportExportData_decl.hpp.
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target | ||
) |
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target, | ||
const Teuchos::RCP< Teuchos::FancyOStream > & | out | ||
) |
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target, | ||
const Teuchos::RCP< Teuchos::ParameterList > & | plist | ||
) |
Constructor with ParameterList for Distributor.
source | [in] Source Map of the Import or Export |
target | [in] Target Map of the Import or Export |
plist | [in/out] List of parameters for the Distributor |
Definition at line 77 of file Tpetra_ImportExportData_def.hpp.
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target, | ||
const Teuchos::RCP< Teuchos::FancyOStream > & | out, | ||
const Teuchos::RCP< Teuchos::ParameterList > & | plist | ||
) |
Constructor with output stream, and ParameterList for Distributor.
source | [in] Source Map of the Import or Export |
target | [in] Target Map of the Import or Export |
out | [in/out] Output stream (for debugging output) |
plist | [in/out] List of parameters for the Distributor |
Definition at line 90 of file Tpetra_ImportExportData_def.hpp.
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::~ImportExportData | ( | ) |
Destructor.
Definition at line 140 of file Tpetra_ImportExportData_def.hpp.
RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::reverseClone | ( | ) |
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor.
"Reverse the direction of the transfer" means that an Import becomes an Export in the opposite direction, and vice versa.
Definition at line 104 of file Tpetra_ImportExportData_def.hpp.
Teuchos::RCP<Teuchos::FancyOStream> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::out_ |
Output stream for debug output.
Definition at line 126 of file Tpetra_ImportExportData_decl.hpp.
Teuchos::Array<LocalOrdinal> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::permuteToLIDs_ |
Index of target Map LIDs to which to permute.
After the initial numSameIDs_ indices which are the same in both the source and target Map, zero or more global indices (GIDs) remain. They exist in both the source and target Maps, but are in a different order. Therefore, they may have different local indices (LIDs), and require permutation.
For each remaining GIDs g in the target Map, if the source Map also owns g, then permuteToLIDs_ gets the corresponding LID in the target Map.
Definition at line 146 of file Tpetra_ImportExportData_decl.hpp.
Teuchos::Array<LocalOrdinal> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::permuteFromLIDs_ |
Index of source Map LIDs from which to permute.
After the initial numSameIDs_ indices which are the same in both the source and target Map, zero or more global indices (GIDs) remain. They exist in both the source and target Maps, but are in a different order. Therefore, they may have different local indices (LIDs), and require permutation.
For each remaining GID g in the target Map, if the source Map also owns g, then permuteFromLIDs_ gets the corresponding LID in the source Map.
Definition at line 159 of file Tpetra_ImportExportData_decl.hpp.
Teuchos::Array<LocalOrdinal> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::remoteLIDs_ |
Teuchos::Array<LocalOrdinal> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportLIDs_ |
Teuchos::Array<int> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportPIDs_ |
Ranks of the processes to which the source object sends data.
Definition at line 178 of file Tpetra_ImportExportData_decl.hpp.
size_t Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::numSameIDs_ |
Number of initial identical indices.
The number of initial indices (IDs) that are identical between the source and target Maps. This count stops at the first different ID.
Note that we didn't specify whether the IDs are global (GID) or local (LID). That is because if the two Maps start with the same sequence of GIDs on the calling process, then those GIDs map to the same LIDs on the calling process. Thus, when we say "ID" in the previous paragraph, we include both GID and LID.
Definition at line 192 of file Tpetra_ImportExportData_decl.hpp.
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::source_ |
Source Map of the Import or Export.
Definition at line 195 of file Tpetra_ImportExportData_decl.hpp.
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::target_ |
Target Map of the Import or Export.
Definition at line 198 of file Tpetra_ImportExportData_decl.hpp.
Teuchos::RCP<const Teuchos::Comm<int> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::comm_ |
Communicator over which the source and target objects are distributed.
Definition at line 201 of file Tpetra_ImportExportData_decl.hpp.
Distributor Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::distributor_ |
Object that actually distributes (sends and receives) data.
The Import or Export object that controls this ImportExportData container is responsible for initializing the Distributor. The Distributor's constructor just gives it the communicator; it does not complete initialization.
Definition at line 209 of file Tpetra_ImportExportData_decl.hpp.