Protected Attributes | Private Member Functions | List of all members
Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node > Class Template Referenceabstract

Class that stores a strided map. More...

#include <Xpetra_StridedMap_fwd.hpp>

Inheritance diagram for Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > Xpetra::StridedTpetraMap< LocalOrdinal, GlobalOrdinal, Node >

Protected Attributes

std::vector< size_t > stridingInfo_
 vector with size of strided blocks (dofs) More...
 
LocalOrdinal stridedBlockId_
 member variable denoting which dofs are stored in map More...
 
GlobalOrdinal offset_
 offset for gids in map (default = 0) More...
 
GlobalOrdinal indexBase_
 index base for the strided map (default = 0) More...
 

Private Member Functions

virtual bool CheckConsistency ()=0
 

Constructor/Destructor Methods

 StridedMap (global_size_t numGlobalElements, GlobalOrdinal indexBase, std::vector< size_t > &stridingInfo, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalOrdinal stridedBlockId, GlobalOrdinal offset=0)
 
 StridedMap (global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, std::vector< size_t > &stridingInfo, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalOrdinal stridedBlockId, GlobalOrdinal offset=0)
 
 StridedMap (std::vector< size_t > &stridingInfo, GlobalOrdinal indexBase, LocalOrdinal stridedBlockId, GlobalOrdinal offset=0)
 
 StridedMap (global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, std::vector< size_t > &stridingInfo, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalOrdinal stridedBlockId=-1)
 
virtual ~StridedMap ()
 Destructor. More...
 

Access functions for striding data

std::vector< size_t > getStridingData () const
 
void setStridingData (std::vector< size_t > stridingInfo)
 
size_t getFixedBlockSize () const
 
LocalOrdinal getStridedBlockId () const
 
bool isStrided ()
 returns true, if this is a strided map (i.e. more than 1 strided blocks) More...
 
bool isBlocked ()
 
GlobalOrdinal getOffset () const
 
void setOffset (GlobalOrdinal offset)
 
size_t GID2StridingBlockId (GlobalOrdinal gid) const
 

Additional Inherited Members

- Public Member Functions inherited from Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >
virtual ~Map ()
 Destructor. More...
 
virtual global_size_t getGlobalNumElements () const =0
 The number of elements in this Map. More...
 
virtual size_t getNodeNumElements () const =0
 The number of elements belonging to the calling node. More...
 
virtual GlobalOrdinal getIndexBase () const =0
 The index base for this Map. More...
 
virtual LocalOrdinal getMinLocalIndex () const =0
 The minimum local index. More...
 
virtual LocalOrdinal getMaxLocalIndex () const =0
 The maximum local index on the calling process. More...
 
virtual GlobalOrdinal getMinGlobalIndex () const =0
 The minimum global index owned by the calling process. More...
 
virtual GlobalOrdinal getMaxGlobalIndex () const =0
 The maximum global index owned by the calling process. More...
 
virtual GlobalOrdinal getMinAllGlobalIndex () const =0
 The minimum global index over all processes in the communicator. More...
 
virtual GlobalOrdinal getMaxAllGlobalIndex () const =0
 The maximum global index over all processes in the communicator. More...
 
virtual LocalOrdinal getLocalElement (GlobalOrdinal globalIndex) const =0
 The local index corresponding to the given global index. More...
 
virtual GlobalOrdinal getGlobalElement (LocalOrdinal localIndex) const =0
 The global index corresponding to the given local index. More...
 
virtual LookupStatus getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const =0
 Return the process IDs and corresponding local IDs for the given global IDs. More...
 
virtual LookupStatus getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const =0
 Return the process IDs for the given global IDs. More...
 
virtual Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList () const =0
 Return a view of the global indices owned by this node. More...
 
virtual bool isNodeLocalElement (LocalOrdinal localIndex) const =0
 True if the local index is valid for this Map on this node, else false. More...
 
virtual bool isNodeGlobalElement (GlobalOrdinal globalIndex) const =0
 True if the global index is found in this Map on this node, else false. More...
 
virtual bool isContiguous () const =0
 True if this Map is distributed contiguously, else false. More...
 
virtual bool isDistributed () const =0
 Whether this Map is globally distributed or locally replicated. More...
 
virtual bool isCompatible (const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const =0
 True if and only if map is compatible with this Map. More...
 
virtual bool isSameAs (const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const =0
 True if and only if map is identical to this Map. More...
 
virtual const Teuchos::RCP< const Teuchos::Comm< int > > getComm () const =0
 Get this Map's Comm object. More...
 
virtual const Teuchos::RCP< Node > getNode () const =0
 Get this Map's Node object. More...
 
virtual std::string description () const =0
 Return a simple one-line description of this object. More...
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const =0
 Print this object with the given verbosity level to the given FancyOStream. More...
 
virtual RCP< const Map > removeEmptyProcesses () const =0
 
virtual RCP< const Map > replaceCommWithSubset (const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const =0
 
virtual UnderlyingLib lib () const =0
 Get the library used by this object (Tpetra or Epetra?) More...
 

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >

Class that stores a strided map.

StridedMap extends the functionality of Xpetra::Map

It derives from Xpetra::Map and adds a std::vector, which contains the striding information. E.g. for a strided map with 3dofs per node (2 velocity dofs, 1 pressure dof) the striding information looks like: std::vector<size_t> stridingInformation; stridingInformation.push_back(2); // 2 velocity dofs stridingInformation.push_back(1); // 1 pressure dof

For this example the getFixedBlockSize() returns 3 (3 dofs per node). Providing a stridedBlockId parameter in the constructor the strided map only contains dofs of one strided block, e.g. with above stridingInformation the call

StridingMap M(33,0,stridiningInformation,comm,0); // striding block 0 (velocity dofs) returns a map with the gids 0, 1, 3, 4, 6, 7, ... (which contains only the velocity dofs)

and StridingMap M(33,0,stridiningInformation,comm,1); // striding block 1 (pressure dofs) creates a map with only the pressure dofs 2, 5, 8, ...

Note
: there's no support for global offset, yet.

Definition at line 51 of file Xpetra_StridedMap_fwd.hpp.

Constructor & Destructor Documentation

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::StridedMap ( global_size_t  numGlobalElements,
GlobalOrdinal  indexBase,
std::vector< size_t > &  stridingInfo,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
LocalOrdinal  stridedBlockId,
GlobalOrdinal  offset = 0 
)
inline

Definition at line 111 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::StridedMap ( global_size_t  numGlobalElements,
size_t  numLocalElements,
GlobalOrdinal  indexBase,
std::vector< size_t > &  stridingInfo,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
LocalOrdinal  stridedBlockId,
GlobalOrdinal  offset = 0 
)
inline

Definition at line 121 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::StridedMap ( std::vector< size_t > &  stridingInfo,
GlobalOrdinal  indexBase,
LocalOrdinal  stridedBlockId,
GlobalOrdinal  offset = 0 
)
inline

Definition at line 132 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::StridedMap ( global_size_t  numGlobalElements,
const Teuchos::ArrayView< const GlobalOrdinal > &  elementList,
GlobalOrdinal  indexBase,
std::vector< size_t > &  stridingInfo,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
LocalOrdinal  stridedBlockId = -1 
)
inline

Definition at line 138 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::~StridedMap ( )
inlinevirtual

Destructor.

Definition at line 177 of file Xpetra_StridedMap.hpp.

Member Function Documentation

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
std::vector<size_t> Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::getStridingData ( ) const
inline

Definition at line 184 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
void Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::setStridingData ( std::vector< size_t >  stridingInfo)
inline

Definition at line 186 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
size_t Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::getFixedBlockSize ( ) const
inline

Definition at line 188 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
LocalOrdinal Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::getStridedBlockId ( ) const
inline

returns strided block id of the dofs stored in this map or -1 if full strided map is stored in this map

Definition at line 197 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
bool Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::isStrided ( )
inline

returns true, if this is a strided map (i.e. more than 1 strided blocks)

Definition at line 200 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
bool Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::isBlocked ( )
inline

returns true, if this is a blocked map (i.e. more than 1 dof per node) either strided or just 1 block per node

Definition at line 204 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
GlobalOrdinal Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::getOffset ( ) const
inline

Definition at line 206 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
void Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::setOffset ( GlobalOrdinal  offset)
inline

Definition at line 208 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
size_t Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::GID2StridingBlockId ( GlobalOrdinal  gid) const
inline

Definition at line 211 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::CheckConsistency ( )
privatepure virtual

Member Data Documentation

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
std::vector<size_t> Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::stridingInfo_
protected

vector with size of strided blocks (dofs)

Definition at line 265 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
LocalOrdinal Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::stridedBlockId_
protected

member variable denoting which dofs are stored in map

Definition at line 266 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
GlobalOrdinal Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::offset_
protected

offset for gids in map (default = 0)

Definition at line 269 of file Xpetra_StridedMap.hpp.

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
GlobalOrdinal Xpetra::StridedMap< LocalOrdinal, GlobalOrdinal, Node >::indexBase_
protected

index base for the strided map (default = 0)

Definition at line 270 of file Xpetra_StridedMap.hpp.


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