Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_TpetraMap_def.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef XPETRA_TPETRAMAP_DEF_HPP
11#define XPETRA_TPETRAMAP_DEF_HPP
12
14
15namespace Xpetra {
16
18
19
20template <class LocalOrdinal, class GlobalOrdinal, class Node>
22 TpetraMap(global_size_t numGlobalElements,
23 GlobalOrdinal indexBase,
24 const Teuchos::RCP<const Teuchos::Comm<int> > &comm,
25 LocalGlobal lg)
26 : map_(Teuchos::rcp(new Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node>(numGlobalElements,
27 indexBase, comm,
28 toTpetra(lg)))) {}
29
31
32template <class LocalOrdinal, class GlobalOrdinal, class Node>
34 TpetraMap(global_size_t numGlobalElements,
35 size_t numLocalElements,
36 GlobalOrdinal indexBase,
37 const Teuchos::RCP<const Teuchos::Comm<int> > &comm)
38 : map_(Teuchos::rcp(new Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node>(numGlobalElements,
39 numLocalElements,
40 indexBase, comm))) {}
41
43
44template <class LocalOrdinal, class GlobalOrdinal, class Node>
46 TpetraMap(global_size_t numGlobalElements,
48 GlobalOrdinal indexBase,
49 const Teuchos::RCP<const Teuchos::Comm<int> > &comm)
50 : map_(Teuchos::rcp(new Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node>(numGlobalElements,
51 elementList,
52 indexBase,
53 comm))) {}
54
55#ifdef HAVE_XPETRA_TPETRA
56
58template <class LocalOrdinal, class GlobalOrdinal, class Node>
60 TpetraMap(global_size_t numGlobalElements,
61 const Kokkos::View<const GlobalOrdinal *, typename Node::device_type> &indexList,
62 GlobalOrdinal indexBase,
63 const Teuchos::RCP<const Teuchos::Comm<int> > &comm)
64 : map_(Teuchos::rcp(new Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node>(numGlobalElements,
65 indexList,
66 indexBase,
67 comm))) {}
68#endif
69
71template <class LocalOrdinal, class GlobalOrdinal, class Node>
73
75
76template <class LocalOrdinal, class GlobalOrdinal, class Node>
78 XPETRA_MONITOR("TpetraMap::getGlobalNumElements");
79 return map_->getGlobalNumElements();
80}
81
82template <class LocalOrdinal, class GlobalOrdinal, class Node>
84 XPETRA_MONITOR("TpetraMap::getLocalNumElements");
85 return map_->getLocalNumElements();
86}
87
88template <class LocalOrdinal, class GlobalOrdinal, class Node>
90 XPETRA_MONITOR("TpetraMap::getIndexBase");
91 return map_->getIndexBase();
92}
93
94template <class LocalOrdinal, class GlobalOrdinal, class Node>
96 XPETRA_MONITOR("TpetraMap::getMinLocalIndex");
97 return map_->getMinLocalIndex();
98}
99
100template <class LocalOrdinal, class GlobalOrdinal, class Node>
102 XPETRA_MONITOR("TpetraMap::getMaxLocalIndex");
103 return map_->getMaxLocalIndex();
104}
105
106template <class LocalOrdinal, class GlobalOrdinal, class Node>
108 XPETRA_MONITOR("TpetraMap::getMinGlobalIndex");
109 return map_->getMinGlobalIndex();
110}
111
112template <class LocalOrdinal, class GlobalOrdinal, class Node>
114 XPETRA_MONITOR("TpetraMap::getMaxGlobalIndex");
115 return map_->getMaxGlobalIndex();
116}
117
118template <class LocalOrdinal, class GlobalOrdinal, class Node>
120 XPETRA_MONITOR("TpetraMap::getMinAllGlobalIndex");
121 return map_->getMinAllGlobalIndex();
122}
123
124template <class LocalOrdinal, class GlobalOrdinal, class Node>
126 XPETRA_MONITOR("TpetraMap::getMaxAllGlobalIndex");
127 return map_->getMaxAllGlobalIndex();
128}
129
130template <class LocalOrdinal, class GlobalOrdinal, class Node>
131LocalOrdinal TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getLocalElement(GlobalOrdinal globalIndex) const {
132 XPETRA_MONITOR("TpetraMap::getLocalElement");
133 return map_->getLocalElement(globalIndex);
134}
135
136template <class LocalOrdinal, class GlobalOrdinal, class Node>
137GlobalOrdinal TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getGlobalElement(LocalOrdinal localIndex) const {
138 XPETRA_MONITOR("TpetraMap::getGlobalElement");
139 return map_->getGlobalElement(localIndex);
140}
141
142template <class LocalOrdinal, class GlobalOrdinal, class Node>
144 XPETRA_MONITOR("TpetraMap::getRemoteIndexList");
145 return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList, LIDList));
146}
147
148template <class LocalOrdinal, class GlobalOrdinal, class Node>
150 XPETRA_MONITOR("TpetraMap::getRemoteIndexList");
151 return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList));
152}
153
154template <class LocalOrdinal, class GlobalOrdinal, class Node>
156 XPETRA_MONITOR("TpetraMap::getLocalElementList");
157 return map_->getLocalElementList();
158}
159
160template <class LocalOrdinal, class GlobalOrdinal, class Node>
162 XPETRA_MONITOR("TpetraMap::getMyGlobalIndicesDevice");
163 return map_->getMyGlobalIndicesDevice();
164}
165
166template <class LocalOrdinal, class GlobalOrdinal, class Node>
168 XPETRA_MONITOR("TpetraMap::isNodeLocalElement");
169 return map_->isNodeLocalElement(localIndex);
170}
171
172template <class LocalOrdinal, class GlobalOrdinal, class Node>
174 XPETRA_MONITOR("TpetraMap::isNodeGlobalElement");
175 return map_->isNodeGlobalElement(globalIndex);
176}
177
178template <class LocalOrdinal, class GlobalOrdinal, class Node>
180 XPETRA_MONITOR("TpetraMap::isContiguous");
181 return map_->isContiguous();
182}
183
184template <class LocalOrdinal, class GlobalOrdinal, class Node>
186 XPETRA_MONITOR("TpetraMap::isDistributed");
187 return map_->isDistributed();
188}
189
190template <class LocalOrdinal, class GlobalOrdinal, class Node>
192 XPETRA_MONITOR("TpetraMap::isCompatible");
193 return map_->isCompatible(toTpetra(map));
194}
195
196template <class LocalOrdinal, class GlobalOrdinal, class Node>
198 XPETRA_MONITOR("TpetraMap::isSameAs");
199 return map_->isSameAs(toTpetra(map));
200}
201
202template <class LocalOrdinal, class GlobalOrdinal, class Node>
204 XPETRA_MONITOR("TpetraMap::getComm");
205 return map_->getComm();
206}
207
208template <class LocalOrdinal, class GlobalOrdinal, class Node>
210 XPETRA_MONITOR("TpetraMap::description");
211 return map_->description();
212}
213
214template <class LocalOrdinal, class GlobalOrdinal, class Node>
216 XPETRA_MONITOR("TpetraMap::describe");
217 map_->describe(out, verbLevel);
218}
219
220template <class LocalOrdinal, class GlobalOrdinal, class Node>
224
225template <class LocalOrdinal, class GlobalOrdinal, class Node>
229
230template <class LocalOrdinal, class GlobalOrdinal, class Node>
231TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > &map)
232 : map_(map) {}
233
234template <class LocalOrdinal, class GlobalOrdinal, class Node>
236
237template <class LocalOrdinal, class GlobalOrdinal, class Node>
239
240#ifdef HAVE_XPETRA_TPETRA
241
242template <class LocalOrdinal, class GlobalOrdinal, class Node>
246#endif
247
248#ifdef HAVE_XPETRA_EPETRA
249
250#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
251 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
252
253// specialization for Tpetra Map on EpetraNode and GO=int
254template <>
255class TpetraMap<int, int, EpetraNode>
256 : public virtual Map<int, int, EpetraNode> {
257 public:
258 typedef int GlobalOrdinal;
259 typedef int LocalOrdinal;
261
263
264
266
273
275
276 TpetraMap(global_size_t numGlobalElements,
277 size_t numLocalElements,
278 GlobalOrdinal indexBase,
279 const Teuchos::RCP<const Teuchos::Comm<int> > &comm) {
281 }
282
284
291
294
296
298
299
302
304 size_t getLocalNumElements() const { return 0; }
305
307 GlobalOrdinal getIndexBase() const { return 0; }
308
310 LocalOrdinal getMinLocalIndex() const { return 0; }
311
313 LocalOrdinal getMaxLocalIndex() const { return 0; }
314
316 GlobalOrdinal getMinGlobalIndex() const { return 0; }
317
319 GlobalOrdinal getMaxGlobalIndex() const { return 0; }
320
323
326
328 LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
329
331 GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
332
335
338
341
343
345
346
348 bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; }
349
351 bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; }
352
354 bool isContiguous() const { return false; }
355
357 bool isDistributed() const { return false; }
358
360 bool isCompatible(const Map<LocalOrdinal, GlobalOrdinal, Node> &map) const { return false; }
361
363 bool isSameAs(const Map<LocalOrdinal, GlobalOrdinal, Node> &map) const { return false; }
364
366
368
369
371 Teuchos::RCP<const Teuchos::Comm<int> > getComm() const { return Teuchos::null; }
372
374
376
377
379 std::string description() const { return std::string(""); }
380
383
386
388
390
391
393 TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > &map) {
395 }
396
398 UnderlyingLib lib() const { return UseTpetra; }
399
402
403#ifdef HAVE_XPETRA_TPETRA
407 return local_map_type();
408 }
409#endif
410
412
413}; // TpetraMap class (specialization for GO=int and NO=EpetraNode)
414#endif
415
416#if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
417 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
418// specialization for Tpetra Map on EpetraNode and GO=int
419template <>
420class TpetraMap<int, long long, EpetraNode>
421 : public virtual Map<int, long long, EpetraNode> {
422 public:
423 typedef long long GlobalOrdinal;
424 typedef int LocalOrdinal;
426
428
429
437
439 TpetraMap(global_size_t numGlobalElements,
440 size_t numLocalElements,
441 GlobalOrdinal indexBase,
442 const Teuchos::RCP<const Teuchos::Comm<int> > &comm) {
444 }
445
447 TpetraMap(global_size_t numGlobalElements,
449 GlobalOrdinal indexBase,
450 const Teuchos::RCP<const Teuchos::Comm<int> > &comm) {
452 }
453
456
458
460
461
464
466 size_t getLocalNumElements() const { return 0; }
467
469 GlobalOrdinal getIndexBase() const { return 0; }
470
472 LocalOrdinal getMinLocalIndex() const { return 0; }
473
475 LocalOrdinal getMaxLocalIndex() const { return 0; }
476
478 GlobalOrdinal getMinGlobalIndex() const { return 0; }
479
481 GlobalOrdinal getMaxGlobalIndex() const { return 0; }
482
485
488
490 LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
491
493 GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
494
497
500
503
505
507
508
510 bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; }
511
513 bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; }
514
516 bool isContiguous() const { return false; }
517
519 bool isDistributed() const { return false; }
520
522 bool isCompatible(const Map<LocalOrdinal, GlobalOrdinal, Node> &map) const { return false; }
523
525 bool isSameAs(const Map<LocalOrdinal, GlobalOrdinal, Node> &map) const { return false; }
526
528
530
531
533 Teuchos::RCP<const Teuchos::Comm<int> > getComm() const { return Teuchos::null; }
534
536
538
539
541 std::string description() const { return std::string(""); }
542
545
548
550
552
553
555 TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > &map) {
557 }
558
560 UnderlyingLib lib() const { return UseTpetra; }
561
564
565#ifdef HAVE_XPETRA_TPETRA
569 // We will never be here, this is a stub class
570 return local_map_type();
571 }
572#endif
573
575}; // TpetraMap class (specialization for GO=int and NO=EpetraNode)
576#endif
577
578#endif // HAVE_XPETRA_EPETRA
579
580} // namespace Xpetra
581
582// TODO: remove?
584template <class LocalOrdinal, class GlobalOrdinal, class Node>
586 XPETRA_MONITOR("TpetraMap==TpetraMap");
587 return map1.isSameAs(map2);
588}
589
591template <class LocalOrdinal, class GlobalOrdinal, class Node>
593 XPETRA_MONITOR("TpetraMap!=TpetraMap");
594 return !map1.isSameAs(map2);
595}
596
597#endif // XPETRA_TPETRAMAP_DEF_HPP
#define XPETRA_MONITOR(funcName)
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
bool operator!=(const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map1, const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map2)
Returns true if map is not identical to this map. Implemented in TpetraMap::isSameAs().
bool operator==(const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map1, const Xpetra::TpetraMap< LocalOrdinal, GlobalOrdinal, Node > &map2)
Returns true if map is identical to this map. Implemented in TpetraMap::isSameAs().
static const EVerbosityLevel verbLevel_default
Kokkos::View< const global_ordinal_type *, typename Node::device_type > global_indices_array_device_type
Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this node.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
GlobalOrdinal getIndexBase() const
The index base for this Map.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
std::string description() const
Return a simple one-line description of this object.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
Replace this Map's communicator with a subset communicator.
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Return the process IDs and corresponding local IDs for the given global IDs.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with a user-defined contiguous distribution.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print this object with the given verbosity level to the given FancyOStream.
size_t getLocalNumElements() const
The number of elements belonging to the calling node.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print this object with the given verbosity level to the given FancyOStream.
size_t getLocalNumElements() const
The number of elements belonging to the calling node.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Return the process IDs and corresponding local IDs for the given global IDs.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
bool isContiguous() const
True if this Map is distributed contiguously, else false.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
GlobalOrdinal getIndexBase() const
The index base for this Map.
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this node.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Constructor with a user-defined contiguous distribution.
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
std::string description() const
Return a simple one-line description of this object.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
Replace this Map's communicator with a subset communicator.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
Return the process IDs and corresponding local IDs for the given global IDs.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print this object with the given verbosity level to the given FancyOStream.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
std::string description() const
Return a simple one-line description of this object.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this node.
size_t getLocalNumElements() const
The number of elements belonging to the calling node.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed)
Constructor with Tpetra-defined contiguous uniform distribution.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
GlobalOrdinal getIndexBase() const
The index base for this Map.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
Replace this Map's communicator with a subset communicator.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
global_indices_array_device_type getMyGlobalIndicesDevice() const
Return a view of the global indices owned by this process.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
size_t global_size_t
Global size_t object.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)