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>
95 GlobalOrdinal indexBase,
100 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
106 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
112 GlobalOrdinal indexBase,
115 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
232 "Xpetra::EpetraMap only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
243#ifdef HAVE_XPETRA_TPETRA
247 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
251#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."
263#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
266 :
public virtual Map<int, int, EpetraNode>
288 std::string errPrefix;
289 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,indexBase,comm,lOrG): ";
292 const int myImageID = comm->getRank();
297 Teuchos::broadcast<int,global_size_t>(*comm,0,&rootNGE);
298 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
299 int localChecks[2], globalChecks[2];
302 if (numGlobalElements != rootNGE) {
303 localChecks[0] = myImageID;
306 else if (indexBase != rootIB) {
307 localChecks[0] = myImageID;
312 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
313 if (globalChecks[0] != -1) {
314 if (globalChecks[1] == 1) {
316 errPrefix <<
"numGlobal must be the same on all nodes (examine node " << globalChecks[0] <<
").");
318 else if (globalChecks[1] == 2) {
320 errPrefix <<
"indexBase must be the same on all nodes (examine node " << globalChecks[0] <<
").");
325 errPrefix <<
"logic error. Please contact the Tpetra team.");
339 using Teuchos::outArg;
347 std::string errPrefix;
348 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,numLocal,indexBase,platform): ";
351 const int myImageID = comm->getRank();
356 int localChecks[2], globalChecks[2];
364 Teuchos::reduceAll<int,global_size_t>(*comm,Teuchos::REDUCE_SUM,
365 Teuchos::as<global_size_t>(numLocalElements),outArg(global_sum));
372 if (numLocalElements < L1 && numLocalElements != L0) {
374 localChecks[0] = myImageID;
377 else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) {
379 localChecks[0] = myImageID;
382 else if (numGlobalElements != GSTI && numGlobalElements != global_sum) {
384 localChecks[0] = myImageID;
389 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
390 if (indexBase != rootIB) {
391 localChecks[0] = myImageID;
396 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
397 if (globalChecks[0] != -1) {
398 if (globalChecks[1] == 1) {
400 errPrefix <<
"numLocal is not valid on at least one node (possibly node "
401 << globalChecks[0] <<
").");
403 else if (globalChecks[1] == 2) {
405 errPrefix <<
"numGlobal is not valid on at least one node (possibly node "
406 << globalChecks[0] <<
").");
408 else if (globalChecks[1] == 3) {
410 errPrefix <<
"numGlobal doesn't match sum of numLocal (== "
411 << global_sum <<
") on at least one node (possibly node "
412 << globalChecks[0] <<
").");
414 else if (globalChecks[1] == 4) {
416 errPrefix <<
"indexBase is not the same on all nodes (examine node "
417 << globalChecks[0] <<
").");
422 errPrefix <<
"logic error. Please contact the Tpetra team.");
429 if (numGlobalElements == GSTI) {
430 numGlobalElements = global_sum;}
551 std::ostringstream oss;
579 int myImageID = comm_->getRank();
580 int numImages = comm_->getSize();
583 if (vl == VERB_DEFAULT) vl = VERB_LOW;
589 width = ::std::max<size_t>(width, (
size_t) 12) + 2;
593 if (vl == VERB_NONE) {
596 else if (vl == VERB_LOW) {
600 for (
int imageCtr = 0; imageCtr < numImages; ++imageCtr) {
601 if (myImageID == imageCtr) {
602 if (myImageID == 0) {
610 if (vl == VERB_HIGH || vl == VERB_EXTREME) {
611 out <<
"Number of Local Elements = " << nME << endl
616 if (vl == VERB_EXTREME) {
617 out << std::setw(width) <<
"Node ID"
618 << std::setw(width) <<
"Local Index"
619 << std::setw(width) <<
"Global Index"
621 for (
size_t i=0; i < nME; i++) {
622 out << std::setw(width) << myImageID
623 << std::setw(width) << i
624 << std::setw(width) << myEntries[i]
647 return Teuchos::null;
657 throw std::runtime_error(
"Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
668 if (gid ==
map_->IndexBase64()-1)
return (-1);
694#ifdef HAVE_XPETRA_TPETRA
698 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
705#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."
716#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
719 :
public virtual Map<int, long long, EpetraNode>
741 std::string errPrefix;
742 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,indexBase,comm,lOrG): ";
745 const int myImageID = comm->getRank();
750 Teuchos::broadcast<int,global_size_t>(*comm,0,&rootNGE);
751 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
752 int localChecks[2], globalChecks[2];
755 if (numGlobalElements != rootNGE) {
756 localChecks[0] = myImageID;
759 else if (indexBase != rootIB) {
760 localChecks[0] = myImageID;
765 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
766 if (globalChecks[0] != -1) {
767 if (globalChecks[1] == 1) {
769 errPrefix <<
"numGlobal must be the same on all nodes (examine node " << globalChecks[0] <<
").");
771 else if (globalChecks[1] == 2) {
773 errPrefix <<
"indexBase must be the same on all nodes (examine node " << globalChecks[0] <<
").");
778 errPrefix <<
"logic error. Please contact the Tpetra team.");
791 using Teuchos::outArg;
799 std::string errPrefix;
800 errPrefix =
Teuchos::typeName(*
this) +
"::constructor(numGlobal,numLocal,indexBase,platform): ";
803 const int myImageID = comm->getRank();
808 int localChecks[2], globalChecks[2];
816 Teuchos::reduceAll<int,global_size_t>(*comm,Teuchos::REDUCE_SUM,
817 Teuchos::as<global_size_t>(numLocalElements),outArg(global_sum));
824 if (numLocalElements < L1 && numLocalElements != L0) {
826 localChecks[0] = myImageID;
829 else if (numGlobalElements < GST1 && numGlobalElements != GST0 && numGlobalElements != GSTI) {
831 localChecks[0] = myImageID;
834 else if (numGlobalElements != GSTI && numGlobalElements != global_sum) {
836 localChecks[0] = myImageID;
841 Teuchos::broadcast<int,GlobalOrdinal>(*comm,0,&rootIB);
842 if (indexBase != rootIB) {
843 localChecks[0] = myImageID;
848 Teuchos::reduceAll<int,int>(*comm,Teuchos::REDUCE_MAX,2,localChecks,globalChecks);
849 if (globalChecks[0] != -1) {
850 if (globalChecks[1] == 1) {
852 errPrefix <<
"numLocal is not valid on at least one node (possibly node "
853 << globalChecks[0] <<
").");
855 else if (globalChecks[1] == 2) {
857 errPrefix <<
"numGlobal is not valid on at least one node (possibly node "
858 << globalChecks[0] <<
").");
860 else if (globalChecks[1] == 3) {
862 errPrefix <<
"numGlobal doesn't match sum of numLocal (== "
863 << global_sum <<
") on at least one node (possibly node "
864 << globalChecks[0] <<
").");
866 else if (globalChecks[1] == 4) {
868 errPrefix <<
"indexBase is not the same on all nodes (examine node "
869 << globalChecks[0] <<
").");
874 errPrefix <<
"logic error. Please contact the Tpetra team.");
881 if (numGlobalElements == GSTI) {
882 numGlobalElements = global_sum;}
985 std::ostringstream oss;
1013 int myImageID = comm_->getRank();
1014 int numImages = comm_->getSize();
1017 if (vl == VERB_DEFAULT) vl = VERB_LOW;
1023 width = ::std::max<size_t>(width, (
size_t) 12) + 2;
1027 if (vl == VERB_NONE) {
1030 else if (vl == VERB_LOW) {
1034 for (
int imageCtr = 0; imageCtr < numImages; ++imageCtr) {
1035 if (myImageID == imageCtr) {
1036 if (myImageID == 0) {
1044 if (vl == VERB_HIGH || vl == VERB_EXTREME) {
1045 out <<
"Number of Local Elements = " << nME << endl
1050 if (vl == VERB_EXTREME) {
1051 out << std::setw(width) <<
"Node ID"
1052 << std::setw(width) <<
"Local Index"
1053 << std::setw(width) <<
"Global Index"
1055 for (
size_t i=0; i < nME; i++) {
1056 out << std::setw(width) << myImageID
1057 << std::setw(width) << i
1058 << std::setw(width) << myEntries[i]
1081 return Teuchos::null;
1091 throw std::runtime_error(
"Xpetra::EpetraMapT::replaceCommWithSubset has not yet been implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
1102 if (gid ==
map_->IndexBase64()-1)
return (-1);
1126#ifdef HAVE_XPETRA_TPETRA
1130 throw std::runtime_error(
"Xpetra::EpetraMap::getLocalMap is not implemented in "+std::string(__FILE__)+
":"+std::to_string(__LINE__));
1137#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.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
size_t getLocalNumElements() 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.
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.
const Epetra_Map & getEpetra_Map() const
const Epetra_BlockMap & getEpetra_BlockMap() const
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
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.
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...
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.
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this process.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
std::string description() const
Return a simple one-line description of this object.
const RCP< const Epetra_Map > getEpetra_MapRCP() const
Get the underlying Epetra map.
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.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process ranks for the given global indices.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
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.
size_t getLocalNumElements() const
The number of elements belonging to the calling process.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
GlobalOrdinal getIndexBase() const
The index base for this Map.
RCP< const Map< int, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
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.
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.
const Epetra_BlockMap & getEpetra_BlockMap() const
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.
const RCP< const Epetra_Map > & getEpetra_MapRCP() const
Get the underlying Epetra map.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
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.
const Epetra_Map & getEpetra_Map() const
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this process.
UnderlyingLib lib() const
Get the library used by this object (Epetra or Epetra?)
RCP< const Map< int, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &) const
Replace this Map's communicator with a subset communicator.
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.
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.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
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.
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.
const Epetra_BlockMap & getEpetra_BlockMap() const
bool isNodeGlobalElement(GlobalOrdinal) const
Whether the given global index is valid for this Map on this process.
virtual ~EpetraMapT()
Destructor.
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.
size_t getLocalNumElements() const
The number of elements belonging to the calling process.
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.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
const Epetra_Map & getEpetra_Map() const
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.
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this 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.
const RCP< const Epetra_Map > & getEpetra_MapRCP() const
Get the underlying Epetra map.
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.
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 getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
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.
GlobalOrdinal global_ordinal_type
Exception throws to report errors in the internal logical of the program.
Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
std::string typeName(const T &t)
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)