Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::EpetraMapT< int, EpetraNode > Class Template Reference

#include <Xpetra_EpetraMap.hpp>

Inheritance diagram for Xpetra::EpetraMapT< int, EpetraNode >:
Xpetra::Map< int, int, EpetraNode >

Public Types

typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 
typedef Map< LocalOrdinal,
GlobalOrdinal, Node >
::global_indices_array_device_type 
global_indices_array_device_type
 
using local_map_type = typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type
 
- Public Types inherited from Xpetra::Map< int, int, EpetraNode >
typedef int local_ordinal_type
 
typedef int global_ordinal_type
 
typedef EpetraNode node_type
 
typedef Kokkos::View< const
global_ordinal_type
*, typename
EpetraNode::device_type > 
global_indices_array_device_type
 
typedef Tpetra::Map< int, int,
EpetraNode >::local_map_type 
local_map_type
 

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...
 
local_map_type getLocalMap () const
 Get the local Map for Kokkos kernels. More...
 
- Public Member Functions inherited from Xpetra::Map< int, int, EpetraNode >
virtual RCP< const Xpetra::Map
< int, int, EpetraNode > > 
getMap () const
 
virtual ~Map ()
 Destructor. More...
 

Protected Attributes

RCP< const Epetra_BlockMap > map_
 

Private Types

typedef int LocalOrdinal
 
typedef int GlobalOrdinal
 
typedef EpetraNode Node
 

Private Attributes

local_map_type localMap_
 

Constructors and destructor

 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. More...
 
 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. More...
 
 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. More...
 

Attributes

global_size_t getGlobalNumElements () const
 The number of elements in this Map. More...
 
size_t getLocalNumElements () const
 The number of elements belonging to the calling process. 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 ranks and corresponding local indices for the given global indices. More...
 
LookupStatus getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
 Return the process ranks for the given global indices. More...
 
Teuchos::ArrayView< const
GlobalOrdinal
getLocalElementList () const
 Return a view of the global indices owned by this process. More...
 
global_indices_array_device_type getMyGlobalIndicesDevice () const
 Return a view of the global indices owned by this process. More...
 

Boolean tests

bool isNodeLocalElement (LocalOrdinal localIndex) const
 Whether the given local index is valid for this Map on this process. More...
 
bool isNodeGlobalElement (GlobalOrdinal globalIndex) const
 Whether the given global index is valid for this Map on this process. 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...
 
Teuchos::RCP< const
Teuchos::Comm< int > > 
getComm () const
 Get this Map's Comm object. More...
 
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 Teuchos::FancyOStream. More...
 
RCP< const Map< int,
GlobalOrdinal, Node > > 
removeEmptyProcesses () const
 Return a new Map with processes with zero elements removed. More...
 
RCP< const Map< int,
GlobalOrdinal, Node > > 
replaceCommWithSubset (const Teuchos::RCP< const Teuchos::Comm< int > > &) const
 Replace this Map's communicator with a subset communicator. More...
 

Xpetra specific

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

Detailed Description

template<>
class Xpetra::EpetraMapT< int, EpetraNode >

Definition at line 271 of file Xpetra_EpetraMap.hpp.

Member Typedef Documentation

typedef int Xpetra::EpetraMapT< int, EpetraNode >::LocalOrdinal
private

Definition at line 273 of file Xpetra_EpetraMap.hpp.

typedef int Xpetra::EpetraMapT< int, EpetraNode >::GlobalOrdinal
private

Definition at line 274 of file Xpetra_EpetraMap.hpp.

typedef EpetraNode Xpetra::EpetraMapT< int, EpetraNode >::Node
private

Definition at line 275 of file Xpetra_EpetraMap.hpp.

Definition at line 280 of file Xpetra_EpetraMap.hpp.

Constructor & Destructor Documentation

Xpetra::EpetraMapT< int, EpetraNode >::EpetraMapT ( global_size_t  numGlobalElements,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
LocalGlobal  lg = GloballyDistributed 
)
inline

Constructor with Tpetra-defined contiguous uniform distribution.

Definition at line 287 of file Xpetra_EpetraMap.hpp.

Xpetra::EpetraMapT< int, EpetraNode >::EpetraMapT ( global_size_t  numGlobalElements,
size_t  numLocalElements,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm 
)
inline

Constructor with a user-defined contiguous distribution.

Definition at line 338 of file Xpetra_EpetraMap.hpp.

Xpetra::EpetraMapT< int, EpetraNode >::EpetraMapT ( global_size_t  numGlobalElements,
const Teuchos::ArrayView< const GlobalOrdinal > &  elementList,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm 
)
inline

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

Definition at line 431 of file Xpetra_EpetraMap.hpp.

virtual Xpetra::EpetraMapT< int, EpetraNode >::~EpetraMapT ( )
inlinevirtual

Destructor.

Definition at line 725 of file Xpetra_EpetraMap.hpp.

Xpetra::EpetraMapT< int, EpetraNode >::EpetraMapT ( const Teuchos::RCP< const Epetra_BlockMap > &  map)
inline

EpetraMapT constructor to wrap a Epetra_Map object.

Definition at line 728 of file Xpetra_EpetraMap.hpp.

Member Function Documentation

global_size_t Xpetra::EpetraMapT< int, EpetraNode >::getGlobalNumElements ( ) const
inlinevirtual

The number of elements in this Map.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 448 of file Xpetra_EpetraMap.hpp.

size_t Xpetra::EpetraMapT< int, EpetraNode >::getLocalNumElements ( ) const
inlinevirtual

The number of elements belonging to the calling process.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 454 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getIndexBase ( ) const
inlinevirtual

The index base for this Map.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 460 of file Xpetra_EpetraMap.hpp.

LocalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getMinLocalIndex ( ) const
inlinevirtual

The minimum local index.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 466 of file Xpetra_EpetraMap.hpp.

LocalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getMaxLocalIndex ( ) const
inlinevirtual

The maximum local index on the calling process.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 472 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getMinGlobalIndex ( ) const
inlinevirtual

The minimum global index owned by the calling process.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 478 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getMaxGlobalIndex ( ) const
inlinevirtual

The maximum global index owned by the calling process.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 484 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getMinAllGlobalIndex ( ) const
inlinevirtual

The minimum global index over all processes in the communicator.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 490 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getMaxAllGlobalIndex ( ) const
inlinevirtual

The maximum global index over all processes in the communicator.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 496 of file Xpetra_EpetraMap.hpp.

LocalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::getLocalElement ( GlobalOrdinal  globalIndex) const
inlinevirtual

The local index corresponding to the given global index.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 502 of file Xpetra_EpetraMap.hpp.

LookupStatus Xpetra::EpetraMapT< int, EpetraNode >::getRemoteIndexList ( const Teuchos::ArrayView< const GlobalOrdinal > &  GIDList,
const Teuchos::ArrayView< int > &  nodeIDList,
const Teuchos::ArrayView< LocalOrdinal > &  LIDList 
) const
inlinevirtual

Return the process ranks and corresponding local indices for the given global indices.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 508 of file Xpetra_EpetraMap.hpp.

LookupStatus Xpetra::EpetraMapT< int, EpetraNode >::getRemoteIndexList ( const Teuchos::ArrayView< const GlobalOrdinal > &  GIDList,
const Teuchos::ArrayView< int > &  nodeIDList 
) const
inlinevirtual

Return the process ranks for the given global indices.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 516 of file Xpetra_EpetraMap.hpp.

Teuchos::ArrayView<const GlobalOrdinal> Xpetra::EpetraMapT< int, EpetraNode >::getLocalElementList ( ) const
inlinevirtual

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

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 523 of file Xpetra_EpetraMap.hpp.

global_indices_array_device_type Xpetra::EpetraMapT< int, EpetraNode >::getMyGlobalIndicesDevice ( ) const
inlinevirtual

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

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 529 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMapT< int, EpetraNode >::isNodeLocalElement ( LocalOrdinal  localIndex) const
inlinevirtual

Whether the given local index is valid for this Map on this process.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 544 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMapT< int, EpetraNode >::isNodeGlobalElement ( GlobalOrdinal  globalIndex) const
inlinevirtual

Whether the given global index is valid for this Map on this process.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 550 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMapT< int, EpetraNode >::isContiguous ( ) const
inlinevirtual

True if this Map is distributed contiguously, else false.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 556 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMapT< int, EpetraNode >::isDistributed ( ) const
inlinevirtual

Whether this Map is globally distributed or locally replicated.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 562 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMapT< int, EpetraNode >::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, EpetraNode >.

Definition at line 568 of file Xpetra_EpetraMap.hpp.

bool Xpetra::EpetraMapT< int, EpetraNode >::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, EpetraNode >.

Definition at line 574 of file Xpetra_EpetraMap.hpp.

Teuchos::RCP<const Teuchos::Comm<int> > Xpetra::EpetraMapT< int, EpetraNode >::getComm ( ) const
inlinevirtual

Get this Map's Comm object.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 585 of file Xpetra_EpetraMap.hpp.

std::string Xpetra::EpetraMapT< int, EpetraNode >::description ( ) const
inlinevirtual

Return a simple one-line description of this object.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 596 of file Xpetra_EpetraMap.hpp.

void Xpetra::EpetraMapT< int, EpetraNode >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
inlinevirtual

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

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 611 of file Xpetra_EpetraMap.hpp.

RCP<const Map<int, GlobalOrdinal, Node> > Xpetra::EpetraMapT< int, EpetraNode >::removeEmptyProcesses ( ) const
inlinevirtual

Return a new Map with processes with zero elements removed.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 691 of file Xpetra_EpetraMap.hpp.

RCP<const Map<int, GlobalOrdinal, Node> > Xpetra::EpetraMapT< int, EpetraNode >::replaceCommWithSubset ( const Teuchos::RCP< const Teuchos::Comm< int > > &  ) const
inlinevirtual

Replace this Map's communicator with a subset communicator.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 703 of file Xpetra_EpetraMap.hpp.

GlobalOrdinal Xpetra::EpetraMapT< int, EpetraNode >::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, EpetraNode >.

Definition at line 711 of file Xpetra_EpetraMap.hpp.

UnderlyingLib Xpetra::EpetraMapT< int, EpetraNode >::lib ( ) const
inlinevirtual

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

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 734 of file Xpetra_EpetraMap.hpp.

const RCP<const Epetra_Map> Xpetra::EpetraMapT< int, EpetraNode >::getEpetra_MapRCP ( ) const
inline

Get the underlying Epetra map.

Definition at line 737 of file Xpetra_EpetraMap.hpp.

const Epetra_BlockMap& Xpetra::EpetraMapT< int, EpetraNode >::getEpetra_BlockMap ( ) const
inline

Definition at line 738 of file Xpetra_EpetraMap.hpp.

const Epetra_Map& Xpetra::EpetraMapT< int, EpetraNode >::getEpetra_Map ( ) const
inline

Definition at line 739 of file Xpetra_EpetraMap.hpp.

local_map_type Xpetra::EpetraMapT< int, EpetraNode >::getLocalMap ( ) const
inlinevirtual

Get the local Map for Kokkos kernels.

Implements Xpetra::Map< int, int, EpetraNode >.

Definition at line 746 of file Xpetra_EpetraMap.hpp.

Member Data Documentation

local_map_type Xpetra::EpetraMapT< int, EpetraNode >::localMap_
mutableprivate

Definition at line 751 of file Xpetra_EpetraMap.hpp.

RCP<const Epetra_BlockMap> Xpetra::EpetraMapT< int, EpetraNode >::map_
protected

Definition at line 759 of file Xpetra_EpetraMap.hpp.


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