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;
337 template <
class LO,
class GO,
class N>
friend class Directory;
346 #endif // TPETRA_DIRECTORY_DECL_HPP