Tpetra Matrix/Vector Services Version of the Day
Public Member Functions | Public Attributes
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Implementation detail of Import and Export. More...

#include <Tpetra_ImportExportData_decl.hpp>

List of all members.

Public Member Functions

 ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
 Constructor.
 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.
 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.
 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.
 ~ImportExportData ()
 Destructor.
Teuchos::RCP< ImportExportData
< LocalOrdinal, GlobalOrdinal,
Node > > 
reverseClone ()
 Copy the data, but reverse the direction of the transfer as well as reversing the Distributor.

Public Attributes

Teuchos::RCP
< Teuchos::FancyOStream
out_
 Output stream for debug output.
Teuchos::Array< LocalOrdinal > permuteToLIDs_
 Index of target Map LIDs to which to permute.
Teuchos::Array< LocalOrdinal > permuteFromLIDs_
 Index of source Map LIDs from which to permute.
Teuchos::Array< LocalOrdinal > remoteLIDs_
 "Incoming" indices.
Teuchos::Array< LocalOrdinal > exportLIDs_
 "Outgoing" local indices.
Teuchos::Array< int > exportPIDs_
 Ranks of the processes to which the source object sends data.
size_t numSameIDs_
 Number of initial identical indices.
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
source_
 Source Map of the Import or Export.
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
target_
 Target Map of the Import or Export.
Teuchos::RCP< const
Teuchos::Comm< int > > 
comm_
 Communicator over which the source and target objects are distributed.
Distributor distributor_
 Object that actually distributes (sends and receives) data.

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal, class Node>
class Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >

Implementation detail of Import and Export.

Template Parameters:
LocalOrdinalSame as the first template parameter of Map.
GlobalOrdinalSame as the second template parameter of Map.
NodeSame as the third template parameter of Map.
Warning:
This class is an implementation detail of Import and Export. It may change or disappear at any time. Tpetra users must not depend on this class.

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 74 of file Tpetra_ImportExportData_decl.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node>
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData ( const Teuchos::RCP< const map_type > &  source,
const Teuchos::RCP< const map_type > &  target 
)

Constructor.

Parameters:
source[in] Source Map of the Import or Export
target[in] Target Map of the Import or Export
template<class LocalOrdinal, class GlobalOrdinal, class Node>
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 
)

Constructor with output stream.

Parameters:
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)
template<class LocalOrdinal, class GlobalOrdinal, class Node>
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.

Parameters:
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
template<class LocalOrdinal, class GlobalOrdinal, class Node>
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.

Parameters:
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
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::~ImportExportData ( )

Destructor.

Definition at line 142 of file Tpetra_ImportExportData_def.hpp.


Member Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
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 106 of file Tpetra_ImportExportData_def.hpp.


Member Data Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::RCP<Teuchos::FancyOStream> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::out_

Output stream for debug output.

Definition at line 119 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
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 139 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
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 152 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::Array<LocalOrdinal> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::remoteLIDs_

"Incoming" indices.

This array holds the LIDs of the GIDs that are owned by the target Map, but not by the source Map. The target object of the Import or Export will receive data for these LIDs from other processes.

Definition at line 160 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::Array<LocalOrdinal> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportLIDs_

"Outgoing" local indices.

This array holds the LIDs of the GIDs that are owned by the source Map, but not by the target Map. The source object of the Import or Export will send data from these LIDs to other processes.

Definition at line 168 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
Teuchos::Array<int> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportPIDs_

Ranks of the processes to which the source object sends data.

Definition at line 171 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
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 185 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::source_

Source Map of the Import or Export.

Definition at line 188 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::target_

Target Map of the Import or Export.

Definition at line 191 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
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 194 of file Tpetra_ImportExportData_decl.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node>
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 202 of file Tpetra_ImportExportData_decl.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines