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;
338 const base_type* impl_;
343 template <
class LO,
class GO,
class N>
friend class Directory;
354 #endif // TPETRA_DIRECTORY_DECL_HPP