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=Kokkos::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=Kokkos::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=Kokkos::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=Kokkos::DefaultNode::getDefaultNode())
 BlockMap constructor which takes a "regular" 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
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getPointMap () const
global_size_t getGlobalNumBlocks () const
size_t getNodeNumBlocks () const
 Return number of blocks on the local processor.
Teuchos::ArrayView< const
GlobalOrdinal > 
getNodeBlockIDs () const
bool isBlockSizeConstant () const
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.

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::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.

Definition at line 48 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 = Kokkos::DefaultNode::getDefaultNode() 
)

BlockMap constructor specifying numGlobalBlocks and constant blockSize.

Definition at line 41 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 = Kokkos::DefaultNode::getDefaultNode() 
)

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

Definition at line 96 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 = Kokkos::DefaultNode::getDefaultNode() 
)

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

Definition at line 141 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 = Kokkos::DefaultNode::getDefaultNode() 
)

BlockMap constructor which takes a "regular" 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 220 of file Tpetra_BlockMap_def.hpp.

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

BlockMap destructor.

Definition at line 96 of file Tpetra_BlockMap_decl.hpp.


Member Function Documentation

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 302 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 321 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 328 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 335 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 347 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 374 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 390 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 402 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