42 #ifndef TPETRA_DIRECTORY_DECL_HPP
43 #define TPETRA_DIRECTORY_DECL_HPP
45 #include "Tpetra_ConfigDefs.hpp"
49 #include <Teuchos_Describable.hpp>
123 template<
class LocalOrdinal,
172 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
173 template <
class Node2>
174 Teuchos::RCP<Directory<LocalOrdinal,GlobalOrdinal,Node2> > TPETRA_DEPRECATED
178 typedef LocalOrdinal LO;
179 typedef GlobalOrdinal GO;
184 typedef ::Tpetra::Details::ContiguousUniformDirectory<LO, GO, Node> impl_type;
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);
194 typedef ::Tpetra::Details::DistributedContiguousDirectory<LO, GO, Node> impl_type;
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);
204 typedef ::Tpetra::Details::DistributedNoncontiguousDirectory<LO, GO, Node> impl_type;
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);
215 typedef ::Tpetra::Details::ReplicatedDirectory<LO, GO, Node> impl_type;
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);
266 const Teuchos::ArrayView<const GlobalOrdinal>& globalIDs,
267 const Teuchos::ArrayView<int>& nodeIDs)
const;
306 const Teuchos::ArrayView<const GlobalOrdinal>& globalIDs,
307 const Teuchos::ArrayView<int>& nodeIDs,
308 const Teuchos::ArrayView<LocalOrdinal>& localIDs)
const;
326 typedef ::Tpetra::Details::Directory<LocalOrdinal, GlobalOrdinal, Node> base_type;
332 const base_type* impl_;
335 Directory (
const Directory<LocalOrdinal, GlobalOrdinal, Node>& directory);
337 template <
class LO,
class GO,
class N>
friend class Directory;
340 Directory<LocalOrdinal, GlobalOrdinal, Node>&
341 operator= (
const Directory<LocalOrdinal, GlobalOrdinal, Node>& source);
346 #endif // TPETRA_DIRECTORY_DECL_HPP
Interface for breaking ties in ownership.
Interface for breaking ties in ownership.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
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 isUniform() const
Whether the range of global indices is uniform.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
Declaration of the Tpetra::Map class and related nonmember constructors.
bool isOneToOne(const map_type &map) const
Whether the Directory's input Map is (globally) one to one.
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.
A parallel distribution of indices over processes.
Implement mapping from global ID to process ID and local ID.
bool initialized() const
Whether the Directory is initialized.
void initialize(const map_type &map)
Initialize the Directory with its Map.
Directory()
Default constructor: the only one you should use.
Declaration of implementation details of Tpetra::Directory.
std::string description() const
A one-line human-readable description of this object.