Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

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

Detailed Description

template<class LocalOrdinal = Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = Details::DefaultTypes::global_ordinal_type, class Node = Details::DefaultTypes::node_type>
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 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.

Warning
This class is DEPRECATED. There are known outstanding bugs with the current implementations of variable-block-size sparse matrices and related classes in Tpetra.

Definition at line 77 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 = defaultArgNode<node_type> () 
)

BlockMap constructor specifying numGlobalBlocks and constant blockSize.

Definition at line 52 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 = defaultArgNode<node_type> () 
)

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

Definition at line 107 of file Tpetra_BlockMap_def.hpp.

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

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

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

Warning
This constructor is DEPRECATED, because there is never a reason to use a Node instance other than the one provided by the point Map.

Definition at line 290 of file Tpetra_BlockMap_def.hpp.

template<class LocalOrdinal = Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = Details::DefaultTypes::global_ordinal_type, class Node = Details::DefaultTypes::node_type>
Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::~BlockMap ( )
inline

Destructor.

Definition at line 138 of file Tpetra_BlockMap_decl.hpp.

Member Function Documentation

template<class LocalOrdinal = Details::DefaultTypes::local_ordinal_type, class GlobalOrdinal = Details::DefaultTypes::global_ordinal_type, class Node = Details::DefaultTypes::node_type>
Teuchos::RCP<const point_map_type> Tpetra::BlockMap< LocalOrdinal, GlobalOrdinal, Node >::getPointMap ( ) const
inline

Return this block Map's point-entry Map.

Definition at line 145 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 438 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 445 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 452 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 459 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 464 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 471 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 478 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 490 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 517 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 533 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 545 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 386 of file Tpetra_BlockMap_def.hpp.


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