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

#include <Xpetra_EpetraMap.hpp>

Inheritance diagram for Xpetra::EpetraMapT< GlobalOrdinal, Node >:
Xpetra::Map< int, GlobalOrdinal, Node >

Public Types

typedef int 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
 
- Public Types inherited from Xpetra::Map< int, GlobalOrdinal, Node >
typedef int local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 
typedef Kokkos::View< const
global_ordinal_type
*, typename Node::device_type > 
global_indices_array_device_type
 
typedef Tpetra::Map< int,
GlobalOrdinal, Node >
::local_map_type 
local_map_type
 

Public Member Functions

GlobalOrdinal getGlobalElement (LocalOrdinal) 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, GlobalOrdinal, Node >
virtual RCP< const Xpetra::Map
< int, GlobalOrdinal, Node > > 
getMap () const
 
virtual ~Map ()
 Destructor. More...
 

Protected Attributes

RCP< const Epetra_BlockMap > map_
 

Private Types

typedef int LocalOrdinal
 

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) const
 The local index corresponding to the given global index. More...
 
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. More...
 
LookupStatus getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &) 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) const
 Whether the given local index is valid for this Map on this process. More...
 
bool isNodeGlobalElement (GlobalOrdinal) 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 > &) const
 True if and only if map is compatible with this Map. More...
 
bool isSameAs (const Map< LocalOrdinal, GlobalOrdinal, Node > &) 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 &, const Teuchos::EVerbosityLevel=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

using local_map_type = typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type
 
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
 
local_map_type getLocalMap () const
 Get the local Map for Kokkos kernels. More...
 

Detailed Description

template<class GlobalOrdinal, class Node>
class Xpetra::EpetraMapT< GlobalOrdinal, Node >

Definition at line 87 of file Xpetra_EpetraMap.hpp.

Member Typedef Documentation

template<class GlobalOrdinal, class Node>
typedef int Xpetra::EpetraMapT< GlobalOrdinal, Node >::LocalOrdinal
private

Definition at line 89 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
typedef int Xpetra::EpetraMapT< GlobalOrdinal, Node >::local_ordinal_type

Definition at line 92 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
typedef GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::global_ordinal_type

Definition at line 93 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
typedef Node Xpetra::EpetraMapT< GlobalOrdinal, Node >::node_type

Definition at line 94 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
typedef Map<LocalOrdinal, GlobalOrdinal, Node>::global_indices_array_device_type Xpetra::EpetraMapT< GlobalOrdinal, Node >::global_indices_array_device_type

Definition at line 95 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
using Xpetra::EpetraMapT< GlobalOrdinal, Node >::local_map_type = typename Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type

Definition at line 251 of file Xpetra_EpetraMap.hpp.

Constructor & Destructor Documentation

template<class GlobalOrdinal, class Node>
Xpetra::EpetraMapT< GlobalOrdinal, Node >::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 101 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
Xpetra::EpetraMapT< GlobalOrdinal, Node >::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 110 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
Xpetra::EpetraMapT< GlobalOrdinal, Node >::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 116 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
virtual Xpetra::EpetraMapT< GlobalOrdinal, Node >::~EpetraMapT ( )
inlinevirtual

Destructor.

Definition at line 233 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
Xpetra::EpetraMapT< GlobalOrdinal, Node >::EpetraMapT ( const Teuchos::RCP< const Epetra_BlockMap > &  map)
inline

EpetraMapT constructor to wrap a Epetra_Map object.

Definition at line 236 of file Xpetra_EpetraMap.hpp.

Member Function Documentation

template<class GlobalOrdinal, class Node>
global_size_t Xpetra::EpetraMapT< GlobalOrdinal, Node >::getGlobalNumElements ( ) const
inlinevirtual

The number of elements in this Map.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 130 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
size_t Xpetra::EpetraMapT< GlobalOrdinal, Node >::getLocalNumElements ( ) const
inlinevirtual

The number of elements belonging to the calling process.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 133 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getIndexBase ( ) const
inlinevirtual

The index base for this Map.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 136 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
LocalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMinLocalIndex ( ) const
inlinevirtual

The minimum local index.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 139 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
LocalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMaxLocalIndex ( ) const
inlinevirtual

The maximum local index on the calling process.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 142 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMinGlobalIndex ( ) const
inlinevirtual

The minimum global index owned by the calling process.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 145 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMaxGlobalIndex ( ) const
inlinevirtual

The maximum global index owned by the calling process.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 148 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMinAllGlobalIndex ( ) const
inlinevirtual

The minimum global index over all processes in the communicator.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 151 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMaxAllGlobalIndex ( ) const
inlinevirtual

The maximum global index over all processes in the communicator.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 154 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
LocalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getLocalElement ( GlobalOrdinal  ) const
inlinevirtual

The local index corresponding to the given global index.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 157 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
LookupStatus Xpetra::EpetraMapT< GlobalOrdinal, Node >::getRemoteIndexList ( const Teuchos::ArrayView< const GlobalOrdinal > &  ,
const Teuchos::ArrayView< int > &  ,
const Teuchos::ArrayView< LocalOrdinal > &   
) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 160 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
LookupStatus Xpetra::EpetraMapT< GlobalOrdinal, Node >::getRemoteIndexList ( const Teuchos::ArrayView< const GlobalOrdinal > &  ,
const Teuchos::ArrayView< int > &   
) const
inlinevirtual

Return the process ranks for the given global indices.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 163 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
Teuchos::ArrayView<const GlobalOrdinal> Xpetra::EpetraMapT< GlobalOrdinal, Node >::getLocalElementList ( ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 166 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
global_indices_array_device_type Xpetra::EpetraMapT< GlobalOrdinal, Node >::getMyGlobalIndicesDevice ( ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 169 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
bool Xpetra::EpetraMapT< GlobalOrdinal, Node >::isNodeLocalElement ( LocalOrdinal  ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 177 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
bool Xpetra::EpetraMapT< GlobalOrdinal, Node >::isNodeGlobalElement ( GlobalOrdinal  ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 180 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
bool Xpetra::EpetraMapT< GlobalOrdinal, Node >::isContiguous ( ) const
inlinevirtual

True if this Map is distributed contiguously, else false.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 183 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
bool Xpetra::EpetraMapT< GlobalOrdinal, Node >::isDistributed ( ) const
inlinevirtual

Whether this Map is globally distributed or locally replicated.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 186 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
bool Xpetra::EpetraMapT< GlobalOrdinal, Node >::isCompatible ( const Map< LocalOrdinal, GlobalOrdinal, Node > &  ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 189 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
bool Xpetra::EpetraMapT< GlobalOrdinal, Node >::isSameAs ( const Map< LocalOrdinal, GlobalOrdinal, Node > &  ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 192 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
Teuchos::RCP<const Teuchos::Comm<int> > Xpetra::EpetraMapT< GlobalOrdinal, Node >::getComm ( ) const
inlinevirtual

Get this Map's Comm object.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 200 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
std::string Xpetra::EpetraMapT< GlobalOrdinal, Node >::description ( ) const
inlinevirtual

Return a simple one-line description of this object.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 208 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
void Xpetra::EpetraMapT< GlobalOrdinal, Node >::describe ( Teuchos::FancyOStream &  ,
const Teuchos::EVerbosityLevel  = Teuchos::Describable::verbLevel_default 
) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 211 of file Xpetra_EpetraMap.hpp.

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

Return a new Map with processes with zero elements removed.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 219 of file Xpetra_EpetraMap.hpp.

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

Replace this Map's communicator with a subset communicator.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 222 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
GlobalOrdinal Xpetra::EpetraMapT< GlobalOrdinal, Node >::getGlobalElement ( LocalOrdinal  ) 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, GlobalOrdinal, Node >.

Definition at line 227 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
UnderlyingLib Xpetra::EpetraMapT< GlobalOrdinal, Node >::lib ( ) const
inlinevirtual

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

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 243 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
const RCP<const Epetra_Map>& Xpetra::EpetraMapT< GlobalOrdinal, Node >::getEpetra_MapRCP ( ) const
inline

Get the underlying Epetra map.

Definition at line 246 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
const Epetra_BlockMap& Xpetra::EpetraMapT< GlobalOrdinal, Node >::getEpetra_BlockMap ( ) const
inline

Definition at line 247 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
const Epetra_Map& Xpetra::EpetraMapT< GlobalOrdinal, Node >::getEpetra_Map ( ) const
inline

Definition at line 248 of file Xpetra_EpetraMap.hpp.

template<class GlobalOrdinal, class Node>
local_map_type Xpetra::EpetraMapT< GlobalOrdinal, Node >::getLocalMap ( ) const
inlinevirtual

Get the local Map for Kokkos kernels.

Implements Xpetra::Map< int, GlobalOrdinal, Node >.

Definition at line 253 of file Xpetra_EpetraMap.hpp.

Member Data Documentation

template<class GlobalOrdinal, class Node>
RCP<const Epetra_BlockMap> Xpetra::EpetraMapT< GlobalOrdinal, Node >::map_
protected

Definition at line 265 of file Xpetra_EpetraMap.hpp.


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