|
Tpetra parallel linear algebra
Version of the Day
|
42 #ifndef TPETRA_DIRECTORY_DECL_HPP
43 #define TPETRA_DIRECTORY_DECL_HPP
45 #include "Tpetra_ConfigDefs.hpp"
49 #include <Teuchos_Describable.hpp>
132 class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type,
180 template <
class Node2>
181 Teuchos::RCP<Directory<LocalOrdinal,GlobalOrdinal,Node2> >
185 typedef LocalOrdinal LO;
186 typedef GlobalOrdinal GO;
191 typedef ::Tpetra::Details::ContiguousUniformDirectory<LO, GO, Node> impl_type;
192 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
193 TEUCHOS_TEST_FOR_EXCEPTION(
194 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: "
195 "The input Map claims to be distributed, contiguous, and uniform, "
196 "but its Directory's implementation type does not match that assumption. "
197 "Please report this bug to the Tpetra developers.");
198 dir->impl_ = theImpl->template clone<Node2> (clone_map);
201 typedef ::Tpetra::Details::DistributedContiguousDirectory<LO, GO, Node> impl_type;
202 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
203 TEUCHOS_TEST_FOR_EXCEPTION(
204 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: "
205 "The input Map claims to be distributed and contiguous, but its "
206 "Directory's implementation type does not match that assumption. "
207 "Please report this bug to the Tpetra developers.");
208 dir->impl_ = theImpl->template clone<Node2> (clone_map);
211 typedef ::Tpetra::Details::DistributedNoncontiguousDirectory<LO, GO, Node> impl_type;
212 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
213 TEUCHOS_TEST_FOR_EXCEPTION(
214 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: "
215 "The input Map claims to be noncontiguous, but its "
216 "Directory's implementation type does not match that assumption. "
217 "Please report this bug to the Tpetra developers.");
218 dir->impl_ = theImpl->template clone<Node2> (clone_map);
222 typedef ::Tpetra::Details::ReplicatedDirectory<LO, GO, Node> impl_type;
223 const impl_type* theImpl =
dynamic_cast<const impl_type*
> (impl_);
224 TEUCHOS_TEST_FOR_EXCEPTION(
225 theImpl == NULL, std::logic_error,
"Tpetra::Directory::clone: "
226 "The input Map claims to be locally replicated, but its "
227 "Directory's implementation type does not match that assumption. "
228 "Please report this bug to the Tpetra developers.");
229 dir->impl_ = theImpl->template clone<Node2> (clone_map);
272 const Teuchos::ArrayView<const GlobalOrdinal>& globalIDs,
273 const Teuchos::ArrayView<int>& nodeIDs)
const;
312 const Teuchos::ArrayView<const GlobalOrdinal>& globalIDs,
313 const Teuchos::ArrayView<int>& nodeIDs,
314 const Teuchos::ArrayView<LocalOrdinal>& localIDs)
const;
332 typedef ::Tpetra::Details::Directory<LocalOrdinal, GlobalOrdinal, Node>
base_type;
343 template <
class LO,
class GO,
class N>
friend class Directory;
354 #endif // TPETRA_DIRECTORY_DECL_HPP
void initialize(const map_type &map, const Tpetra::Details::TieBreak< LocalOrdinal, GlobalOrdinal > &tieBreak)
Initialize the Directory, with its Map and a TieBreak object.
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.
void initialize(const map_type &map)
Initialize the Directory with its Map.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
std::string description() const
A one-line human-readable description of this object.
::Kokkos::Compat::KokkosDeviceWrapperNode< execution_space > node_type
Default value of Node template parameter.
bool isUniform() const
Whether the range of global indices is uniform.
Interface for breaking ties in ownership.
bool initialized() const
Whether the Directory is initialized.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
Type of the Map specialization to give to the constructor.
Declaration of the Tpetra::Map class and related nonmember constructors.
LookupStatus
Return status of Map remote index lookup (getRemoteIndexList()).
int local_ordinal_type
Default value of Scalar template parameter.
LookupStatus getDirectoryEntries(const map_type &map, const Teuchos::ArrayView< const GlobalOrdinal > &globalIDs, const Teuchos::ArrayView< int > &nodeIDs, const Teuchos::ArrayView< LocalOrdinal > &localIDs) const
Given a global ID list, return a list of their owning process IDs and their corresponding local IDs.
Computes the local ID and process ID corresponding to given global IDs.
friend class Directory
Alias for Tpetra::Classes::Directory.
Interface for breaking ties in ownership.
A parallel distribution of indices over processes.
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.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Implement mapping from global ID to process ID and local ID.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
bool isOneToOne(const map_type &map) const
Whether the Directory's input Map is (globally) one to one.