|
Tpetra Matrix/Vector Services
Version of the Day
|
Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distribution. More...
#include <Tpetra_Export.hpp>
Inherits Describable.
Public Types | |
| typedef Map< LocalOrdinal, GlobalOrdinal, Node > | map_type |
| The specialization of Map used by this class. | |
Public Member Functions | |
Constructor/Destructor Methods | |
| Export (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target) | |
| Construct a Export object from the source and target Map. | |
| Export (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist) | |
| Constructor (with list of parameters). | |
| Export (const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs) | |
| Copy constructor. | |
| ~Export () | |
| Destructor. | |
Export Attribute Methods | |
| size_t | getNumSameIDs () const |
| Number of initial identical IDs. | |
| size_t | getNumPermuteIDs () const |
| Number of IDs to permute but not to communicate. | |
| ArrayView< const LocalOrdinal > | getPermuteFromLIDs () const |
| List of local IDs in the source Map that are permuted. | |
| ArrayView< const LocalOrdinal > | getPermuteToLIDs () const |
| List of local IDs in the target Map that are permuted. | |
| size_t | getNumRemoteIDs () const |
| Number of entries not on the calling process. | |
| ArrayView< const LocalOrdinal > | getRemoteLIDs () const |
| List of entries in the target Map to receive from other processes. | |
| size_t | getNumExportIDs () const |
| Number of entries that must be sent by the calling process to other processes. | |
| ArrayView< const LocalOrdinal > | getExportLIDs () const |
| List of entries in the source Map that will be sent to other processes. | |
| ArrayView< const int > | getExportImageIDs () const |
| List of processes to which entries will be sent. | |
| const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > & | getSourceMap () const |
The source Map used to construct this Export. | |
| const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > & | getTargetMap () const |
The target Map used to construct this Export. | |
| Distributor & | getDistributor () const |
The Distributor that this Export object uses to move data. | |
| Export< LocalOrdinal, GlobalOrdinal, Node > & | operator= (const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs) |
| Assignment operator. | |
I/O Methods | |
| virtual void | print (std::ostream &os) const |
| Print the Export's data to the given output stream. | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class LO , class GO , class Node > | |
| RCP< const Export< LO, GO, Node > > | createExport (const RCP< const Map< LO, GO, Node > > &src, const RCP< const Map< LO, GO, Node > > &tgt) |
| Non-member constructor for Export objects. | |
Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distribution.
Tpetra users should use this class to construct a communication plan between two data distributions (i.e., two Map objects). The plan can be called repeatedly by computational classes to perform communication according to the same pattern. Constructing the plan may be expensive, both in terms of communication and computation. However, it can be reused inexpensively.
Tpetra has two classes for data redistribution: Import and Export. Import is for redistributing data from a uniquely-owned distribution to a possibly multiply-owned distribution. Export is for redistributing data from a possibly multiply-owned distribution to a uniquely-owned distribution.
One use case of Export is finite element assembly. For example, one way to compute a distributed forcing term vector is to use an overlapping distribution for the basis functions' domains. An Export with the SUM combine mode combines each process' contribution to the integration into a single nonoverlapping distribution.
Epetra separated Import and Export for performance reasons. The implementation is different, depending on which direction is the uniquely-owned Map. Tpetra retains this convention.
This class is templated on the same template arguments as Map: the local ordinal type (LocalOrdinal), the global ordinal type (GlobalOrdinal), and the Kokkos Node type (Node).
Definition at line 90 of file Tpetra_Export.hpp.
| typedef Map<LocalOrdinal,GlobalOrdinal,Node> Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::map_type |
The specialization of Map used by this class.
Definition at line 94 of file Tpetra_Export.hpp.
| Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::Export | ( | const Teuchos::RCP< const map_type > & | source, |
| const Teuchos::RCP< const map_type > & | target | ||
| ) |
| Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::Export | ( | const Teuchos::RCP< const map_type > & | source, |
| const Teuchos::RCP< const map_type > & | target, | ||
| const Teuchos::RCP< Teuchos::ParameterList > & | plist | ||
| ) |
Constructor (with list of parameters).
| source | [in] The source distribution. This may be a multiply owned (overlapping) distribution. |
| target | [in] The target distribution. This must be a uniquely owned (nonoverlapping) distribution. |
| plist | [in/out] List of parameters. Currently passed directly to the Distributor that implements communication. If you don't know what this should be, you should use the two-argument constructor, listed above. |
| Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::Export | ( | const Export< LocalOrdinal, GlobalOrdinal, Node > & | rhs | ) |
Copy constructor.
Definition at line 265 of file Tpetra_Export.hpp.
| Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::~Export | ( | ) |
Destructor.
Definition at line 270 of file Tpetra_Export.hpp.
| size_t Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getNumSameIDs | ( | ) | const [inline] |
Number of initial identical IDs.
The number of IDs that are identical between the source and target Maps, up to the first different ID.
Definition at line 274 of file Tpetra_Export.hpp.
| size_t Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getNumPermuteIDs | ( | ) | const [inline] |
Number of IDs to permute but not to communicate.
The number of IDs that are local to the calling process, but not part of the first getNumSameIDs() entries. The Import will permute these entries locally (without distributed-memory communication).
Definition at line 279 of file Tpetra_Export.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getPermuteFromLIDs | ( | ) | const [inline] |
List of local IDs in the source Map that are permuted.
Definition at line 285 of file Tpetra_Export.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getPermuteToLIDs | ( | ) | const [inline] |
List of local IDs in the target Map that are permuted.
Definition at line 291 of file Tpetra_Export.hpp.
| size_t Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getNumRemoteIDs | ( | ) | const [inline] |
Number of entries not on the calling process.
Definition at line 296 of file Tpetra_Export.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getRemoteLIDs | ( | ) | const [inline] |
List of entries in the target Map to receive from other processes.
Definition at line 302 of file Tpetra_Export.hpp.
| size_t Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getNumExportIDs | ( | ) | const [inline] |
Number of entries that must be sent by the calling process to other processes.
Definition at line 307 of file Tpetra_Export.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getExportLIDs | ( | ) | const [inline] |
List of entries in the source Map that will be sent to other processes.
Definition at line 313 of file Tpetra_Export.hpp.
| ArrayView< const int > Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getExportImageIDs | ( | ) | const [inline] |
List of processes to which entries will be sent.
The entry with local ID getExportLIDs()[i] will be sent to process getExportImageIDs()[i].
Definition at line 319 of file Tpetra_Export.hpp.
| const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getSourceMap | ( | ) | const [inline] |
The source Map used to construct this Export.
Definition at line 325 of file Tpetra_Export.hpp.
| const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getTargetMap | ( | ) | const [inline] |
The target Map used to construct this Export.
Definition at line 331 of file Tpetra_Export.hpp.
| Distributor & Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::getDistributor | ( | ) | const [inline] |
The Distributor that this Export object uses to move data.
Definition at line 337 of file Tpetra_Export.hpp.
| Export< LocalOrdinal, GlobalOrdinal, Node > & Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::operator= | ( | const Export< LocalOrdinal, GlobalOrdinal, Node > & | rhs | ) |
Assignment operator.
Definition at line 343 of file Tpetra_Export.hpp.
| void Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >::print | ( | std::ostream & | os | ) | const [virtual] |
Print the Export's data to the given output stream.
This method assumes that the given output stream can be written on all process(es) in the Export's communicator. The resulting output is useful mainly for debugging.
Definition at line 358 of file Tpetra_Export.hpp.
| RCP< const Export< LO, GO, Node > > createExport | ( | const RCP< const Map< LO, GO, Node > > & | src, |
| const RCP< const Map< LO, GO, Node > > & | tgt | ||
| ) | [related] |
Non-member constructor for Export objects.
Creates a Export object from the given source and target maps.
src != null tgt != null src == tgt, returns null. (Debug mode: throws std::runtime_error if one of src or tgt is null.) Definition at line 621 of file Tpetra_Export.hpp.
1.7.6.1