49 #ifndef XPETRA_STRIDEDMAP_DECL_HPP
50 #define XPETRA_STRIDEDMAP_DECL_HPP
53 #include <Teuchos_Describable.hpp>
56 #include "Xpetra_Map.hpp"
88 template<
class LocalOrdinal,
91 class StridedMap :
public virtual Map<LocalOrdinal, GlobalOrdinal, Node>
106 #undef XPETRA_STRIDEDMAP_SHORT
135 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
139 GlobalOrdinal indexBase,
140 std::vector<size_t>& stridingInfo,
142 LocalOrdinal stridedBlockId,
143 GlobalOrdinal offset,
146 #endif // #ifdef TPETRA_ENABLE_DEPRECATED_CODE
151 GlobalOrdinal indexBase,
152 std::vector<size_t>& stridingInfo,
154 LocalOrdinal stridedBlockId = -1,
155 GlobalOrdinal offset = 0,
180 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
184 size_t numLocalElements,
185 GlobalOrdinal indexBase,
186 std::vector<size_t>& stridingInfo,
188 LocalOrdinal stridedBlockId,
189 GlobalOrdinal offset,
191 #endif // TPETRA_ENABLE_DEPRECATED_CODE
196 size_t numLocalElements,
197 GlobalOrdinal indexBase,
198 std::vector<size_t>& stridingInfo,
200 LocalOrdinal stridedBlockId = -1,
201 GlobalOrdinal offset = 0);
214 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
219 GlobalOrdinal indexBase,
220 std::vector<size_t>& stridingInfo,
222 LocalOrdinal stridedBlockId,
224 #endif // TPETRA_ENABLE_DEPRECATED_CODE
230 GlobalOrdinal indexBase,
231 std::vector<size_t>& stridingInfo,
233 LocalOrdinal stridedBlockId = -1);
237 std::vector<size_t>& stridingInfo,
239 LocalOrdinal stridedBlockId = -1,
240 GlobalOrdinal offset = 0);
292 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
293 #ifdef HAVE_XPETRA_TPETRA
297 local_map_type getLocalMap()
const
299 return map_->getLocalMap();
301 #else // HAVE_XPETRA_TPETRA
304 "Xpetra Kokkos interface for CrsMatrix is enabled (HAVE_XPETRA_KOKKOS_REFACTOR) but Tpetra is disabled. The Kokkos interface needs Tpetra to be enabled, too."
306 #endif // HAVE_XPETRA_TPETRA ELSE
307 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
461 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
464 #endif // TPETRA_ENABLE_DEPRECATED_CODE
492 #define XPETRA_STRIDEDMAP_SHORT
493 #endif // XPETRA_STRIDEDMAP_DECL_HPP
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Returns the node IDs and corresponding local indices for a given list of global indices.
LocalOrdinal getStridedBlockId() const
GlobalOrdinal getMaxGlobalIndex() const
Returns maximum global index owned by this node.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
Return the global index for a given local index.
size_t GID2StridingBlockId(GlobalOrdinal gid) const
LocalOrdinal local_ordinal_type
GlobalOrdinal global_ordinal_type
bool isContiguous() const
Returns true if this Map is distributed contiguously; returns false otherwise.
void setStridingData(std::vector< size_t > stridingInfo)
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a list of the global indices owned by this node.
GlobalOrdinal indexBase_
index base for the strided map (default = 0)
GlobalOrdinal getOffset() const
LocalOrdinal getMaxLocalIndex() const
Returns maximum local index.
LocalOrdinal stridedBlockId_
member variable denoting which dofs are stored in map
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get the Comm object for this Map.
bool isCompatible(const Map &map) const
Returns true if map is compatible with this Map.
std::string description() const
Return a simple one-line description of this object.
GlobalOrdinal getMaxAllGlobalIndex() const
Return the maximum global index over all nodes.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
Returns true if the global index is found in this Map on this node; returns false if it isn't...
bool isNodeLocalElement(LocalOrdinal localIndex) const
Returns true if the local index is valid for this Map on this node; returns false if it isn't...
bool isStrided() const
returns true, if this is a strided map (i.e. more than 1 strided blocks)
bool isSameAs(const Map &map) const
Returns true if map is identical to this Map.
std::vector< size_t > stridingInfo_
vector with size of strided blocks (dofs)
RCP< const Map > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
RCP< const Map > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int >> &newComm) const
bool isDistributed() const
Returns true if this Map is distributed across more than one node; returns false otherwise.
size_t getFixedBlockSize() const
GlobalOrdinal offset_
offset for gids in map (default = 0)
GlobalOrdinal getMinGlobalIndex() const
Returns minimum global index owned by this node.
size_t getNodeNumElements() const
Returns the number of elements belonging to the calling node.
size_t global_size_t
Global size_t object.
GlobalOrdinal getIndexBase() const
Returns the index base for this Map.
static const EVerbosityLevel verbLevel_default
RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
global_size_t getGlobalNumElements() const
Returns the number of elements in this Map.
virtual bool CheckConsistency()
std::vector< size_t > getStridingData() const
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
Return the local index for a given global index.
StridedMap(UnderlyingLib xlib, global_size_t numGlobalElements, GlobalOrdinal indexBase, std::vector< size_t > &stridingInfo, const Teuchos::RCP< const Teuchos::Comm< int >> &comm, LocalOrdinal stridedBlockId=-1, GlobalOrdinal offset=0, LocalGlobal lg=GloballyDistributed)
Map constructor with contiguous uniform distribution.
LocalOrdinal getMinLocalIndex() const
Returns minimum local index.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
GlobalOrdinal getMinAllGlobalIndex() const
Return the minimum global index over all nodes.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to a FancyOStream object.
virtual ~StridedMap()
Destructor.
void setOffset(GlobalOrdinal offset)
RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > map_