46 #ifndef XPETRA_TPETRAMAP_HPP 47 #define XPETRA_TPETRAMAP_HPP 53 #include <Tpetra_Map.hpp> 63 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
66 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
67 const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node > >
toTpetra(
const RCP<
const Map<LocalOrdinal,GlobalOrdinal,Node> >&);
69 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
70 const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node > >
toXpetra(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
72 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
73 const RCP<Map<LocalOrdinal,GlobalOrdinal,Node > >
toXpetraNonConst(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
76 template <class LocalOrdinal = Map<>::local_ordinal_type,
80 :
public virtual Map<LocalOrdinal,GlobalOrdinal,Node> {
89 GlobalOrdinal indexBase,
90 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
92 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node))
93 :
map_ (Teuchos::rcp (new Tpetra::
Map< LocalOrdinal, GlobalOrdinal, Node > (numGlobalElements,
100 size_t numLocalElements,
101 GlobalOrdinal indexBase,
102 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
103 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node))
104 :
map_ (Teuchos::rcp (new Tpetra::
Map< LocalOrdinal, GlobalOrdinal, Node > (numGlobalElements,
112 const Teuchos::ArrayView< const GlobalOrdinal > &elementList,
113 GlobalOrdinal indexBase,
114 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
115 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node))
116 :
map_(Teuchos::rcp(new Tpetra::
Map< LocalOrdinal, GlobalOrdinal, Node >(numGlobalElements,
117 elementList, indexBase,
163 LookupStatus getRemoteIndexList(
const Teuchos::ArrayView< const GlobalOrdinal > &GIDList,
const Teuchos::ArrayView< int > &nodeIDList,
const Teuchos::ArrayView< LocalOrdinal > &LIDList)
const {
XPETRA_MONITOR(
"TpetraMap::getRemoteIndexList");
return toXpetra(
map_->getRemoteIndexList(GIDList, nodeIDList, LIDList)); }
214 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const {
XPETRA_MONITOR(
"TpetraMap::describe");
map_->describe(out, verbLevel); }
219 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
replaceCommWithSubset (
const Teuchos::RCP<
const Teuchos::Comm<int> >& newComm)
const {
223 template<
class Node2>
224 RCP<Map<LocalOrdinal, GlobalOrdinal, Node2> >
clone(
const RCP<Node2> &node2)
const {
234 TpetraMap(
const Teuchos::RCP<
const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map)
241 RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > >
getTpetra_Map()
const {
return map_; }
243 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 244 #ifdef HAVE_XPETRA_TPETRA 247 local_map_type getLocalMap ()
const {
248 return map_->getLocalMap();
257 RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > >
map_;
262 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
269 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
272 if (map != Teuchos::null) {
274 return tpetraMap->getTpetra_Map();
276 return Teuchos::null;
281 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
283 TEUCHOS_TEST_FOR_EXCEPTION(map.is_null(), std::invalid_argument,
"map must be nonzero");
286 return tpetraMap->getTpetra_Map();
289 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
290 const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >
toXpetra(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >& map) {
294 return Teuchos::null;
297 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
298 const RCP<Map<LocalOrdinal,GlobalOrdinal,Node> >
toXpetraNonConst(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >& map) {
302 return Teuchos::null;
306 namespace useTpetra {
309 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
310 Teuchos::RCP< const TpetraMap<LocalOrdinal,GlobalOrdinal,Node> >
311 createLocalMapWithNode(
size_t numElements,
const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
const Teuchos::RCP< Node > & = Teuchos::null) {
318 template <
class LocalOrdinal,
class GlobalOrdinal>
319 Teuchos::RCP< const TpetraMap<LocalOrdinal,GlobalOrdinal> >
327 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
328 Teuchos::RCP< const TpetraMap<LocalOrdinal,GlobalOrdinal,Node> >
330 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
const Teuchos::RCP< Node > & = Teuchos::null) {
337 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
340 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
341 const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node > >
toTpetra(
const RCP<
const Map<LocalOrdinal,GlobalOrdinal,Node> >&);
343 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
344 const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node > >
toXpetra(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
346 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
347 const RCP<Map<LocalOrdinal,GlobalOrdinal,Node > >
toXpetraNonConst(
const RCP<
const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
349 #ifdef HAVE_XPETRA_EPETRA 351 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 352 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 357 :
public virtual Map<int,int,EpetraNode> {
370 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
372 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node)) {
378 size_t numLocalElements,
380 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
381 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node)) {
387 const Teuchos::ArrayView< const GlobalOrdinal > &elementList,
389 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
390 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node)) {
442 Teuchos::ArrayView< const GlobalOrdinal >
getNodeElementList()
const {
return Teuchos::ArrayView<const GlobalOrdinal>(); }
473 Teuchos::RCP< const Teuchos::Comm< int > >
getComm()
const {
return Teuchos::null; }
476 Teuchos::RCP< Node >
getNode()
const {
return Teuchos::null; }
487 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const { }
490 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
replaceCommWithSubset (
const Teuchos::RCP<
const Teuchos::Comm<int> >& newComm)
const {
return Teuchos::null; }
492 template<
class Node2>
493 RCP<Map<LocalOrdinal, GlobalOrdinal, Node2> >
clone(
const RCP<Node2> &node2)
const {
return Teuchos::null; }
501 TpetraMap(
const Teuchos::RCP<
const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map) {
509 RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > >
getTpetra_Map()
const {
return Teuchos::null; }
511 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 512 #ifdef HAVE_XPETRA_TPETRA 515 local_map_type getLocalMap ()
const {
516 return local_map_type();
526 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ 527 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) 531 :
public virtual Map<int,long long,EpetraNode> {
544 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
546 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node)) {
552 size_t numLocalElements,
554 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
555 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node)) {
561 const Teuchos::ArrayView< const GlobalOrdinal > &elementList,
563 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm,
564 const Teuchos::RCP< Node > &node = Teuchos::rcp(
new Node)) {
616 Teuchos::ArrayView< const GlobalOrdinal >
getNodeElementList()
const {
return Teuchos::ArrayView<const GlobalOrdinal>(); }
647 Teuchos::RCP< const Teuchos::Comm< int > >
getComm()
const {
return Teuchos::null; }
650 Teuchos::RCP< Node >
getNode()
const {
return Teuchos::null; }
661 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const { }
664 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> >
replaceCommWithSubset (
const Teuchos::RCP<
const Teuchos::Comm<int> >& newComm)
const {
return Teuchos::null; }
666 template<
class Node2>
667 RCP<Map<LocalOrdinal, GlobalOrdinal, Node2> >
clone(
const RCP<Node2> &node2)
const {
return Teuchos::null; }
675 TpetraMap(
const Teuchos::RCP<
const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map) {
683 RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > >
getTpetra_Map()
const {
return Teuchos::null; }
685 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 686 #ifdef HAVE_XPETRA_TPETRA 689 local_map_type getLocalMap ()
const {
691 return local_map_type();
700 #endif // HAVE_XPETRA_EPETRA 706 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
713 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
719 #define XPETRA_TPETRAMAP_SHORT 720 #endif // XPETRA_TPETRAMAP_HPP bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
bool operator!=(const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map1, const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map2)
Returns true if map is not identical to this map. Implemented in TpetraMap::isSameAs().
global_size_t getGlobalNumElements() const
The number of elements in this Map.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, Node > > createLocalMapWithNode(size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &=Teuchos::null)
Non-member function to create a locally replicated Map with a specified node.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal > > 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...
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
GlobalOrdinal global_ordinal_type
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
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.
GlobalOrdinal getIndexBase() const
The index base for this Map.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
std::string description() const
Return a simple one-line description of this object.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > toTpetraNonZero(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
global_size_t getGlobalNumElements() const
The number of elements in this Map.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with a user-defined contiguous distribution.
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.
Teuchos::RCP< Node > getNode() const
Get this Map's Node object.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
Teuchos::RCP< Node > getNode() const
Get this Map's Node object.
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, Node > > createContigMapWithNode(global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &=Teuchos::null)
Non-member function to create a (potentially) non-uniform, contiguous Map with a user-specified node...
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
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.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
std::string description() const
Return a simple one-line description of this object.
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.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
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.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with Tpetra-defined contiguous uniform distribution.
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with a user-defined contiguous distribution.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
Teuchos::RCP< Node > getNode() const
Get this Map's Node object.
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
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.
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with Tpetra-defined contiguous uniform distribution.
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with a user-defined contiguous distribution.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
GlobalOrdinal getIndexBase() const
The index base for this Map.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
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.
GlobalOrdinal getIndexBase() const
The index base for this Map.
const RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > toXpetraNonConst(const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &)
size_t global_size_t
Global size_t object.
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.
bool operator==(const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map1, const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map2)
Returns true if map is identical to this map. Implemented in TpetraMap::isSameAs().
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
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.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
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.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > map_
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with Tpetra-defined contiguous uniform distribution.
#define XPETRA_MONITOR(funcName)
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
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.
std::string description() const
Return a simple one-line description of this object.
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
LocalOrdinal getMinLocalIndex() const
The minimum local index.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.