Tpetra Matrix/Vector Services Version of the Day
Tpetra::Directory< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

A class used for efficienctly accessing global node/index information from a Map. More...

#include <Tpetra_Directory_decl.hpp>

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

List of all members.

Public Member Functions

Constructors/Destructor.
 Directory (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
 Constructor.
 ~Directory ()
 Destructor.
Query methods.
LookupStatus getDirectoryEntries (const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs) const
 Returns node info for non-local Map entries.
LookupStatus getDirectoryEntries (const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs) const
 Returns node info for non-local Map entries.

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Tpetra::Directory< LocalOrdinal, GlobalOrdinal, Node >

A class used for efficienctly accessing global node/index information from a Map.

For Map objects, a Directory object must be created to allow referencing of non-local elements. Tpetra::Directory produces and contains a uniform linear Map, allowing the directory to be distributed across all nodes.

This class has a single constructor, accepting the Map object for which the directory is created.

This class is templated on LocalOrdinal and GlobalOrdinal. The LocalOrdinal type, if omitted, defaults to int. The GlobalOrdinal type, if omitted, defaults to the LocalOrdinal type.

Definition at line 54 of file Tpetra_Directory_decl.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Directory< LocalOrdinal, GlobalOrdinal, Node >::Directory ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map) [explicit]

Constructor.

Definition at line 44 of file Tpetra_Directory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Directory< LocalOrdinal, GlobalOrdinal, Node >::~Directory ( )

Destructor.

Definition at line 71 of file Tpetra_Directory_def.hpp.


Member Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LookupStatus Tpetra::Directory< LocalOrdinal, GlobalOrdinal, Node >::getDirectoryEntries ( const Teuchos::ArrayView< const GlobalOrdinal > &  globalIDs,
const Teuchos::ArrayView< int > &  nodeIDs 
) const

Returns node info for non-local Map entries.

Given a list of global IDs, this function returns the corresponding list of owning node IDs.

Parameters:
globalIDs[in] List of global IDs to look up.
nodeIDs[out] On return, contains node IDs for the global IDs in question. -1 corresponds to global entries not present in the directory.
Returns:
IDNotPresent indicates that at least one global ID was not present in the directory. Otherwise, returns AllIDsPresent.
Note:
If nodeIDs.size() != globalIDs.size(), then a std::runtime_error exception is thrown.

Definition at line 74 of file Tpetra_Directory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LookupStatus Tpetra::Directory< LocalOrdinal, GlobalOrdinal, Node >::getDirectoryEntries ( const Teuchos::ArrayView< const GlobalOrdinal > &  globalIDs,
const Teuchos::ArrayView< int > &  nodeIDs,
const Teuchos::ArrayView< LocalOrdinal > &  localIDs 
) const

Returns node info for non-local Map entries.

Given a list of global IDs, this function returns the corresponding list of owning node IDs and local IDs.

Parameters:
globalIDs[in] List of global IDs to look up.
nodeIDs[out] On return, contains node IDs for the global IDs in question. -1 corresponds to global entries not present in the directory.
localIDs[out] On return contains the local ID of the global on the owning node. Teuchos::OrdinalTraits<LocalOrdinal>::invalid() corresponds to global entries not present in the directory.
Returns:
IDNotPresent indicates that at least one global ID was not present in the directory. Otherwise, returns AllIDsPresent.
Note:
If nodeIDs.size() != globalIDs.size() or localIDs.size() != globalIDs.size(), then a std::runtime_error exception is thrown.

Definition at line 82 of file Tpetra_Directory_def.hpp.


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