42 #ifndef TPETRA_BLOCKMAP_DECL_HPP 43 #define TPETRA_BLOCKMAP_DECL_HPP 47 #include "Tpetra_Map.hpp" 70 template <
class LocalOrdinal,
class GlobalOrdinal = LocalOrdinal,
class Node = Kokkos::DefaultNode::DefaultNodeType>
73 typedef LocalOrdinal local_ordinal_type;
74 typedef GlobalOrdinal global_ordinal_type;
75 typedef Node node_type;
83 LocalOrdinal blockSize,
84 GlobalOrdinal indexBase,
91 size_t numLocalBlocks,
92 LocalOrdinal blockSize,
93 GlobalOrdinal indexBase,
103 GlobalOrdinal indexBase,
128 {
return pointMap_; }
186 void setup_noncontig_mapping();
193 bool blockIDsAreContiguous_;
194 LocalOrdinal constantBlockSize_;
198 std::map<GlobalOrdinal,LocalOrdinal> map_global_to_local_;
202 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
207 GlobalOrdinal indexBase = blockMap.
getPointMap()->getIndexBase();
Block-entry counterpart to Tpetra::Map.
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.
LocalOrdinal getLocalBlockID(GlobalOrdinal globalBlockID) const
Return the localBlockID corresponding to the given globalBlockID.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
global_size_t getGlobalNumBlocks() const
Return global number of blocks.
~BlockMap()
BlockMap destructor.
Teuchos::ArrayRCP< const LocalOrdinal > getNodeFirstPointInBlocks() const
Return ArrayRCP of first-local-point in local blocks.
bool isBlockSizeConstant() const
Return true if all blocks have the same size.
GlobalOrdinal getGlobalBlockID(LocalOrdinal localBlockID) const
Return the globalBlockID corresponding to the given localBlockID.
size_t global_size_t
Global size_t object.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
LocalOrdinal getLocalBlockSize(LocalOrdinal localBlockID) const
Return the block-size for 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...
size_t getNodeNumBlocks() const
Return number of blocks on the local processor.
Describes a parallel distribution of objects over processes.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getPointMap() const
Return this block-map's point-entry map attribute.
Teuchos::ArrayView< const GlobalOrdinal > getNodeBlockIDs() const
Return array-view of block-ids for this local processor.
GlobalOrdinal getFirstGlobalPointInLocalBlock(LocalOrdinal localBlockID) const
Return the first global point-index corresponding to localBlockID.
LocalOrdinal getFirstLocalPointInLocalBlock(LocalOrdinal localBlockID) const
Return the first local point-index corresponding to localBlockID.
Teuchos::ArrayRCP< const LocalOrdinal > getNodeFirstPointInBlocks_Device() const
Return device-resident ArrayRCP of first-local-point in local blocks.