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)
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)
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)
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
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)
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;
357 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
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)
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];
415 Teuchos::reduceAll<int,global_size_t>(*comm,Teuchos::REDUCE_SUM,
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;
447 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
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)
601 #ifdef 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."
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)
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;
845 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
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)
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];
902 Teuchos::reduceAll<int,global_size_t>(*comm,Teuchos::REDUCE_SUM,
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;
934 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
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)
1070 #ifdef 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."
#define XPETRA_MONITOR(funcName)
#define IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG(sourceCode)
static const EVerbosityLevel verbLevel_default
virtual std::string description() const
bool isNodeLocalElement(LocalOrdinal localIndex) const
Whether the given local index is valid for this Map on this process.
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 Teuchos::FancyOStream.
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.
GlobalOrdinal global_ordinal_type
GlobalOrdinal getIndexBase() const
The index base for this Map.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
const Epetra_Map & getEpetra_Map() const
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
size_t getNodeNumElements() const
The number of elements belonging to the calling process.
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.
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...
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
LocalOrdinal local_ordinal_type
RCP< const Epetra_BlockMap > map_
EpetraMapT(const Teuchos::RCP< const Epetra_BlockMap > &map)
EpetraMapT constructor to wrap a Epetra_Map object.
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 getMinGlobalIndex() const
The minimum global index owned by the calling process.
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.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
std::string description() const
Return a simple one-line description of this object.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
Whether the given global index is valid for this Map on this process.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
const Epetra_BlockMap & getEpetra_BlockMap() const
Get the underlying Epetra map.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process ranks for the given global indices.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this process.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
virtual ~EpetraMapT()
Destructor.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
GlobalOrdinal getIndexBase() const
The index base for 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(const Teuchos::RCP< const Epetra_BlockMap > &map)
EpetraMapT constructor to wrap a Epetra_Map object.
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
const Epetra_BlockMap & getEpetra_BlockMap() const
Get the underlying Epetra map.
bool isNodeLocalElement(LocalOrdinal localIndex) const
Whether the given local index is valid for this Map on this process.
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 local_ordinal_type
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process ranks for the given global indices.
RCP< const Epetra_BlockMap > map_
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.
size_t getNodeNumElements() const
The number of elements belonging to the calling process.
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
Whether the given global index is valid for this Map on this process.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this process.
virtual ~EpetraMapT()
Destructor.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
GlobalOrdinal global_ordinal_type
std::string description() const
Return a simple one-line description of this object.
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.
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.
const Epetra_Map & getEpetra_Map() const
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.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
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...
LocalOrdinal getMinLocalIndex() const
The minimum local index.
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 isContiguous() const
True if this Map is distributed contiguously, else false.
const Epetra_Map & getEpetra_Map() const
const Epetra_BlockMap & getEpetra_BlockMap() const
Get the underlying Epetra map.
LocalOrdinal getLocalElement(GlobalOrdinal) const
The local index corresponding to the given global index.
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.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &) const
True if and only if map is compatible with this Map.
bool isNodeGlobalElement(GlobalOrdinal) const
Whether the given global index is valid for this Map on this process.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this process.
virtual ~EpetraMapT()
Destructor.
size_t getNodeNumElements() const
The number of elements belonging to the calling process.
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
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.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &) const
Return the process ranks for the given global indices.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &) const
True if and only if map is identical to this Map.
std::string description() const
Return a simple one-line description of this object.
RCP< const Epetra_BlockMap > map_
bool isNodeLocalElement(LocalOrdinal) const
Whether the given local index is valid for this Map on this process.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
EpetraMapT(const Teuchos::RCP< const Epetra_BlockMap > &map)
EpetraMapT constructor to wrap a Epetra_Map object.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum 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.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
GlobalOrdinal getIndexBase() const
The index base for this Map.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
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.
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
GlobalOrdinal global_ordinal_type
Exception throws to report errors in the internal logical of the program.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
std::string typeName(const T &t)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
size_t global_size_t
Global size_t object.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)