46 #ifndef XPETRA_EPETRAMAP_HPP
47 #define XPETRA_EPETRAMAP_HPP
52 #include "Xpetra_Map.hpp"
54 #include <Epetra_Map.h>
55 #include <Epetra_BlockMap.h>
66 template<
class GlobalOrdinal,
class Node>
69 template<
class GlobalOrdinal,
class Node>
75 template<
class GlobalOrdinal,
class Node>
79 template<
class GlobalOrdinal,
class Node>
81 :
public virtual Map<int, GlobalOrdinal, Node>
94 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
97 GlobalOrdinal indexBase,
101 : EpetraMapT(numGlobalElements, indexBase, comm, lg)
103 #endif // TPETRA_ENABLE_DEPRECATED_CODE
105 GlobalOrdinal indexBase,
110 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
114 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
117 : EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)
119 #endif // TPETRA_ENABLE_DEPRECATED_CODE
122 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
126 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
130 GlobalOrdinal indexBase,
133 : EpetraMapT(numGlobalElements, elementList, indexBase, comm)
135 #endif // TPETRA_ENABLE_DEPRECATED_CODE
138 GlobalOrdinal indexBase,
141 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
220 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
226 #endif // TPETRA_ENABLE_DEPRECATED_CODE
265 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
276 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
277 #ifdef HAVE_XPETRA_TPETRA
280 local_map_type getLocalMap ()
const {
281 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented.");
285 #warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
298 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
301 :
public virtual Map<int, int, EpetraNode>
316 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
323 : EpetraMapT(numGlobalElements, indexBase, comm, lg)
325 #endif // TPETRA_ENABLE_DEPRECATED_CODE
333 std::string errPrefix;
334 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,indexBase,comm,lOrG): ";
337 const int myImageID = comm->getRank();
342 Teuchos::broadcast<int,global_size_t>(*comm,0,&rootNGE);
343 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
344 int localChecks[2], globalChecks[2];
347 if (numGlobalElements != rootNGE) {
348 localChecks[0] = myImageID;
351 else if (indexBase != rootIB) {
352 localChecks[0] = myImageID;
358 if (globalChecks[0] != -1) {
359 if (globalChecks[1] == 1) {
361 errPrefix <<
"numGlobal must be the same on all nodes (examine node " << globalChecks[0] <<
").");
363 else if (globalChecks[1] == 2) {
365 errPrefix <<
"indexBase must be the same on all nodes (examine node " << globalChecks[0] <<
").");
370 errPrefix <<
"logic error. Please contact the Tpetra team.");
381 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
384 : EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)
386 #endif // TPETRA_ENABLE_DEPRECATED_CODE
390 using Teuchos::outArg;
398 std::string errPrefix;
399 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,numLocal,indexBase,platform): ";
402 const int myImageID = comm->getRank();
407 int localChecks[2], globalChecks[2];
416 Teuchos::as<global_size_t>(numLocalElements),outArg(global_sum));
423 if (numLocalElements < L1 && numLocalElements != L0) {
425 localChecks[0] = myImageID;
428 else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) {
430 localChecks[0] = myImageID;
433 else if (numGlobalElements != GSTI && numGlobalElements != global_sum) {
435 localChecks[0] = myImageID;
440 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
441 if (indexBase != rootIB) {
442 localChecks[0] = myImageID;
448 if (globalChecks[0] != -1) {
449 if (globalChecks[1] == 1) {
451 errPrefix <<
"numLocal is not valid on at least one node (possibly node "
452 << globalChecks[0] <<
").");
454 else if (globalChecks[1] == 2) {
456 errPrefix <<
"numGlobal is not valid on at least one node (possibly node "
457 << globalChecks[0] <<
").");
459 else if (globalChecks[1] == 3) {
461 errPrefix <<
"numGlobal doesn't match sum of numLocal (== "
462 << global_sum <<
") on at least one node (possibly node "
463 << globalChecks[0] <<
").");
465 else if (globalChecks[1] == 4) {
467 errPrefix <<
"indexBase is not the same on all nodes (examine node "
468 << globalChecks[0] <<
").");
473 errPrefix <<
"logic error. Please contact the Tpetra team.");
480 if (numGlobalElements == GSTI) {
481 numGlobalElements = global_sum;}
487 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
491 GlobalOrdinal indexBase,
494 : EpetraMapT(numGlobalElements, elementList, indexBase, comm)
496 #endif // TPETRA_ENABLE_DEPRECATED_CODE
601 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
607 #endif // TPETRA_ENABLE_DEPRECATED_CODE
619 std::ostringstream oss;
647 int myImageID = comm_->getRank();
648 int numImages = comm_->getSize();
657 width = ::std::max<size_t>(width, (size_t) 12) + 2;
668 for (
int imageCtr = 0; imageCtr < numImages; ++imageCtr) {
669 if (myImageID == imageCtr) {
670 if (myImageID == 0) {
679 out <<
"Number of Local Elements = " << nME << endl
685 out << std::setw(width) <<
"Node ID"
686 << std::setw(width) <<
"Local Index"
687 << std::setw(width) <<
"Global Index"
689 for (
size_t i=0; i < nME; i++) {
690 out << std::setw(width) << myImageID
691 << std::setw(width) << i
692 << std::setw(width) << myEntries[i]
715 return Teuchos::null;
725 throw std::runtime_error(
"Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented.");
736 if (gid ==
map_->IndexBase64()-1)
return (-1);
762 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
763 #ifdef HAVE_XPETRA_TPETRA
766 local_map_type getLocalMap ()
const {
767 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented.");
771 mutable local_map_type localMap_;
774 #warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
783 #endif // #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
786 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
789 :
public virtual Map<int, long long, EpetraNode>
804 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
811 : EpetraMapT(numGlobalElements, indexBase, comm, lg)
813 #endif // TPETRA_ENABLE_DEPRECATED_CODE
821 std::string errPrefix;
822 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,indexBase,comm,lOrG): ";
825 const int myImageID = comm->getRank();
830 Teuchos::broadcast<int,global_size_t>(*comm,0,&rootNGE);
831 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
832 int localChecks[2], globalChecks[2];
835 if (numGlobalElements != rootNGE) {
836 localChecks[0] = myImageID;
839 else if (indexBase != rootIB) {
840 localChecks[0] = myImageID;
846 if (globalChecks[0] != -1) {
847 if (globalChecks[1] == 1) {
849 errPrefix <<
"numGlobal must be the same on all nodes (examine node " << globalChecks[0] <<
").");
851 else if (globalChecks[1] == 2) {
853 errPrefix <<
"indexBase must be the same on all nodes (examine node " << globalChecks[0] <<
").");
858 errPrefix <<
"logic error. Please contact the Tpetra team.");
869 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
872 : EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)
874 #endif // TPETRA_ENABLE_DEPRECATED_CODE
877 using Teuchos::outArg;
885 std::string errPrefix;
886 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,numLocal,indexBase,platform): ";
889 const int myImageID = comm->getRank();
894 int localChecks[2], globalChecks[2];
903 Teuchos::as<global_size_t>(numLocalElements),outArg(global_sum));
910 if (numLocalElements < L1 && numLocalElements != L0) {
912 localChecks[0] = myImageID;
915 else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) {
917 localChecks[0] = myImageID;
920 else if (numGlobalElements != GSTI && numGlobalElements != global_sum) {
922 localChecks[0] = myImageID;
927 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
928 if (indexBase != rootIB) {
929 localChecks[0] = myImageID;
935 if (globalChecks[0] != -1) {
936 if (globalChecks[1] == 1) {
938 errPrefix <<
"numLocal is not valid on at least one node (possibly node "
939 << globalChecks[0] <<
").");
941 else if (globalChecks[1] == 2) {
943 errPrefix <<
"numGlobal is not valid on at least one node (possibly node "
944 << globalChecks[0] <<
").");
946 else if (globalChecks[1] == 3) {
948 errPrefix <<
"numGlobal doesn't match sum of numLocal (== "
949 << global_sum <<
") on at least one node (possibly node "
950 << globalChecks[0] <<
").");
952 else if (globalChecks[1] == 4) {
954 errPrefix <<
"indexBase is not the same on all nodes (examine node "
955 << globalChecks[0] <<
").");
960 errPrefix <<
"logic error. Please contact the Tpetra team.");
967 if (numGlobalElements == GSTI) {
968 numGlobalElements = global_sum;}
974 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
978 GlobalOrdinal indexBase,
981 : EpetraMapT(numGlobalElements, elementList, indexBase, comm)
983 #endif // TPETRA_ENABLE_DEPRECATED_CODE
1070 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
1076 #endif // TPETRA_ENABLE_DEPRECATED_CODE
1088 std::ostringstream oss;
1116 int myImageID = comm_->getRank();
1117 int numImages = comm_->getSize();
1126 width = ::std::max<size_t>(width, (size_t) 12) + 2;
1137 for (
int imageCtr = 0; imageCtr < numImages; ++imageCtr) {
1138 if (myImageID == imageCtr) {
1139 if (myImageID == 0) {
1148 out <<
"Number of Local Elements = " << nME << endl
1154 out << std::setw(width) <<
"Node ID"
1155 << std::setw(width) <<
"Local Index"
1156 << std::setw(width) <<
"Global Index"
1158 for (
size_t i=0; i < nME; i++) {
1159 out << std::setw(width) << myImageID
1160 << std::setw(width) << i
1161 << std::setw(width) << myEntries[i]
1184 return Teuchos::null;
1194 throw std::runtime_error(
"Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented.");
1205 if (gid ==
map_->IndexBase64()-1)
return (-1);
1229 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1230 #ifdef HAVE_XPETRA_TPETRA
1233 local_map_type getLocalMap ()
const {
1234 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented.");
1238 mutable local_map_type localMap_;
1241 #warning "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
1252 #endif // #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
1256 #endif // XPETRA_EPETRAMAP_HPP
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
bool PointSameAs(const Epetra_BlockMap &Map) const
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process ranks for the given global indices.
GlobalOrdinal global_ordinal_type
virtual ~EpetraMapT()
Destructor.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this process.
bool DistributedGlobal() const
GlobalOrdinal getIndexBase() const
The index base for this Map.
size_t getNodeNumElements() const
The number of elements belonging to the calling process.
size_t getNodeNumElements() const
The number of elements belonging to the calling process.
GlobalOrdinal getIndexBase() const
The index base for this Map.
std::string description() const
Return a simple one-line description of this object.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
size_t getNodeNumElements() const
The number of elements belonging to 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 Teuchos::FancyOStream.
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
Whether the given global index is valid for this Map on this process.
GlobalOrdinal global_ordinal_type
LocalOrdinal local_ordinal_type
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
const Epetra_BlockMap & getEpetra_BlockMap() const
Get the underlying Epetra map.
bool SameAs(const Epetra_BlockMap &Map) const
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
int MyGlobalElements(int *MyGlobalElementList) const
EpetraMapT(const Teuchos::RCP< const Epetra_BlockMap > &map)
EpetraMapT constructor to wrap a Epetra_Map object.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
std::string description() const
Return a simple one-line description of this object.
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
GlobalOrdinal getIndexBase() const
The index base for this Map.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
bool isContiguous() const
True if this Map is distributed contiguously, else false.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
const Epetra_BlockMap & getEpetra_BlockMap() const
Get the underlying Epetra map.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
Exception throws to report errors in the internal logical of the program.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
const Epetra_Map & getEpetra_Map() const
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
bool isNodeGlobalElement(GlobalOrdinal) const
Whether the given global index is valid for this Map on this process.
EpetraMapT(const Teuchos::RCP< const Epetra_BlockMap > &map)
EpetraMapT constructor to wrap a Epetra_Map object.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
Whether the given global index is valid for this Map on this process.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process ranks for the given global indices.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Return the process ranks and corresponding local indices for the given global indices.
void describe(Teuchos::FancyOStream &, const Teuchos::EVerbosityLevel=Teuchos::Describable::verbLevel_default) const
Print this object with the given verbosity level to the given Teuchos::FancyOStream.
EpetraMapT(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this process.
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
bool isNodeLocalElement(LocalOrdinal localIndex) const
Whether the given local index is valid for this Map on this 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 Teuchos::FancyOStream.
int NumMyElements() const
EpetraMapT(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &) const
True if and only if map is identical to this Map.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
EpetraMapT(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with a user-defined contiguous distribution.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
bool isNodeLocalElement(LocalOrdinal localIndex) const
Whether the given local index is valid for this Map on this process.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Return the process ranks and corresponding local indices for the given global indices.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this process.
const Epetra_Map & getEpetra_Map() const
RCP< const Epetra_BlockMap > map_
#define IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG(sourceCode)
virtual std::string description() const
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
EpetraMapT(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
const Epetra_BlockMap & getEpetra_BlockMap() const
Get the underlying Epetra map.
virtual ~EpetraMapT()
Destructor.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
Return the global index for a given local index. Note that this returns -1 if not found on this proce...
bool MyGID(int GID_in) const
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &, const Teuchos::ArrayView< LocalOrdinal > &) const
Return the process ranks and corresponding local indices for the given global indices.
const Epetra_Comm & Comm() const
RCP< const Epetra_BlockMap > map_
size_t global_size_t
Global size_t object.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
static const EVerbosityLevel verbLevel_default
EpetraMapT(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with a user-defined contiguous distribution.
RCP< const Epetra_BlockMap > map_
global_size_t getGlobalNumElements() const
The number of elements in this Map.
EpetraMapT(const Teuchos::RCP< const Epetra_BlockMap > &map)
EpetraMapT constructor to wrap a Epetra_Map object.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
Return the global index for a given local index. Note that this returns -1 if not found on this proce...
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
const Epetra_Map & getEpetra_Map() const
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
GlobalOrdinal global_ordinal_type
virtual ~EpetraMapT()
Destructor.
LocalOrdinal local_ordinal_type
bool isNodeLocalElement(LocalOrdinal) const
Whether the given local index is valid for this Map on this process.
LocalOrdinal getLocalElement(GlobalOrdinal) const
The local index corresponding to the given global index.
#define XPETRA_MONITOR(funcName)
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
bool MyLID(int lid) const
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
EpetraMapT(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
EpetraMapT(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
GlobalOrdinal getGlobalElement(LocalOrdinal) const
Return the global index for a given local index. Note that this returns -1 if not found on this proce...
EpetraMapT(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with a user-defined contiguous distribution.
EpetraMapT(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &) const
True if and only if map is compatible with this Map.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &) const
Return the process ranks for the given global indices.
std::string typeName(const T &t)
Epetra_BlockMap * RemoveEmptyProcesses() const
std::string description() const
Return a simple one-line description of this object.
int RemoteIDList(int NumIDs, const int *GIDList, int *PIDList, int *LIDList) const