42 #ifndef TPETRA_DIRECTORY_DECL_HPP 43 #define TPETRA_DIRECTORY_DECL_HPP 45 #include <Kokkos_DefaultNode.hpp> 46 #include <Teuchos_Describable.hpp> 47 #include "Tpetra_ConfigDefs.hpp" 125 class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type,
173 template <
class Node2>
174 Teuchos::RCP<Directory<LocalOrdinal,GlobalOrdinal,Node2> >
178 typedef LocalOrdinal LO;
179 typedef GlobalOrdinal GO;
185 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
186 TEUCHOS_TEST_FOR_EXCEPTION(
187 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: " 188 "The input Map claims to be distributed, contiguous, and uniform, " 189 "but its Directory's implementation type does not match that assumption. " 190 "Please report this bug to the Tpetra developers.");
191 dir->impl_ = theImpl->template clone<Node2> (clone_map);
195 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
196 TEUCHOS_TEST_FOR_EXCEPTION(
197 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: " 198 "The input Map claims to be distributed and contiguous, but its " 199 "Directory's implementation type does not match that assumption. " 200 "Please report this bug to the Tpetra developers.");
201 dir->impl_ = theImpl->template clone<Node2> (clone_map);
205 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
206 TEUCHOS_TEST_FOR_EXCEPTION(
207 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: " 208 "The input Map claims to be noncontiguous, but its " 209 "Directory's implementation type does not match that assumption. " 210 "Please report this bug to the Tpetra developers.");
211 dir->impl_ = theImpl->template clone<Node2> (clone_map);
216 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
217 TEUCHOS_TEST_FOR_EXCEPTION(
218 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: " 219 "The input Map claims to be locally replicated, but its " 220 "Directory's implementation type does not match that assumption. " 221 "Please report this bug to the Tpetra developers.");
222 dir->impl_ = theImpl->template clone<Node2> (clone_map);
265 const Teuchos::ArrayView<const GlobalOrdinal>& globalIDs,
266 const Teuchos::ArrayView<int>& nodeIDs)
const;
305 const Teuchos::ArrayView<const GlobalOrdinal>& globalIDs,
306 const Teuchos::ArrayView<int>& nodeIDs,
307 const Teuchos::ArrayView<LocalOrdinal>& localIDs)
const;
331 const base_type* impl_;
336 template <
class LO,
class GO,
class N>
friend class Directory;
344 #endif // TPETRA_DIRECTORY_DECL_HPP Interface for breaking ties in ownership.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
bool isOneToOne(const map_type &map) const
Whether the Directory's input Map is (globally) one to one.
Implementation of Directory for a locally replicated Map.
Interface for breaking ties in ownership.
KokkosClassic::DefaultNode::DefaultNodeType node_type
Default value of Node template parameter.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
Type of the Map specialization to give to the constructor.
LookupStatus
Return status of Map remote index lookup (getRemoteIndexList()).
bool isContiguous() const
True if this Map is distributed contiguously, else false.
Implementation of Directory for a distributed noncontiguous Map.
Implementation of Directory for a distributed contiguous Map.
LookupStatus getDirectoryEntries(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs) const
Given a global ID list, return the list of their owning process IDs.
int local_ordinal_type
Default value of LocalOrdinal template parameter.
bool initialized() const
Whether the Directory is initialized.
Declarations for the Tpetra::Map class and related nonmember constructors.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
Describes a parallel distribution of objects over processes.
Computes the local ID and process ID corresponding to given global IDs.
Implement mapping from global ID to process ID and local ID.
void initialize(const map_type &map)
Initialize the Directory with its Map.
Directory()
Default constructor: the only one you should use.
Teuchos::RCP< Directory< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const Map< LocalOrdinal, GlobalOrdinal, Node2 > &clone_map) const
Clone the Directory for a different Node type, using a cloned Map.
Declaration of implementation details of Tpetra::Directory.
bool isUniform() const
Whether the range of global indices is uniform.
std::string description() const
A one-line human-readable description of this object.