12 #ifndef XPETRA_STRIDEDMAP_DEF_HPP
13 #define XPETRA_STRIDEDMAP_DEF_HPP
15 #include "Xpetra_StridedMap.hpp"
17 #include <Teuchos_OrdinalTraits.hpp>
20 #include "Xpetra_MapFactory.hpp"
24 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
28 GlobalOrdinal indexBase,
29 std::vector<size_t>& stridingInfo,
30 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
31 LocalOrdinal stridedBlockId,
34 : stridingInfo_(stridingInfo)
35 , stridedBlockId_(stridedBlockId)
37 , indexBase_(indexBase) {
42 TEUCHOS_TEST_FOR_EXCEPTION(stridingInfo.size() == 0,
44 "StridedMap::StridedMap: stridingInfo not valid: stridingInfo.size() = 0?");
46 TEUCHOS_TEST_FOR_EXCEPTION(numGlobalElements == Teuchos::OrdinalTraits<global_size_t>::invalid(),
47 std::invalid_argument,
48 "StridedMap::StridedMap: numGlobalElements is invalid");
50 TEUCHOS_TEST_FOR_EXCEPTION(numGlobalElements % blkSize != 0,
52 "StridedMap::StridedMap: stridingInfo not valid: getFixedBlockSize "
53 "is not an integer multiple of numGlobalElements.");
55 if (stridedBlockId != -1) {
56 TEUCHOS_TEST_FOR_EXCEPTION(stridingInfo.size() <
static_cast<size_t>(stridedBlockId),
58 "StridedTpetraMap::StridedTpetraMap: "
59 "stridedBlockId > stridingInfo.size()");
63 if (blkSize != 1 ||
offset_ != 0) {
68 RCP<Map> nodeMap = MapFactory_t::Build(xlib, numGlobalNodes, indexBase, comm, lg);
72 size_t nStridedOffset = 0;
73 size_t nDofsPerNode = blkSize;
74 if (stridedBlockId > -1) {
75 for (
int j = 0; j < stridedBlockId; j++) {
80 numGlobalElements = numGlobalNodes * Teuchos::as<global_size_t>(nDofsPerNode);
82 size_t numLocalElements = numLocalNodes * Teuchos::as<size_t>(nDofsPerNode);
84 std::vector<GlobalOrdinal> dofgids(numLocalElements);
85 for (LocalOrdinal i = 0; i < Teuchos::as<LocalOrdinal>(numLocalNodes); i++) {
86 GlobalOrdinal nodeGID = nodeMap->getGlobalElement(i);
88 for (
size_t j = 0; j < nDofsPerNode; j++) {
89 dofgids[i * nDofsPerNode + j] =
indexBase_ +
offset_ + (nodeGID -
indexBase_) * Teuchos::as<GlobalOrdinal>(blkSize) + Teuchos::as<GlobalOrdinal>(nStridedOffset + j);
93 map_ = MapFactory_t::Build(xlib, numGlobalElements, dofgids, indexBase, comm);
95 if (stridedBlockId == -1) {
96 TEUCHOS_TEST_FOR_EXCEPTION(
getLocalNumElements() != Teuchos::as<size_t>(nodeMap->getLocalNumElements() * nDofsPerNode),
98 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
100 TEUCHOS_TEST_FOR_EXCEPTION(
getGlobalNumElements() != Teuchos::as<size_t>(nodeMap->getGlobalNumElements() * nDofsPerNode),
102 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
104 size_t nDofsInStridedBlock = stridingInfo[stridedBlockId];
105 TEUCHOS_TEST_FOR_EXCEPTION(
getLocalNumElements() != Teuchos::as<size_t>(nodeMap->getLocalNumElements() * nDofsInStridedBlock),
107 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
109 TEUCHOS_TEST_FOR_EXCEPTION(
getGlobalNumElements() != Teuchos::as<size_t>(nodeMap->getGlobalNumElements() * nDofsInStridedBlock),
111 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
114 map_ = MapFactory_t::Build(xlib, numGlobalElements, indexBase, comm, lg);
120 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
124 size_t numLocalElements,
125 GlobalOrdinal indexBase,
126 std::vector<size_t>& stridingInfo,
127 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
128 LocalOrdinal stridedBlockId,
129 GlobalOrdinal offset)
130 : stridingInfo_(stridingInfo)
131 , stridedBlockId_(stridedBlockId)
133 , indexBase_(indexBase) {
137 TEUCHOS_TEST_FOR_EXCEPTION(stridingInfo.size() == 0,
139 "StridedMap::StridedMap: stridingInfo not valid: stridingInfo.size() = 0?");
140 if (numGlobalElements != Teuchos::OrdinalTraits<global_size_t>::invalid()) {
141 TEUCHOS_TEST_FOR_EXCEPTION(numGlobalElements % blkSize != 0,
143 "StridedMap::StridedMap: stridingInfo not valid: getFixedBlockSize is not an integer "
144 "multiple of numGlobalElements.");
145 #ifdef HAVE_XPETRA_DEBUG
148 Teuchos::reduceAll(*comm, Teuchos::REDUCE_SUM, Teuchos::as<global_size_t>(numLocalElements), Teuchos::outArg(sumLocalElements));
150 TEUCHOS_TEST_FOR_EXCEPTION(sumLocalElements != numGlobalElements,
151 std::invalid_argument,
152 "StridedMap::StridedMap: sum of numbers of local elements is different from the provided "
153 "number of global elements.");
157 TEUCHOS_TEST_FOR_EXCEPTION(
158 numLocalElements % blkSize != 0,
160 "StridedMap::StridedMap: stridingInfo not valid: getFixedBlockSize is not an integer multiple of numLocalElements.");
162 if (stridedBlockId != -1) {
163 TEUCHOS_TEST_FOR_EXCEPTION(stridingInfo.size() < Teuchos::as<size_t>(stridedBlockId),
165 "StridedTpetraMap::StridedTpetraMap: stridedBlockId > stridingInfo.size()");
169 if (blkSize != 1 ||
offset_ != 0) {
171 global_size_t numGlobalNodes = Teuchos::OrdinalTraits<global_size_t>::invalid();
172 if (numGlobalElements != Teuchos::OrdinalTraits<global_size_t>::invalid()) {
173 numGlobalNodes = numGlobalElements / blkSize;
178 RCP<Map> nodeMap = MapFactory_t::Build(xlib, numGlobalNodes, numLocalNodes, indexBase, comm);
181 size_t nStridedOffset = 0;
182 size_t nDofsPerNode = blkSize;
183 if (stridedBlockId > -1) {
184 for (
int j = 0; j < stridedBlockId; j++) {
189 numGlobalElements = nodeMap->getGlobalNumElements() * Teuchos::as<global_size_t>(nDofsPerNode);
191 numLocalElements = numLocalNodes * Teuchos::as<size_t>(nDofsPerNode);
193 std::vector<GlobalOrdinal> dofgids(numLocalElements);
194 for (LocalOrdinal i = 0; i < Teuchos::as<LocalOrdinal>(numLocalNodes); i++) {
195 GlobalOrdinal nodeGID = nodeMap->getGlobalElement(i);
197 for (
size_t j = 0; j < nDofsPerNode; j++) {
198 dofgids[i * nDofsPerNode + j] =
indexBase_ +
offset_ + (nodeGID -
indexBase_) * Teuchos::as<GlobalOrdinal>(blkSize) + Teuchos::as<GlobalOrdinal>(nStridedOffset + j);
202 map_ = MapFactory_t::Build(xlib, numGlobalElements, dofgids, indexBase, comm);
204 if (stridedBlockId == -1) {
205 TEUCHOS_TEST_FOR_EXCEPTION(
getLocalNumElements() != Teuchos::as<size_t>(nodeMap->getLocalNumElements() * nDofsPerNode),
207 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
209 TEUCHOS_TEST_FOR_EXCEPTION(
getGlobalNumElements() != Teuchos::as<size_t>(nodeMap->getGlobalNumElements() * nDofsPerNode),
211 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
213 int nDofsInStridedBlock = stridingInfo[stridedBlockId];
215 TEUCHOS_TEST_FOR_EXCEPTION(
getLocalNumElements() != Teuchos::as<size_t>(nodeMap->getLocalNumElements() * nDofsInStridedBlock),
217 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
219 TEUCHOS_TEST_FOR_EXCEPTION(
getGlobalNumElements() != Teuchos::as<size_t>(nodeMap->getGlobalNumElements() * nDofsInStridedBlock),
221 "StridedTpetraMap::StridedTpetraMap: wrong distribution of dofs among processors.");
224 map_ = MapFactory_t::Build(xlib, numGlobalElements, numLocalElements, indexBase, comm);
230 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
234 const Teuchos::ArrayView<const GlobalOrdinal>& elementList,
235 GlobalOrdinal indexBase,
236 std::vector<size_t>& stridingInfo,
237 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
238 LocalOrdinal stridedBlockId)
239 : stridingInfo_(stridingInfo)
240 , stridedBlockId_(stridedBlockId)
241 , indexBase_(indexBase) {
246 TEUCHOS_TEST_FOR_EXCEPTION(stridingInfo.size() == 0,
248 "StridedMap::StridedMap: stridingInfo not valid: stridingInfo.size() = 0?");
249 if (stridedBlockId != -1)
250 TEUCHOS_TEST_FOR_EXCEPTION(stridingInfo.size() < Teuchos::as<size_t>(stridedBlockId),
252 "StridedTpetraMap::StridedTpetraMap: stridedBlockId > stridingInfo.size()");
253 if (numGlobalElements != Teuchos::OrdinalTraits<global_size_t>::invalid()) {
254 TEUCHOS_TEST_FOR_EXCEPTION(numGlobalElements % blkSize != 0,
256 "StridedMap::StridedMap: stridingInfo not valid: getFixedBlockSize is not an integer "
257 "multiple of numGlobalElements.");
258 #ifdef HAVE_XPETRA_DEBUG
260 global_size_t sumLocalElements, numLocalElements = elementList.size();
261 Teuchos::reduceAll(*comm, Teuchos::REDUCE_SUM, numLocalElements, Teuchos::outArg(sumLocalElements));
262 TEUCHOS_TEST_FOR_EXCEPTION(sumLocalElements != numGlobalElements,
263 std::invalid_argument,
264 "StridedMap::StridedMap: sum of numbers of local elements is different from the provided "
265 "number of global elements.");
269 if (stridedBlockId == -1) {
274 TEUCHOS_TEST_FOR_EXCEPTION(elementList.size() % blkSize != 0,
276 "StridedMap::StridedMap: stridingInfo not valid: getFixedBlockSize is not an integer "
277 "multiple of elementList.size().");
283 TEUCHOS_TEST_FOR_EXCEPTION(elementList.size() % stridingInfo[stridedBlockId] != 0,
285 "StridedMap::StridedMap: stridingInfo not valid: stridingBlockInfo[stridedBlockId] is not "
286 "an integer multiple of elementList.size().");
289 map_ = MapFactory_t::Build(xlib, numGlobalElements, elementList, indexBase, comm);
294 GlobalOrdinal minGidOnCurProc = Teuchos::OrdinalTraits<GlobalOrdinal>::max();
295 for (Teuchos_Ordinal k = 0; k < elementList.size(); k++)
297 if (elementList[k] < minGidOnCurProc) {
298 minGidOnCurProc = elementList[k];
302 Teuchos::reduceAll(*comm, Teuchos::REDUCE_MIN, minGidOnCurProc, Teuchos::outArg(
offset_));
305 size_t nStridedOffset = 0;
306 for (
int j = 0; j < stridedBlockId; j++) {
307 nStridedOffset += stridingInfo[j];
309 const GlobalOrdinal goStridedOffset = Teuchos::as<GlobalOrdinal>(nStridedOffset);
317 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
320 std::vector<size_t>& stridingInfo,
322 LocalOrdinal stridedBlockId,
323 GlobalOrdinal offset)
324 : stridingInfo_(stridingInfo)
325 , stridedBlockId_(stridedBlockId)
327 , indexBase_(map->getIndexBase()) {
332 if (Teuchos::rcp_dynamic_cast<const StridedMap>(map) == Teuchos::null) {
335 map_ = map->getMap();
339 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
344 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
348 return stridingInfo_;
351 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
354 stridingInfo_ = stridingInfo;
357 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
362 for (std::vector<size_t>::const_iterator it = stridingInfo_.begin(); it != stridingInfo_.end(); ++it) {
368 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
372 return stridedBlockId_;
375 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
378 return stridingInfo_.size() > 1 ?
true :
false;
381 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
384 return getFixedBlockSize() > 1 ?
true :
false;
387 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
394 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
400 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
404 GlobalOrdinal tgid = gid - offset_ - indexBase_;
405 tgid = tgid % getFixedBlockSize();
407 size_t nStridedOffset = 0;
408 size_t stridedBlockId = 0;
409 for (
size_t j = 0; j < stridingInfo_.size(); j++) {
410 nStridedOffset += stridingInfo_[j];
411 if (Teuchos::as<size_t>(tgid) < nStridedOffset) {
416 return stridedBlockId;
419 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
420 RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
426 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
429 #ifndef HAVE_XPETRA_DEBUG
432 if (getStridedBlockId() == -1) {
434 if (getLocalNumElements() % getFixedBlockSize() != 0 ||
435 getGlobalNumElements() % getFixedBlockSize() != 0)
439 Teuchos::ArrayView<const GlobalOrdinal> dofGids = getLocalElementList();
442 if (dofGids.size() == 0)
447 if (dofGids.size() % stridingInfo_[stridedBlockId_] != 0) {
452 size_t nStridedOffset = 0;
453 for (
int j = 0; j < stridedBlockId_; j++) {
454 nStridedOffset += stridingInfo_[j];
457 const GlobalOrdinal goStridedOffset = Teuchos::as<GlobalOrdinal>(nStridedOffset);
458 const GlobalOrdinal goZeroOffset = (dofGids[0] - nStridedOffset - offset_ - indexBase_) / Teuchos::as<GlobalOrdinal>(getFixedBlockSize());
460 GlobalOrdinal cnt = 0;
462 i < Teuchos::as<size_t>(dofGids.size()) / stridingInfo_[stridedBlockId_];
463 i += stridingInfo_[stridedBlockId_]) {
464 const GlobalOrdinal first_gid = dofGids[i];
467 cnt = (first_gid - goStridedOffset - offset_ - indexBase_) / Teuchos::as<GlobalOrdinal>(getFixedBlockSize()) - goZeroOffset;
470 for (
size_t j = 0; j < stridingInfo_[stridedBlockId_]; j++) {
471 const GlobalOrdinal gid = dofGids[i + j];
472 const GlobalOrdinal r = (gid - Teuchos::as<GlobalOrdinal>(j) - goStridedOffset - offset_ - indexBase_) / Teuchos::as<GlobalOrdinal>(getFixedBlockSize()) - goZeroOffset - cnt;
478 std::cout <<
"goZeroOffset : " << goZeroOffset << std::endl
479 <<
"dofGids[0] : " << dofGids[0] << std::endl
480 <<
"stridedOffset : " << nStridedOffset << std::endl
481 <<
"offset_ : " << offset_ << std::endl
482 <<
"goStridedOffset: " << goStridedOffset << std::endl
483 <<
"getFixedBlkSize: " << getFixedBlockSize() << std::endl
484 <<
"gid: " << gid <<
" GID: " << r << std::endl;
496 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
500 return map_->getGlobalNumElements();
503 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
507 return map_->getLocalNumElements();
510 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
514 return map_->getIndexBase();
517 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
521 return map_->getMinLocalIndex();
524 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
528 return map_->getMaxLocalIndex();
531 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
535 return map_->getMinGlobalIndex();
538 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
542 return map_->getMaxGlobalIndex();
545 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
549 return map_->getMinAllGlobalIndex();
552 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
556 return map_->getMaxAllGlobalIndex();
559 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
563 return map_->getLocalElement(globalIndex);
566 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
570 return map_->getGlobalElement(localIndex);
573 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
577 const Teuchos::ArrayView<int>& nodeIDList,
578 const Teuchos::ArrayView<LocalOrdinal>& LIDList)
const {
579 return map_->getRemoteIndexList(GIDList, nodeIDList, LIDList);
582 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
586 const Teuchos::ArrayView<int>& nodeIDList)
const {
587 return map_->getRemoteIndexList(GIDList, nodeIDList);
590 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
591 Teuchos::ArrayView<const GlobalOrdinal>
594 return map_->getLocalElementList();
597 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
601 return map_->getMyGlobalIndicesDevice();
604 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
607 return map_->isNodeLocalElement(localIndex);
610 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
613 return map_->isNodeGlobalElement(globalIndex);
616 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
619 return map_->isContiguous();
622 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
625 return map_->isDistributed();
628 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
631 return map_->isCompatible(map);
634 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
637 return map_->isSameAs(map);
640 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
641 Teuchos::RCP<const Teuchos::Comm<int>>
644 return map_->getComm();
647 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
648 RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
651 return map_->removeEmptyProcesses();
654 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
655 RCP<const Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>>
658 return map_->replaceCommWithSubset(newComm);
661 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
665 return map_->description();
668 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
670 describe(Teuchos::FancyOStream& out,
const Teuchos::EVerbosityLevel verbLevel)
const {
671 map_->describe(out, verbLevel);
674 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
683 #endif // XPETRA_STRIDEDMAP_DEF_HPP
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a list of the global indices owned by this node.
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
bool isContiguous() const
Returns true if this Map is distributed contiguously; returns false otherwise.
void setStridingData(std::vector< size_t > stridingInfo)
size_t getLocalNumElements() const
Returns the number of elements belonging to the calling node.
GlobalOrdinal indexBase_
Index base for the strided map (default = 0)
GlobalOrdinal getOffset() const
Exception throws to report errors in the internal logical of the program.
LocalOrdinal getMaxLocalIndex() const
Returns maximum local index.
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
global_indices_array_device_type getMyGlobalIndicesDevice() const
Return a view of the global indices owned by this process on the Map's device.
GlobalOrdinal offset_
Offset for gids in map (default = 0)
GlobalOrdinal getMinGlobalIndex() const
Returns minimum global index owned by this node.
size_t global_size_t
Global size_t object.
GlobalOrdinal getIndexBase() const
Returns the index base for this Map.
RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
global_size_t getGlobalNumElements() const
Returns the number of elements in this Map.
Kokkos::View< const global_ordinal_type *, typename Node::device_type > global_indices_array_device_type
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.
Create an Xpetra::Map instance.
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_