Tpetra Matrix/Vector Services  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType > Class Template Referenceabstract

Computes the local ID and process ID corresponding to given global IDs. More...

#include <Tpetra_DirectoryImpl_decl.hpp>

Inheritance diagram for Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >:
Inheritance graph
[legend]

Public Member Functions

 Directory (const Teuchos::RCP< const map_type > &map)
 Constructor. More...
 
LookupStatus getEntries (const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const
 

Protected Member Functions

virtual LookupStatus getEntriesImpl (const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs, const bool computeLIDs) const =0
 Actually do the work of getEntries(), with no input validation. More...
 
Teuchos::RCP< const map_type > getMap () const
 Get the Map with which this object was created. More...
 
void setMap (const Teuchos::RCP< const map_type > &map)
 Set the Map for this object, for post-contructor initialization. More...
 
 Directory ()
 Empty constructor for post-constructor initialization. More...
 

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal, class NodeType>
class Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >

Computes the local ID and process ID corresponding to given global IDs.

Note
To implementers: This class and its subclasses implement Tpetra::Directory. We separate out the interface (Tpetra::Directory) from the implementation in order to keep backwards compatibility of the interface.

Definition at line 81 of file Tpetra_DirectoryImpl_decl.hpp.

Constructor & Destructor Documentation

template<class LocalOrdinal , class GlobalOrdinal , class NodeType >
Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >::Directory ( const Teuchos::RCP< const map_type > &  map)

Constructor.

template<class LocalOrdinal , class GlobalOrdinal , class NodeType >
Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >::Directory ( )
inlineprotected

Empty constructor for post-constructor initialization.

Definition at line 139 of file Tpetra_DirectoryImpl_decl.hpp.

Member Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class NodeType >
LookupStatus Tpetra::Details::Directory< LO, GO, NT >::getEntries ( const Teuchos::ArrayView< const GlobalOrdinal > &  globalIDs,
const Teuchos::ArrayView< int > &  nodeIDs,
const Teuchos::ArrayView< LocalOrdinal > &  localIDs,
const bool  computeLIDs 
) const

Find process IDs and (optionally) local IDs for the given global IDs.

Precondition
nodeIDs.size() == globalIDs.size()
! computeLIDs || localIDs.size() == globalIDs.size()
Parameters
globalIDs[in] The global IDs for which to find process IDs (and optionally local IDs).
nodeIDs[out] The process IDs corresponding to the given global IDs. If a global ID does not belong to any process, the corresponding entry of nodeIDs will be -1.
localIDs[out] If computeLIDs is true, we fill this with the local IDs corresponding to the given global IDs. If a given global ID does not correspond to a local ID, the corresponding entry will be Teuchos::OrdinalTraits<LocalOrdinal>::invalid().
computeLIDs[in] Whether to fill in localIDs.
Returns
If at least one GID was not present in the directory, return IDNotPresent. Otherwise, return AllIDsPresent.
Note
To implementers: The implementation of this method first performs input validation, then invokes getEntriesImpl() (implemented in the subclass) to do the work.

Definition at line 74 of file Tpetra_DirectoryImpl_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class NodeType >
virtual LookupStatus Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >::getEntriesImpl ( const Teuchos::ArrayView< const GlobalOrdinal > &  globalIDs,
const Teuchos::ArrayView< int > &  nodeIDs,
const Teuchos::ArrayView< LocalOrdinal > &  localIDs,
const bool  computeLIDs 
) const
protectedpure virtual
template<class LocalOrdinal , class GlobalOrdinal , class NodeType >
Teuchos::RCP<const map_type> Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >::getMap ( ) const
inlineprotected

Get the Map with which this object was created.

Definition at line 133 of file Tpetra_DirectoryImpl_decl.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class NodeType >
void Tpetra::Details::Directory< LocalOrdinal, GlobalOrdinal, NodeType >::setMap ( const Teuchos::RCP< const map_type > &  map)
inlineprotected

Set the Map for this object, for post-contructor initialization.

Definition at line 136 of file Tpetra_DirectoryImpl_decl.hpp.


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