Tpetra parallel linear algebra
Version of the Day
|
Block-entry counterpart to Tpetra::Map. More...
#include <Tpetra_BlockMap_decl.hpp>
Inherits Describable.
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=defaultArgNode< node_type >()) | |
BlockMap constructor specifying numGlobalBlocks and constant blockSize. More... | |
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=defaultArgNode< node_type >()) | |
BlockMap constructor specifying num global and local blocks, and constant blockSize. More... | |
BlockMap (const global_size_t numGlobalBlocks, const Teuchos::ArrayView< const GlobalOrdinal > &myGlobalBlockIDs, const Teuchos::ArrayView< const GlobalOrdinal > &myFirstGlobalPointInBlocks, const Teuchos::ArrayView< const LocalOrdinal > &myBlockSizes, const GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=defaultArgNode< node_type >()) | |
BlockMap constructor specifying numGlobalBlocks and lists of local blocks first-global-point-in-blocks, and blockSizes. More... | |
BlockMap (const Teuchos::RCP< const point_map_type > &pointMap, const Teuchos::ArrayView< const GlobalOrdinal > &myGlobalBlockIDs, const Teuchos::ArrayView< const LocalOrdinal > &myBlockSizes) | |
BlockMap constructor which takes a point-entry Map. More... | |
TPETRA_DEPRECATED | BlockMap (const Teuchos::RCP< const point_map_type > &pointMap, const Teuchos::ArrayView< const GlobalOrdinal > &myGlobalBlockIDs, const Teuchos::ArrayView< const LocalOrdinal > &myBlockSizes, const Teuchos::RCP< Node > &node) |
BlockMap constructor which takes a point-entry Map. More... | |
~BlockMap () | |
Destructor. More... | |
Attribute Accessor Methods | |
Teuchos::RCP< const point_map_type > | getPointMap () const |
Return this block Map's point-entry Map. More... | |
global_size_t | getGlobalNumBlocks () const |
Return global number of blocks. More... | |
size_t | getNodeNumBlocks () const |
Return number of blocks on the local processor. More... | |
Teuchos::ArrayView< const GlobalOrdinal > | getNodeBlockIDs () const |
Return array-view of block-ids for this local processor. More... | |
bool | isBlockSizeConstant () const |
Return true if all blocks have the same size. More... | |
Teuchos::ArrayRCP< const LocalOrdinal > | getNodeFirstPointInBlocks () const |
Return ArrayRCP of first-local-point in local blocks. More... | |
Teuchos::ArrayRCP< const LocalOrdinal > | getNodeFirstPointInBlocks_Device () const |
Return device-resident ArrayRCP of first-local-point in local blocks. More... | |
GlobalOrdinal | getGlobalBlockID (LocalOrdinal localBlockID) const |
Return the globalBlockID corresponding to the given localBlockID. More... | |
LocalOrdinal | getLocalBlockID (GlobalOrdinal globalBlockID) const |
Return the localBlockID corresponding to the given globalBlockID. More... | |
LocalOrdinal | getLocalBlockSize (LocalOrdinal localBlockID) const |
Return the block-size for localBlockID. More... | |
LocalOrdinal | getFirstLocalPointInLocalBlock (LocalOrdinal localBlockID) const |
Return the first local point-index corresponding to localBlockID. More... | |
GlobalOrdinal | getFirstGlobalPointInLocalBlock (LocalOrdinal localBlockID) const |
Return the first global point-index corresponding to localBlockID. More... | |
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. More... | |
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 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 77 of file Tpetra_BlockMap_decl.hpp.
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 = defaultArgNode<node_type> () |
||
) |
BlockMap constructor specifying numGlobalBlocks and constant blockSize.
Definition at line 52 of file Tpetra_BlockMap_def.hpp.
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 = defaultArgNode<node_type> () |
||
) |
BlockMap constructor specifying num global and local blocks, and constant blockSize.
Definition at line 107 of file Tpetra_BlockMap_def.hpp.
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap | ( | const global_size_t | numGlobalBlocks, |
const Teuchos::ArrayView< const GlobalOrdinal > & | myGlobalBlockIDs, | ||
const Teuchos::ArrayView< const GlobalOrdinal > & | myFirstGlobalPointInBlocks, | ||
const Teuchos::ArrayView< const LocalOrdinal > & | myBlockSizes, | ||
const GlobalOrdinal | indexBase, | ||
const Teuchos::RCP< const Teuchos::Comm< int > > & | comm, | ||
const Teuchos::RCP< Node > & | node = defaultArgNode<node_type> () |
||
) |
BlockMap constructor specifying numGlobalBlocks and lists of local blocks first-global-point-in-blocks, and blockSizes.
Definition at line 169 of file Tpetra_BlockMap_def.hpp.
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap | ( | const Teuchos::RCP< const point_map_type > & | pointMap, |
const Teuchos::ArrayView< const GlobalOrdinal > & | myGlobalBlockIDs, | ||
const Teuchos::ArrayView< const LocalOrdinal > & | myBlockSizes | ||
) |
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().
Definition at line 271 of file Tpetra_BlockMap_def.hpp.
TPETRA_DEPRECATED Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::BlockMap | ( | const Teuchos::RCP< const point_map_type > & | pointMap, |
const Teuchos::ArrayView< const GlobalOrdinal > & | myGlobalBlockIDs, | ||
const Teuchos::ArrayView< const LocalOrdinal > & | myBlockSizes, | ||
const Teuchos::RCP< Node > & | node | ||
) |
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().
Definition at line 290 of file Tpetra_BlockMap_def.hpp.
|
inline |
Destructor.
Definition at line 138 of file Tpetra_BlockMap_decl.hpp.
|
inline |
Return this block Map's point-entry Map.
Definition at line 145 of file Tpetra_BlockMap_decl.hpp.
global_size_t Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumBlocks | ( | ) | const |
Return global number of blocks.
Definition at line 438 of file Tpetra_BlockMap_def.hpp.
size_t Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeNumBlocks | ( | ) | const |
Return number of blocks on the local processor.
Definition at line 445 of file Tpetra_BlockMap_def.hpp.
Teuchos::ArrayView< const GlobalOrdinal > Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeBlockIDs | ( | ) | const |
Return array-view of block-ids for this local processor.
Definition at line 452 of file Tpetra_BlockMap_def.hpp.
bool Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::isBlockSizeConstant | ( | ) | const |
Return true if all blocks have the same size.
Definition at line 459 of file Tpetra_BlockMap_def.hpp.
Teuchos::ArrayRCP< const LocalOrdinal > Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getNodeFirstPointInBlocks | ( | ) | const |
Return ArrayRCP of first-local-point in local blocks.
Definition at line 464 of file Tpetra_BlockMap_def.hpp.
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 471 of file Tpetra_BlockMap_def.hpp.
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 478 of file Tpetra_BlockMap_def.hpp.
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 490 of file Tpetra_BlockMap_def.hpp.
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 517 of file Tpetra_BlockMap_def.hpp.
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 533 of file Tpetra_BlockMap_def.hpp.
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 545 of file Tpetra_BlockMap_def.hpp.
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 386 of file Tpetra_BlockMap_def.hpp.