46 #ifndef XPETRA_EPETRAMAP_HPP
47 #define XPETRA_EPETRAMAP_HPP
54 #include <Epetra_Map.h>
55 #include <Epetra_BlockMap.h>
66 template<
class GlobalOrdinal,
class Node>
68 template<
class GlobalOrdinal,
class Node>
72 template<
class GlobalOrdinal,
class Node>
76 template<
class GlobalOrdinal,
class Node>
78 :
public virtual Map<int, GlobalOrdinal, Node>
91 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
94 GlobalOrdinal indexBase,
98 : EpetraMapT(numGlobalElements, indexBase, comm, lg)
100 #endif // TPETRA_ENABLE_DEPRECATED_CODE
102 GlobalOrdinal indexBase,
107 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
111 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
114 : EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)
116 #endif // TPETRA_ENABLE_DEPRECATED_CODE
119 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
123 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
127 GlobalOrdinal indexBase,
130 : EpetraMapT(numGlobalElements, elementList, indexBase, comm)
132 #endif // TPETRA_ENABLE_DEPRECATED_CODE
135 GlobalOrdinal indexBase,
138 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
217 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
223 #endif // TPETRA_ENABLE_DEPRECATED_CODE
262 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
273 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
274 #ifdef HAVE_XPETRA_TPETRA
277 local_map_type getLocalMap ()
const {
278 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented.");
282 #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."
295 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
298 :
public virtual Map<int, int, EpetraNode>
313 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
320 : EpetraMapT(numGlobalElements, indexBase, comm, lg)
322 #endif // TPETRA_ENABLE_DEPRECATED_CODE
330 std::string errPrefix;
331 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,indexBase,comm,lOrG): ";
334 const int myImageID = comm->getRank();
339 Teuchos::broadcast<int,global_size_t>(*comm,0,&rootNGE);
340 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
341 int localChecks[2], globalChecks[2];
344 if (numGlobalElements != rootNGE) {
345 localChecks[0] = myImageID;
348 else if (indexBase != rootIB) {
349 localChecks[0] = myImageID;
355 if (globalChecks[0] != -1) {
356 if (globalChecks[1] == 1) {
358 errPrefix <<
"numGlobal must be the same on all nodes (examine node " << globalChecks[0] <<
").");
360 else if (globalChecks[1] == 2) {
362 errPrefix <<
"indexBase must be the same on all nodes (examine node " << globalChecks[0] <<
").");
367 errPrefix <<
"logic error. Please contact the Tpetra team.");
378 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
381 : EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)
383 #endif // TPETRA_ENABLE_DEPRECATED_CODE
387 using Teuchos::outArg;
395 std::string errPrefix;
396 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,numLocal,indexBase,platform): ";
399 const int myImageID = comm->getRank();
404 int localChecks[2], globalChecks[2];
413 Teuchos::as<global_size_t>(numLocalElements),outArg(global_sum));
420 if (numLocalElements < L1 && numLocalElements != L0) {
422 localChecks[0] = myImageID;
425 else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) {
427 localChecks[0] = myImageID;
430 else if (numGlobalElements != GSTI && numGlobalElements != global_sum) {
432 localChecks[0] = myImageID;
437 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
438 if (indexBase != rootIB) {
439 localChecks[0] = myImageID;
445 if (globalChecks[0] != -1) {
446 if (globalChecks[1] == 1) {
448 errPrefix <<
"numLocal is not valid on at least one node (possibly node "
449 << globalChecks[0] <<
").");
451 else if (globalChecks[1] == 2) {
453 errPrefix <<
"numGlobal is not valid on at least one node (possibly node "
454 << globalChecks[0] <<
").");
456 else if (globalChecks[1] == 3) {
458 errPrefix <<
"numGlobal doesn't match sum of numLocal (== "
459 << global_sum <<
") on at least one node (possibly node "
460 << globalChecks[0] <<
").");
462 else if (globalChecks[1] == 4) {
464 errPrefix <<
"indexBase is not the same on all nodes (examine node "
465 << globalChecks[0] <<
").");
470 errPrefix <<
"logic error. Please contact the Tpetra team.");
477 if (numGlobalElements == GSTI) {
478 numGlobalElements = global_sum;}
484 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
488 GlobalOrdinal indexBase,
491 : EpetraMapT(numGlobalElements, elementList, indexBase, comm)
493 #endif // TPETRA_ENABLE_DEPRECATED_CODE
580 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
586 #endif // TPETRA_ENABLE_DEPRECATED_CODE
598 std::ostringstream oss;
626 int myImageID = comm_->getRank();
627 int numImages = comm_->getSize();
636 width = ::std::max<size_t>(width, (size_t) 12) + 2;
647 for (
int imageCtr = 0; imageCtr < numImages; ++imageCtr) {
648 if (myImageID == imageCtr) {
649 if (myImageID == 0) {
658 out <<
"Number of Local Elements = " << nME << endl
664 out << std::setw(width) <<
"Node ID"
665 << std::setw(width) <<
"Local Index"
666 << std::setw(width) <<
"Global Index"
668 for (
size_t i=0; i < nME; i++) {
669 out << std::setw(width) << myImageID
670 << std::setw(width) << i
671 << std::setw(width) << myEntries[i]
694 return Teuchos::null;
704 throw std::runtime_error(
"Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented.");
715 if (gid ==
map_->IndexBase64()-1)
return (-1);
741 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
742 #ifdef HAVE_XPETRA_TPETRA
745 local_map_type getLocalMap ()
const {
746 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented.");
750 mutable local_map_type localMap_;
753 #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."
762 #endif // #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
765 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
768 :
public virtual Map<int, long long, EpetraNode>
783 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
790 : EpetraMapT(numGlobalElements, indexBase, comm, lg)
792 #endif // TPETRA_ENABLE_DEPRECATED_CODE
800 std::string errPrefix;
801 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,indexBase,comm,lOrG): ";
804 const int myImageID = comm->getRank();
809 Teuchos::broadcast<int,global_size_t>(*comm,0,&rootNGE);
810 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
811 int localChecks[2], globalChecks[2];
814 if (numGlobalElements != rootNGE) {
815 localChecks[0] = myImageID;
818 else if (indexBase != rootIB) {
819 localChecks[0] = myImageID;
825 if (globalChecks[0] != -1) {
826 if (globalChecks[1] == 1) {
828 errPrefix <<
"numGlobal must be the same on all nodes (examine node " << globalChecks[0] <<
").");
830 else if (globalChecks[1] == 2) {
832 errPrefix <<
"indexBase must be the same on all nodes (examine node " << globalChecks[0] <<
").");
837 errPrefix <<
"logic error. Please contact the Tpetra team.");
848 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
851 : EpetraMapT(numGlobalElements, numLocalElements, indexBase, comm)
853 #endif // TPETRA_ENABLE_DEPRECATED_CODE
856 using Teuchos::outArg;
864 std::string errPrefix;
865 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,numLocal,indexBase,platform): ";
868 const int myImageID = comm->getRank();
873 int localChecks[2], globalChecks[2];
882 Teuchos::as<global_size_t>(numLocalElements),outArg(global_sum));
889 if (numLocalElements < L1 && numLocalElements != L0) {
891 localChecks[0] = myImageID;
894 else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) {
896 localChecks[0] = myImageID;
899 else if (numGlobalElements != GSTI && numGlobalElements != global_sum) {
901 localChecks[0] = myImageID;
906 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
907 if (indexBase != rootIB) {
908 localChecks[0] = myImageID;
914 if (globalChecks[0] != -1) {
915 if (globalChecks[1] == 1) {
917 errPrefix <<
"numLocal is not valid on at least one node (possibly node "
918 << globalChecks[0] <<
").");
920 else if (globalChecks[1] == 2) {
922 errPrefix <<
"numGlobal is not valid on at least one node (possibly node "
923 << globalChecks[0] <<
").");
925 else if (globalChecks[1] == 3) {
927 errPrefix <<
"numGlobal doesn't match sum of numLocal (== "
928 << global_sum <<
") on at least one node (possibly node "
929 << globalChecks[0] <<
").");
931 else if (globalChecks[1] == 4) {
933 errPrefix <<
"indexBase is not the same on all nodes (examine node "
934 << globalChecks[0] <<
").");
939 errPrefix <<
"logic error. Please contact the Tpetra team.");
946 if (numGlobalElements == GSTI) {
947 numGlobalElements = global_sum;}
953 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
957 GlobalOrdinal indexBase,
960 : EpetraMapT(numGlobalElements, elementList, indexBase, comm)
962 #endif // TPETRA_ENABLE_DEPRECATED_CODE
1049 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
1055 #endif // TPETRA_ENABLE_DEPRECATED_CODE
1067 std::ostringstream oss;
1095 int myImageID = comm_->getRank();
1096 int numImages = comm_->getSize();
1105 width = ::std::max<size_t>(width, (size_t) 12) + 2;
1116 for (
int imageCtr = 0; imageCtr < numImages; ++imageCtr) {
1117 if (myImageID == imageCtr) {
1118 if (myImageID == 0) {
1127 out <<
"Number of Local Elements = " << nME << endl
1133 out << std::setw(width) <<
"Node ID"
1134 << std::setw(width) <<
"Local Index"
1135 << std::setw(width) <<
"Global Index"
1137 for (
size_t i=0; i < nME; i++) {
1138 out << std::setw(width) << myImageID
1139 << std::setw(width) << i
1140 << std::setw(width) << myEntries[i]
1163 return Teuchos::null;
1173 throw std::runtime_error(
"Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented.");
1184 if (gid ==
map_->IndexBase64()-1)
return (-1);
1208 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1209 #ifdef HAVE_XPETRA_TPETRA
1212 local_map_type getLocalMap ()
const {
1213 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented.");
1217 mutable local_map_type localMap_;
1220 #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."
1231 #endif // #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
1235 #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