All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Private Types | List of all members
Xpetra::EpetraMap Class Reference

#include <Xpetra_EpetraMap.hpp>

Inheritance diagram for Xpetra::EpetraMap:
Xpetra::Map< int, int > Teuchos::Describable Teuchos::LabeledObject Xpetra::StridedEpetraMap

Public Member Functions

GlobalOrdinal getGlobalElement (LocalOrdinal localIndex) const
 Return the global index for a given local index. Note that this returns -1 if not found on this processor. (This is different than Epetra's behavior!) More...
 
- Public Member Functions inherited from Xpetra::Map< int, int >
virtual ~Map ()
 Destructor. More...
 
- Public Member Functions inherited from Teuchos::Describable
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 

Protected Attributes

RCP< const Epetra_BlockMap > map_
 

Private Types

typedef int LocalOrdinal
 
typedef int GlobalOrdinal
 
typedef
Kokkos::DefaultNode::DefaultNodeType 
Node
 

Constructors and destructor

 EpetraMap (global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Kokkos::DefaultNode::getDefaultNode())
 Constructor with Tpetra-defined contiguous uniform distribution. More...
 
 EpetraMap (global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Kokkos::DefaultNode::getDefaultNode())
 Constructor with a user-defined contiguous distribution. More...
 
 EpetraMap (global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Kokkos::DefaultNode::getDefaultNode())
 Constructor with user-defined arbitrary (possibly noncontiguous) distribution. More...
 

Attributes

global_size_t getGlobalNumElements () const
 The number of elements in this Map. More...
 
size_t getNodeNumElements () const
 The number of elements belonging to the calling node. More...
 
GlobalOrdinal getIndexBase () const
 The index base for this Map. More...
 
LocalOrdinal getMinLocalIndex () const
 The minimum local index. More...
 
LocalOrdinal getMaxLocalIndex () const
 The maximum local index on the calling process. More...
 
GlobalOrdinal getMinGlobalIndex () const
 The minimum global index owned by the calling process. More...
 
GlobalOrdinal getMaxGlobalIndex () const
 The maximum global index owned by the calling process. More...
 
GlobalOrdinal getMinAllGlobalIndex () const
 The minimum global index over all processes in the communicator. More...
 
GlobalOrdinal getMaxAllGlobalIndex () const
 The maximum global index over all processes in the communicator. More...
 
LocalOrdinal getLocalElement (GlobalOrdinal globalIndex) const
 The local index corresponding to the given global index. More...
 
LookupStatus getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
 Return the process IDs and corresponding local IDs for the given global IDs. More...
 
LookupStatus getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
 Return the process IDs for the given global IDs. More...
 
Teuchos::ArrayView< const
GlobalOrdinal > 
getNodeElementList () const
 Return a view of the global indices owned by this node. More...
 

Boolean tests

bool isNodeLocalElement (LocalOrdinal localIndex) const
 True if the local index is valid for this Map on this node, else false. More...
 
bool isNodeGlobalElement (GlobalOrdinal globalIndex) const
 True if the global index is found in this Map on this node, else false. More...
 
bool isContiguous () const
 True if this Map is distributed contiguously, else false. More...
 
bool isDistributed () const
 Whether this Map is globally distributed or locally replicated. More...
 
bool isCompatible (const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
 True if and only if map is compatible with this Map. More...
 
bool isSameAs (const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
 True if and only if map is identical to this Map. More...
 
const Teuchos::RCP< const
Teuchos::Comm< int > > 
getComm () const
 Get this Map's Comm object. More...
 
const Teuchos::RCP< Node > getNode () const
 Get this Map's Node object. More...
 
RCP< const Map< LocalOrdinal,
GlobalOrdinal, Node > > 
removeEmptyProcesses () const
 
RCP< const Map< LocalOrdinal,
GlobalOrdinal, Node > > 
replaceCommWithSubset (const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
 
std::string description () const
 Return a simple one-line description of this object. More...
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print this object with the given verbosity level to the given FancyOStream. More...
 

Xpetra specific

virtual ~EpetraMap ()
 Destructor. More...
 
 EpetraMap (const Teuchos::RCP< const Epetra_BlockMap > &map)
 EpetraMap constructor to wrap a Epetra_Map object. More...
 
UnderlyingLib lib () const
 Get the library used by this object (Epetra or Epetra?) More...
 
const Epetra_BlockMap & getEpetra_BlockMap () const
 Get the underlying Epetra map. More...
 
const Epetra_Map & getEpetra_Map () const
 

Additional Inherited Members

- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

Definition at line 72 of file Xpetra_EpetraMap.hpp.

Member Typedef Documentation

typedef int Xpetra::EpetraMap::LocalOrdinal
private

Definition at line 76 of file Xpetra_EpetraMap.hpp.

typedef int Xpetra::EpetraMap::GlobalOrdinal
private

Definition at line 77 of file Xpetra_EpetraMap.hpp.

Definition at line 78 of file Xpetra_EpetraMap.hpp.

Constructor & Destructor Documentation

Xpetra::EpetraMap::EpetraMap ( global_size_t  numGlobalElements,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
LocalGlobal  lg = GloballyDistributed,
const Teuchos::RCP< Node > &  node = Kokkos::DefaultNode::getDefaultNode() 
)

Constructor with Tpetra-defined contiguous uniform distribution.

Definition at line 59 of file Xpetra_EpetraMap.cpp.

Xpetra::EpetraMap::EpetraMap ( global_size_t  numGlobalElements,
size_t  numLocalElements,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node = Kokkos::DefaultNode::getDefaultNode() 
)

Constructor with a user-defined contiguous distribution.

Definition at line 111 of file Xpetra_EpetraMap.cpp.

Xpetra::EpetraMap::EpetraMap ( global_size_t  numGlobalElements,
const Teuchos::ArrayView< const GlobalOrdinal > &  elementList,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node = Kokkos::DefaultNode::getDefaultNode() 
)

Constructor with user-defined arbitrary (possibly noncontiguous) distribution.

Definition at line 212 of file Xpetra_EpetraMap.cpp.

virtual Xpetra::EpetraMap::~EpetraMap ( )
inlinevirtual

Destructor.

Definition at line 211 of file Xpetra_EpetraMap.hpp.

Xpetra::EpetraMap::EpetraMap ( const Teuchos::RCP< const Epetra_BlockMap > &  map)
inline

EpetraMap constructor to wrap a Epetra_Map object.

Definition at line 214 of file Xpetra_EpetraMap.hpp.

Member Function Documentation

global_size_t Xpetra::EpetraMap::getGlobalNumElements ( ) const
inlinevirtual

The number of elements in this Map.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 100 of file Xpetra_EpetraMap.hpp.

size_t Xpetra::EpetraMap::getNodeNumElements ( ) const
inlinevirtual

The number of elements belonging to the calling node.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 103 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMap::getIndexBase ( ) const
inlinevirtual

The index base for this Map.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 106 of file Xpetra_EpetraMap.hpp.

LocalOrdinal Xpetra::EpetraMap::getMinLocalIndex ( ) const
inlinevirtual

The minimum local index.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 109 of file Xpetra_EpetraMap.hpp.

LocalOrdinal Xpetra::EpetraMap::getMaxLocalIndex ( ) const
inlinevirtual

The maximum local index on the calling process.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 112 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMap::getMinGlobalIndex ( ) const
inlinevirtual

The minimum global index owned by the calling process.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 115 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMap::getMaxGlobalIndex ( ) const
inlinevirtual

The maximum global index owned by the calling process.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 118 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMap::getMinAllGlobalIndex ( ) const
inlinevirtual

The minimum global index over all processes in the communicator.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 121 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMap::getMaxAllGlobalIndex ( ) const
inlinevirtual

The maximum global index over all processes in the communicator.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 124 of file Xpetra_EpetraMap.hpp.

LocalOrdinal Xpetra::EpetraMap::getLocalElement ( GlobalOrdinal  globalIndex) const
inlinevirtual

The local index corresponding to the given global index.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 127 of file Xpetra_EpetraMap.hpp.

LookupStatus Xpetra::EpetraMap::getRemoteIndexList ( const Teuchos::ArrayView< const GlobalOrdinal > &  GIDList,
const Teuchos::ArrayView< int > &  nodeIDList,
const Teuchos::ArrayView< LocalOrdinal > &  LIDList 
) const
virtual

Return the process IDs and corresponding local IDs for the given global IDs.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 228 of file Xpetra_EpetraMap.cpp.

LookupStatus Xpetra::EpetraMap::getRemoteIndexList ( const Teuchos::ArrayView< const GlobalOrdinal > &  GIDList,
const Teuchos::ArrayView< int > &  nodeIDList 
) const
virtual

Return the process IDs for the given global IDs.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 230 of file Xpetra_EpetraMap.cpp.

Teuchos::ArrayView< const int > Xpetra::EpetraMap::getNodeElementList ( ) const
virtual

Return a view of the global indices owned by this node.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 232 of file Xpetra_EpetraMap.cpp.

bool Xpetra::EpetraMap::isNodeLocalElement ( LocalOrdinal  localIndex) const
inlinevirtual

True if the local index is valid for this Map on this node, else false.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 144 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMap::isNodeGlobalElement ( GlobalOrdinal  globalIndex) const
inlinevirtual

True if the global index is found in this Map on this node, else false.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 147 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMap::isContiguous ( ) const
inlinevirtual

True if this Map is distributed contiguously, else false.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 150 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMap::isDistributed ( ) const
inlinevirtual

Whether this Map is globally distributed or locally replicated.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 153 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMap::isCompatible ( const Map< LocalOrdinal, GlobalOrdinal, Node > &  map) const
inlinevirtual

True if and only if map is compatible with this Map.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 156 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMap::isSameAs ( const Map< LocalOrdinal, GlobalOrdinal, Node > &  map) const
inlinevirtual

True if and only if map is identical to this Map.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 159 of file Xpetra_EpetraMap.hpp.

const Teuchos::RCP< const Teuchos::Comm< int > > Xpetra::EpetraMap::getComm ( ) const
inlinevirtual

Get this Map's Comm object.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 167 of file Xpetra_EpetraMap.hpp.

const Teuchos::RCP< Kokkos::DefaultNode::DefaultNodeType > Xpetra::EpetraMap::getNode ( ) const
virtual

Get this Map's Node object.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 235 of file Xpetra_EpetraMap.cpp.

RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > Xpetra::EpetraMap::removeEmptyProcesses ( ) const
inlinevirtual

Implements Xpetra::Map< int, int >.

Definition at line 173 of file Xpetra_EpetraMap.hpp.

RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > Xpetra::EpetraMap::replaceCommWithSubset ( const Teuchos::RCP< const Teuchos::Comm< int > > &  newComm) const
inlinevirtual

Implements Xpetra::Map< int, int >.

Definition at line 179 of file Xpetra_EpetraMap.hpp.

std::string Xpetra::EpetraMap::description ( ) const
virtual

Return a simple one-line description of this object.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 242 of file Xpetra_EpetraMap.cpp.

void Xpetra::EpetraMap::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
virtual

Print this object with the given verbosity level to the given FancyOStream.

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 256 of file Xpetra_EpetraMap.cpp.

GlobalOrdinal Xpetra::EpetraMap::getGlobalElement ( LocalOrdinal  localIndex) const
inlinevirtual

Return the global index for a given local index. Note that this returns -1 if not found on this processor. (This is different than Epetra's behavior!)

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 199 of file Xpetra_EpetraMap.hpp.

UnderlyingLib Xpetra::EpetraMap::lib ( ) const
inlinevirtual

Get the library used by this object (Epetra or Epetra?)

Implements Xpetra::Map< int, int >.

Reimplemented in Xpetra::StridedEpetraMap.

Definition at line 218 of file Xpetra_EpetraMap.hpp.

const Epetra_BlockMap& Xpetra::EpetraMap::getEpetra_BlockMap ( ) const
inline

Get the underlying Epetra map.

Definition at line 222 of file Xpetra_EpetraMap.hpp.

const Epetra_Map& Xpetra::EpetraMap::getEpetra_Map ( ) const
inline

Definition at line 223 of file Xpetra_EpetraMap.hpp.

Member Data Documentation

RCP<const Epetra_BlockMap> Xpetra::EpetraMap::map_
protected

Definition at line 229 of file Xpetra_EpetraMap.hpp.


The documentation for this class was generated from the following files: