Go to the documentation of this file.
46 #ifndef XPETRA_TPETRAMAP_DECL_HPP
47 #define XPETRA_TPETRAMAP_DECL_HPP
53 #include <Tpetra_Map.hpp>
55 #include "Xpetra_Map.hpp"
62 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
63 const RCP<Map<LocalOrdinal,GlobalOrdinal,Node> >
toXpetraNonConst(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >& map);
65 template <
class LocalOrdinal,
69 :
public virtual Map<LocalOrdinal,GlobalOrdinal,Node> {
78 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
81 GlobalOrdinal indexBase,
85 #endif // TPETRA_ENABLE_DEPRECATED_CODE
89 GlobalOrdinal indexBase,
95 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
98 size_t numLocalElements,
99 GlobalOrdinal indexBase,
102 #endif // TPETRA_ENABLE_DEPRECATED_CODE
106 size_t numLocalElements,
107 GlobalOrdinal indexBase,
112 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
116 GlobalOrdinal indexBase,
119 #endif // TPETRA_ENABLE_DEPRECATED_CODE
124 GlobalOrdinal indexBase,
128 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
129 #ifdef HAVE_XPETRA_TPETRA
132 const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
133 GlobalOrdinal indexBase,
218 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
221 #endif // TPETRA_ENABLE_DEPRECATED_CODE
237 #ifdef XPETRA_ENABLE_DEPRECATED_CODE
238 template<
class Node2>
258 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
259 #ifdef HAVE_XPETRA_TPETRA
262 local_map_type getLocalMap ()
const;
275 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
282 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
285 if (map != Teuchos::null) {
287 return tpetraMap->getTpetra_Map();
289 return Teuchos::null;
294 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
299 return tpetraMap->getTpetra_Map();
302 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
307 return Teuchos::null;
310 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
315 return Teuchos::null;
319 namespace useTpetra {
322 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
323 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
328 return createLocalMapWithNode<LocalOrdinal,GlobalOrdinal,Node>
331 #endif // TPETRA_ENABLE_DEPRECATED_CODE
332 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
342 template <
class LocalOrdinal,
class GlobalOrdinal>
347 return rcp(
new TpetraMap<LocalOrdinal,GlobalOrdinal,
typename Tpetra::Map<>::node_type>(
Tpetra::createContigMap<LocalOrdinal,GlobalOrdinal,
typename Tpetra::Map<>::node_type>(numElements, localNumElements, comm)));
351 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
352 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
358 return createContigMapWithNode<LocalOrdinal,GlobalOrdinal,Node>
359 (numElements, localNumElements, comm);
361 #endif // TPETRA_ENABLE_DEPRECATED_CODE
362 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
372 #define XPETRA_TPETRAMAP_SHORT
374 #endif // XPETRA_TPETRAMAP_DECL_HPP
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
size_t global_size_t
Global size_t object.
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, Node > > createContigMapWithNode(global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Non-member function to create a (potentially) non-uniform, contiguous Map with a user-specified node.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
std::string description() const
Return a simple one-line description of this object.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const Map< LocalOrdinal, GlobalOrdinal, Node1 > &map, const RCP< Node2 > &node2)
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
const RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > toXpetraNonConst(const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, Node > > createLocalMapWithNode(size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Non-member function to create a locally replicated Map with a specified node.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > map_
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Return the process IDs and corresponding local IDs for the given global IDs.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print this object with the given verbosity level to the given FancyOStream.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > toTpetraNonZero(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
static const EVerbosityLevel verbLevel_default
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
Replace this Map's communicator with a subset communicator.
#define XPETRA_MONITOR(funcName)
LocalOrdinal getMinLocalIndex() const
The minimum local index.
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, typename Tpetra::Map<>::node_type > > createContigMap(global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Non-member function to create a (potentially) non-uniform, contiguous Map with the default node.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
GlobalOrdinal getIndexBase() const
The index base for this Map.