Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
Tpetra::Details::Classes::Transfer< LO, GO, NT > Class Template Referenceabstract

Common base class of Import and Export. More...

#include <Tpetra_Details_Transfer_decl.hpp>

Inheritance diagram for Tpetra::Details::Classes::Transfer< LO, GO, NT >:
Inheritance graph
[legend]

Public Types

typedef ::Tpetra::Map< LO, GO, NT > map_type
 The specialization of Map used by this class and subclasses. More...
 

Public Member Functions

virtual ~Transfer ()
 Destructor (declared virtual for memory safety of derived classes). More...
 
virtual size_t getNumSameIDs () const =0
 Number of initial identical IDs. More...
 
virtual size_t getNumPermuteIDs () const =0
 Number of IDs to permute but not to communicate. More...
 
virtual Teuchos::ArrayView
< const LO > 
getPermuteFromLIDs () const =0
 List of local IDs in the source Map that are permuted. More...
 
virtual Teuchos::ArrayView
< const LO > 
getPermuteToLIDs () const =0
 List of local IDs in the target Map that are permuted. More...
 
virtual size_t getNumRemoteIDs () const =0
 Number of entries not on the calling process. More...
 
virtual Teuchos::ArrayView
< const LO > 
getRemoteLIDs () const =0
 List of entries in the target Map to receive from other processes. More...
 
virtual size_t getNumExportIDs () const =0
 Number of entries that must be sent by the calling process to other processes. More...
 
virtual Teuchos::ArrayView
< const LO > 
getExportLIDs () const =0
 List of entries in the source Map that will be sent to other processes. More...
 
virtual Teuchos::ArrayView
< const int > 
getExportPIDs () const =0
 List of processes to which entries will be sent. More...
 
virtual Teuchos::RCP< const
map_type
getSourceMap () const =0
 The source Map used to construct this Export or Import. More...
 
virtual Teuchos::RCP< const
map_type
getTargetMap () const =0
 The target Map used to construct this Export or Import. More...
 
virtual ::Tpetra::DistributorgetDistributor () const =0
 The Distributor that this Export or Import object uses to move data. More...
 
virtual bool isLocallyComplete () const =0
 Is this Export or Import locally complete? More...
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Describe this object in a human-readable way to the given output stream. More...
 

Protected Member Functions

void describeImpl (Teuchos::FancyOStream &out, const std::string &className, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Implementation of describe() for subclasses (Tpetra::Import and Tpetra::Export). More...
 

Detailed Description

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
class Tpetra::Details::Classes::Transfer< LO, GO, NT >

Common base class of Import and Export.

Warning
This is an implementation detail of Tpetra. We make no promises of backwards compatibility with this class.

Definition at line 69 of file Tpetra_Details_Transfer_decl.hpp.

Member Typedef Documentation

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
typedef ::Tpetra::Map<LO, GO, NT> Tpetra::Details::Classes::Transfer< LO, GO, NT >::map_type

The specialization of Map used by this class and subclasses.

The initial two colons avoid confusion between Tpetra::Map and Tpetra::Detaills::Map.

Definition at line 78 of file Tpetra_Details_Transfer_decl.hpp.

Constructor & Destructor Documentation

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Tpetra::Details::Classes::Transfer< LO, GO, NT >::~Transfer ( )
inlinevirtual

Destructor (declared virtual for memory safety of derived classes).

Definition at line 72 of file Tpetra_Details_Transfer_decl.hpp.

Member Function Documentation

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual size_t Tpetra::Details::Classes::Transfer< LO, GO, NT >::getNumSameIDs ( ) const
pure virtual

Number of initial identical IDs.

The number of IDs that are identical between the source and target Maps, up to the first different ID.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual size_t Tpetra::Details::Classes::Transfer< LO, GO, NT >::getNumPermuteIDs ( ) const
pure virtual

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 or Export will permute these entries locally (without distributed-memory communication).

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::ArrayView<const LO> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getPermuteFromLIDs ( ) const
pure virtual
template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::ArrayView<const LO> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getPermuteToLIDs ( ) const
pure virtual
template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual size_t Tpetra::Details::Classes::Transfer< LO, GO, NT >::getNumRemoteIDs ( ) const
pure virtual
template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::ArrayView<const LO> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getRemoteLIDs ( ) const
pure virtual

List of entries in the target Map to receive from other processes.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual size_t Tpetra::Details::Classes::Transfer< LO, GO, NT >::getNumExportIDs ( ) const
pure virtual

Number of entries that must be sent by the calling process to other processes.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::ArrayView<const LO> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getExportLIDs ( ) const
pure virtual

List of entries in the source Map that will be sent to other processes.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::ArrayView<const int> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getExportPIDs ( ) const
pure virtual

List of processes to which entries will be sent.

The entry with local ID getExportLIDs()[i] will be sent to process getExportPiDs()[i].

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::RCP<const map_type> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getSourceMap ( ) const
pure virtual

The source Map used to construct this Export or Import.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual Teuchos::RCP<const map_type> Tpetra::Details::Classes::Transfer< LO, GO, NT >::getTargetMap ( ) const
pure virtual

The target Map used to construct this Export or Import.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual ::Tpetra::Distributor& Tpetra::Details::Classes::Transfer< LO, GO, NT >::getDistributor ( ) const
pure virtual
template<class LO = ::Tpetra::Details::DefaultTypes::local_ordinal_type, class GO = ::Tpetra::Details::DefaultTypes::global_ordinal_type, class NT = ::Tpetra::Details::DefaultTypes::node_type>
virtual bool Tpetra::Details::Classes::Transfer< LO, GO, NT >::isLocallyComplete ( ) const
pure virtual

Is this Export or Import locally complete?

If this is an Export, then do all source Map indices on the calling process exist on at least one process (not necessarily this one) in the target Map?

If this is an Import, then do all target Map indices on the calling process exist on at least one process (not necessarily this one) in the source Map?

It's not necessarily an error for an Export or Import not to be locally complete on one or more processes. For example, this may happen in the common use case of "restriction" – that is, taking a subset of a large object. Nevertheless, you may find this predicate useful for figuring out whether you set up your Maps in the way that you expect.

Implemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

template<class LO , class GO , class NT >
void Tpetra::Details::Classes::Transfer< LO, GO, NT >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
virtual

Describe this object in a human-readable way to the given output stream.

You must call this method as a collective over all processes in the communicator of the source and target Map of this object.

Parameters
out[out] Output stream to which to write. Only Process 0 in this object's communicator may write to the output stream.
verbLevel[in] Verbosity level. This also controls whether this method does any communication. At verbosity levels higher (greater) than Teuchos::VERB_LOW, this method behaves as a collective over the object's communicator.

Teuchos::FancyOStream wraps std::ostream. It adds features like tab levels. If you just want to wrap std::cout, try this:

auto out = Teuchos::getFancyOStream (Teuchos::rcpFromRef (std::out));

Reimplemented in Tpetra::Classes::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Classes::Export< LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 59 of file Tpetra_Details_Transfer_def.hpp.

template<class LO , class GO , class NT >
void Tpetra::Details::Classes::Transfer< LO, GO, NT >::describeImpl ( Teuchos::FancyOStream &  out,
const std::string &  className,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
protected

Implementation of describe() for subclasses (Tpetra::Import and Tpetra::Export).

Parameters
out[out] Output stream to which to write. Only Process 0 in this object's communicator may write to the output stream.
className[in] Name of the subclass of Transfer calling this method.
verbLevel[in] Verbosity level. This also controls whether this method does any communication. At verbosity levels higher (greater) than Teuchos::VERB_LOW, this method behaves as a collective over the object's communicator.

Definition at line 68 of file Tpetra_Details_Transfer_def.hpp.


The documentation for this class was generated from the following files: