Tpetra Matrix/Vector Services Version of the Day
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Block-entry counterpart to Tpetra::Map. More...

#include <Tpetra_BlockMap_decl.hpp>

Inheritance diagram for Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Constructor/Destructor Methods
 BlockMap (global_size_t numGlobalBlocks, LocalOrdinal blockSize, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=KokkosClassic::DefaultNode::getDefaultNode())
 BlockMap constructor specifying numGlobalBlocks and constant blockSize.
 BlockMap (global_size_t numGlobalBlocks, size_t numLocalBlocks, LocalOrdinal blockSize, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=KokkosClassic::DefaultNode::getDefaultNode())
 BlockMap constructor specifying num global and local blocks, and constant blockSize.
 BlockMap (global_size_t numGlobalBlocks, const Teuchos::ArrayView< const GlobalOrdinal > &myGlobalBlockIDs, const Teuchos::ArrayView< const GlobalOrdinal > &myFirstGlobalPointInBlocks, const Teuchos::ArrayView< const LocalOrdinal > &myBlockSizes, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=KokkosClassic::DefaultNode::getDefaultNode())
 BlockMap constructor specifying numGlobalBlocks and lists of local blocks first-global-point-in-blocks, and blockSizes.
 BlockMap (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &pointMap, const Teuchos::ArrayView< const GlobalOrdinal > &myGlobalBlockIDs, const Teuchos::ArrayView< const LocalOrdinal > &myBlockSizes, const Teuchos::RCP< Node > &node=KokkosClassic::DefaultNode::getDefaultNode())
 BlockMap constructor which takes a point-entry Map. The arrays myGlobalBlockIDs and myBlockSizes must be the same length, and sum(myBlockSizes) must equal pointMap->getNodeNumElements(). If these arrays are different lengths or sum(myBlockSizes) is incorrect, then std::runtime_error is thrown.
 ~BlockMap ()
 BlockMap destructor.
Attribute Accessor Methods
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getPointMap () const
 Return this block-map's point-entry map attribute.
global_size_t getGlobalNumBlocks () const
 Return global number of blocks.
size_t getNodeNumBlocks () const
 Return number of blocks on the local processor.
Teuchos::ArrayView< const
GlobalOrdinal > 
getNodeBlockIDs () const
 Return array-view of block-ids for this local processor.
bool isBlockSizeConstant () const
 Return true if all blocks have the same size.
Teuchos::ArrayRCP< const
LocalOrdinal > 
getNodeFirstPointInBlocks () const
 Return ArrayRCP of first-local-point in local blocks.
Teuchos::ArrayRCP< const
LocalOrdinal > 
getNodeFirstPointInBlocks_Device () const
 Return device-resident ArrayRCP of first-local-point in local blocks.
GlobalOrdinal getGlobalBlockID (LocalOrdinal localBlockID) const
 Return the globalBlockID corresponding to the given localBlockID.
LocalOrdinal getLocalBlockID (GlobalOrdinal globalBlockID) const
 Return the localBlockID corresponding to the given globalBlockID.
LocalOrdinal getLocalBlockSize (LocalOrdinal localBlockID) const
 Return the block-size for localBlockID.
LocalOrdinal getFirstLocalPointInLocalBlock (LocalOrdinal localBlockID) const
 Return the first local point-index corresponding to localBlockID.
GlobalOrdinal getFirstGlobalPointInLocalBlock (LocalOrdinal localBlockID) const
 Return the first global point-index corresponding to localBlockID.
void getRemoteBlockInfo (const Teuchos::ArrayView< const GlobalOrdinal > &GBIDs, const Teuchos::ArrayView< GlobalOrdinal > &firstGlobalPointInBlocks, const Teuchos::ArrayView< LocalOrdinal > &blockSizes) const
 Return the first-global-point-in-block and block-sizes for a list of block-IDs on remote processors.

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
class Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >

Block-entry counterpart to Tpetra::Map.

BlockMap doesn't inherit Tpetra::Map, but always holds a Tpetra::Map as a class-member attribute.

Tpetra::BlockMap essentially holds information about how the point-entries in Tpetra::Map are grouped together in blocks. A block-entry consists of 1 or more point-entries.

Example usage: If a solution-space consists of multiple degrees-of-freedom at each finite-element node in a mesh, such as a displacement vector, it might be described as having a block of size 3 (in 3D) at each mesh node. Thus for a mesh with N nodes, the point-entry map will have N*3 entries, whereas the block-map will have N blocks, each of size 3.

Definition at line 71 of file Tpetra_BlockMap_decl.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap ( global_size_t  numGlobalBlocks,
LocalOrdinal  blockSize,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node = KokkosClassic::DefaultNode::getDefaultNode() 
)

BlockMap constructor specifying numGlobalBlocks and constant blockSize.

Definition at line 55 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap ( global_size_t  numGlobalBlocks,
size_t  numLocalBlocks,
LocalOrdinal  blockSize,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node = KokkosClassic::DefaultNode::getDefaultNode() 
)

BlockMap constructor specifying num global and local blocks, and constant blockSize.

Definition at line 110 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap ( global_size_t  numGlobalBlocks,
const Teuchos::ArrayView< const GlobalOrdinal > &  myGlobalBlockIDs,
const Teuchos::ArrayView< const GlobalOrdinal > &  myFirstGlobalPointInBlocks,
const Teuchos::ArrayView< const LocalOrdinal > &  myBlockSizes,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node = KokkosClassic::DefaultNode::getDefaultNode() 
)

BlockMap constructor specifying numGlobalBlocks and lists of local blocks first-global-point-in-blocks, and blockSizes.

Definition at line 160 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  pointMap,
const Teuchos::ArrayView< const GlobalOrdinal > &  myGlobalBlockIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  myBlockSizes,
const Teuchos::RCP< Node > &  node = KokkosClassic::DefaultNode::getDefaultNode() 
)

BlockMap constructor which takes a point-entry Map. The arrays myGlobalBlockIDs and myBlockSizes must be the same length, and sum(myBlockSizes) must equal pointMap->getNodeNumElements(). If these arrays are different lengths or sum(myBlockSizes) is incorrect, then std::runtime_error is thrown.

Definition at line 244 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::~BlockMap ( ) [inline]

BlockMap destructor.

Definition at line 119 of file Tpetra_BlockMap_decl.hpp.


Member Function Documentation

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getPointMap ( ) const [inline]

Return this block-map's point-entry map attribute.

Definition at line 127 of file Tpetra_BlockMap_decl.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumBlocks ( ) const

Return global number of blocks.

Definition at line 359 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumBlocks ( ) const

Return number of blocks on the local processor.

Definition at line 366 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayView< const GlobalOrdinal > Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeBlockIDs ( ) const

Return array-view of block-ids for this local processor.

Definition at line 373 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::isBlockSizeConstant ( ) const

Return true if all blocks have the same size.

Definition at line 380 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const LocalOrdinal > Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeFirstPointInBlocks ( ) const

Return ArrayRCP of first-local-point in local blocks.

Definition at line 385 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const LocalOrdinal > Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeFirstPointInBlocks_Device ( ) const

Return device-resident ArrayRCP of first-local-point in local blocks.

This version of this method is primarily used internally by VbrMatrix for passing data to the matrix-vector-product kernel.

Definition at line 392 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
GlobalOrdinal Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getGlobalBlockID ( LocalOrdinal  localBlockID) const

Return the globalBlockID corresponding to the given localBlockID.

If localBlockID is not present on this processor, returns Teuchos::OrdinalTraits<LocalOrdinal>::invalid().

Definition at line 399 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LocalOrdinal Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getLocalBlockID ( GlobalOrdinal  globalBlockID) const

Return the localBlockID corresponding to the given globalBlockID.

If globalBlockID is not present on this processor, returns Teuchos::OrdinalTraits<LocalOrdinal>::invalid().

Definition at line 411 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LocalOrdinal Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getLocalBlockSize ( LocalOrdinal  localBlockID) const

Return the block-size for localBlockID.

If localBlockID is out of range (less than 0 or greater/equal num-local-blocks), then std::runtime_error is thrown.

Definition at line 438 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
LocalOrdinal Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getFirstLocalPointInLocalBlock ( LocalOrdinal  localBlockID) const

Return the first local point-index corresponding to localBlockID.

If localBlockID is out of range (less than 0 or greater/equal num-local-blocks), then std::runtime_error is thrown.

Definition at line 454 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
GlobalOrdinal Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getFirstGlobalPointInLocalBlock ( LocalOrdinal  localBlockID) const

Return the first global point-index corresponding to localBlockID.

If localBlockID is out of range (less than 0 or greater/equal num-local-blocks), then std::runtime_error is thrown.

Definition at line 466 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getRemoteBlockInfo ( const Teuchos::ArrayView< const GlobalOrdinal > &  GBIDs,
const Teuchos::ArrayView< GlobalOrdinal > &  firstGlobalPointInBlocks,
const Teuchos::ArrayView< LocalOrdinal > &  blockSizes 
) const

Return the first-global-point-in-block and block-sizes for a list of block-IDs on remote processors.

Definition at line 307 of file Tpetra_BlockMap_def.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines