Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 
15 namespace Xpetra {
16 
18 
19 
20 template <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 
32 template <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 
44 template <class LocalOrdinal, class GlobalOrdinal, class Node>
46  TpetraMap(global_size_t numGlobalElements,
47  const Teuchos::ArrayView<const GlobalOrdinal> &elementList,
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 
58 template <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 
71 template <class LocalOrdinal, class GlobalOrdinal, class Node>
73 
75 
76 template <class LocalOrdinal, class GlobalOrdinal, class Node>
78  XPETRA_MONITOR("TpetraMap::getGlobalNumElements");
79  return map_->getGlobalNumElements();
80 }
81 
82 template <class LocalOrdinal, class GlobalOrdinal, class Node>
84  XPETRA_MONITOR("TpetraMap::getLocalNumElements");
85  return map_->getLocalNumElements();
86 }
87 
88 template <class LocalOrdinal, class GlobalOrdinal, class Node>
90  XPETRA_MONITOR("TpetraMap::getIndexBase");
91  return map_->getIndexBase();
92 }
93 
94 template <class LocalOrdinal, class GlobalOrdinal, class Node>
96  XPETRA_MONITOR("TpetraMap::getMinLocalIndex");
97  return map_->getMinLocalIndex();
98 }
99 
100 template <class LocalOrdinal, class GlobalOrdinal, class Node>
102  XPETRA_MONITOR("TpetraMap::getMaxLocalIndex");
103  return map_->getMaxLocalIndex();
104 }
105 
106 template <class LocalOrdinal, class GlobalOrdinal, class Node>
108  XPETRA_MONITOR("TpetraMap::getMinGlobalIndex");
109  return map_->getMinGlobalIndex();
110 }
111 
112 template <class LocalOrdinal, class GlobalOrdinal, class Node>
114  XPETRA_MONITOR("TpetraMap::getMaxGlobalIndex");
115  return map_->getMaxGlobalIndex();
116 }
117 
118 template <class LocalOrdinal, class GlobalOrdinal, class Node>
120  XPETRA_MONITOR("TpetraMap::getMinAllGlobalIndex");
121  return map_->getMinAllGlobalIndex();
122 }
123 
124 template <class LocalOrdinal, class GlobalOrdinal, class Node>
126  XPETRA_MONITOR("TpetraMap::getMaxAllGlobalIndex");
127  return map_->getMaxAllGlobalIndex();
128 }
129 
130 template <class LocalOrdinal, class GlobalOrdinal, class Node>
131 LocalOrdinal TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getLocalElement(GlobalOrdinal globalIndex) const {
132  XPETRA_MONITOR("TpetraMap::getLocalElement");
133  return map_->getLocalElement(globalIndex);
134 }
135 
136 template <class LocalOrdinal, class GlobalOrdinal, class Node>
137 GlobalOrdinal TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getGlobalElement(LocalOrdinal localIndex) const {
138  XPETRA_MONITOR("TpetraMap::getGlobalElement");
139  return map_->getGlobalElement(localIndex);
140 }
141 
142 template <class LocalOrdinal, class GlobalOrdinal, class Node>
143 LookupStatus TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getRemoteIndexList(const Teuchos::ArrayView<const GlobalOrdinal> &GIDList, const Teuchos::ArrayView<int> &nodeIDList, const Teuchos::ArrayView<LocalOrdinal> &LIDList) const {
144  XPETRA_MONITOR("TpetraMap::getRemoteIndexList");
145  return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList, LIDList));
146 }
147 
148 template <class LocalOrdinal, class GlobalOrdinal, class Node>
149 LookupStatus TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getRemoteIndexList(const Teuchos::ArrayView<const GlobalOrdinal> &GIDList, const Teuchos::ArrayView<int> &nodeIDList) const {
150  XPETRA_MONITOR("TpetraMap::getRemoteIndexList");
151  return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList));
152 }
153 
154 template <class LocalOrdinal, class GlobalOrdinal, class Node>
155 Teuchos::ArrayView<const GlobalOrdinal> TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getLocalElementList() const {
156  XPETRA_MONITOR("TpetraMap::getLocalElementList");
157  return map_->getLocalElementList();
158 }
159 
160 template <class LocalOrdinal, class GlobalOrdinal, class Node>
162  XPETRA_MONITOR("TpetraMap::getMyGlobalIndicesDevice");
163  return map_->getMyGlobalIndicesDevice();
164 }
165 
166 template <class LocalOrdinal, class GlobalOrdinal, class Node>
168  XPETRA_MONITOR("TpetraMap::isNodeLocalElement");
169  return map_->isNodeLocalElement(localIndex);
170 }
171 
172 template <class LocalOrdinal, class GlobalOrdinal, class Node>
174  XPETRA_MONITOR("TpetraMap::isNodeGlobalElement");
175  return map_->isNodeGlobalElement(globalIndex);
176 }
177 
178 template <class LocalOrdinal, class GlobalOrdinal, class Node>
180  XPETRA_MONITOR("TpetraMap::isContiguous");
181  return map_->isContiguous();
182 }
183 
184 template <class LocalOrdinal, class GlobalOrdinal, class Node>
186  XPETRA_MONITOR("TpetraMap::isDistributed");
187  return map_->isDistributed();
188 }
189 
190 template <class LocalOrdinal, class GlobalOrdinal, class Node>
192  XPETRA_MONITOR("TpetraMap::isCompatible");
193  return map_->isCompatible(toTpetra(map));
194 }
195 
196 template <class LocalOrdinal, class GlobalOrdinal, class Node>
198  XPETRA_MONITOR("TpetraMap::isSameAs");
199  return map_->isSameAs(toTpetra(map));
200 }
201 
202 template <class LocalOrdinal, class GlobalOrdinal, class Node>
203 Teuchos::RCP<const Teuchos::Comm<int> > TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getComm() const {
204  XPETRA_MONITOR("TpetraMap::getComm");
205  return map_->getComm();
206 }
207 
208 template <class LocalOrdinal, class GlobalOrdinal, class Node>
210  XPETRA_MONITOR("TpetraMap::description");
211  return map_->description();
212 }
213 
214 template <class LocalOrdinal, class GlobalOrdinal, class Node>
215 void TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const {
216  XPETRA_MONITOR("TpetraMap::describe");
217  map_->describe(out, verbLevel);
218 }
219 
220 template <class LocalOrdinal, class GlobalOrdinal, class Node>
221 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::removeEmptyProcesses() const {
222  return toXpetra(map_->removeEmptyProcesses());
223 }
224 
225 template <class LocalOrdinal, class GlobalOrdinal, class Node>
226 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::replaceCommWithSubset(const Teuchos::RCP<const Teuchos::Comm<int> > &newComm) const {
227  return toXpetra(map_->replaceCommWithSubset(newComm));
228 }
229 
230 template <class LocalOrdinal, class GlobalOrdinal, class Node>
231 TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > &map)
232  : map_(map) {}
233 
234 template <class LocalOrdinal, class GlobalOrdinal, class Node>
236 
237 template <class LocalOrdinal, class GlobalOrdinal, class Node>
238 RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > TpetraMap<LocalOrdinal, GlobalOrdinal, Node>::getTpetra_Map() const { return map_; }
239 
240 #ifdef HAVE_XPETRA_TPETRA
241 
242 template <class LocalOrdinal, class GlobalOrdinal, class Node>
244  return map_->getLocalMap();
245 }
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
254 template <>
255 class TpetraMap<int, int, EpetraNode>
256  : public virtual Map<int, int, EpetraNode> {
257  public:
258  typedef int GlobalOrdinal;
259  typedef int LocalOrdinal;
260  typedef EpetraNode Node;
261 
263 
264 
266 
267  TpetraMap(global_size_t numGlobalElements,
268  GlobalOrdinal indexBase,
269  const Teuchos::RCP<const Teuchos::Comm<int> > &comm,
272  }
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 
285  TpetraMap(global_size_t numGlobalElements,
286  const Teuchos::ArrayView<const GlobalOrdinal> &elementList,
287  GlobalOrdinal indexBase,
288  const Teuchos::RCP<const Teuchos::Comm<int> > &comm) {
290  }
291 
294 
296 
298 
299 
301  global_size_t getGlobalNumElements() const { return 0; }
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 
322  GlobalOrdinal getMinAllGlobalIndex() const { return 0; }
323 
325  GlobalOrdinal getMaxAllGlobalIndex() const { return 0; }
326 
328  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
329 
331  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
332 
334  LookupStatus getRemoteIndexList(const Teuchos::ArrayView<const GlobalOrdinal> &GIDList, const Teuchos::ArrayView<int> &nodeIDList, const Teuchos::ArrayView<LocalOrdinal> &LIDList) const { return Xpetra::IDNotPresent; }
335 
337  LookupStatus getRemoteIndexList(const Teuchos::ArrayView<const GlobalOrdinal> &GIDList, const Teuchos::ArrayView<int> &nodeIDList) const { return Xpetra::IDNotPresent; }
338 
340  Teuchos::ArrayView<const GlobalOrdinal> getLocalElementList() const { return Teuchos::ArrayView<const GlobalOrdinal>(); }
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 
382  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {}
383 
384  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > removeEmptyProcesses() const { return Teuchos::null; }
385  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > replaceCommWithSubset(const Teuchos::RCP<const Teuchos::Comm<int> > &newComm) const { return Teuchos::null; }
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 
401  RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > getTpetra_Map() const { return Teuchos::null; }
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
419 template <>
420 class TpetraMap<int, long long, EpetraNode>
421  : public virtual Map<int, long long, EpetraNode> {
422  public:
423  typedef long long GlobalOrdinal;
424  typedef int LocalOrdinal;
425  typedef EpetraNode Node;
426 
428 
429 
431  TpetraMap(global_size_t numGlobalElements,
432  GlobalOrdinal indexBase,
433  const Teuchos::RCP<const Teuchos::Comm<int> > &comm,
436  }
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,
448  const Teuchos::ArrayView<const GlobalOrdinal> &elementList,
449  GlobalOrdinal indexBase,
450  const Teuchos::RCP<const Teuchos::Comm<int> > &comm) {
452  }
453 
456 
458 
460 
461 
463  global_size_t getGlobalNumElements() const { return 0; }
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 
484  GlobalOrdinal getMinAllGlobalIndex() const { return 0; }
485 
487  GlobalOrdinal getMaxAllGlobalIndex() const { return 0; }
488 
490  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
491 
493  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
494 
496  LookupStatus getRemoteIndexList(const Teuchos::ArrayView<const GlobalOrdinal> &GIDList, const Teuchos::ArrayView<int> &nodeIDList, const Teuchos::ArrayView<LocalOrdinal> &LIDList) const { return Xpetra::IDNotPresent; }
497 
499  LookupStatus getRemoteIndexList(const Teuchos::ArrayView<const GlobalOrdinal> &GIDList, const Teuchos::ArrayView<int> &nodeIDList) const { return Xpetra::IDNotPresent; }
500 
502  Teuchos::ArrayView<const GlobalOrdinal> getLocalElementList() const { return Teuchos::ArrayView<const GlobalOrdinal>(); }
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 
544  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const {}
545 
546  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > removeEmptyProcesses() const { return Teuchos::null; }
547  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > replaceCommWithSubset(const Teuchos::RCP<const Teuchos::Comm<int> > &newComm) const { return Teuchos::null; }
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 
563  RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node> > getTpetra_Map() const { return Teuchos::null; }
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?
584 template <class LocalOrdinal, class GlobalOrdinal, class Node>
586  XPETRA_MONITOR("TpetraMap==TpetraMap");
587  return map1.isSameAs(map2);
588 }
589 
591 template <class LocalOrdinal, class GlobalOrdinal, class Node>
593  XPETRA_MONITOR("TpetraMap!=TpetraMap");
594  return !map1.isSameAs(map2);
595 }
596 
597 #endif // XPETRA_TPETRAMAP_DEF_HPP
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
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 getMaxLocalIndex() const
The maximum local index on the calling process.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
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.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map&#39;s Comm object.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map&#39;s Comm object.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
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.
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
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.
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.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
size_t getLocalNumElements() const
The number of elements belonging to the calling node.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
LocalOrdinal getMinLocalIndex() const
The minimum local index.
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.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
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.
global_indices_array_device_type getMyGlobalIndicesDevice() const
Return a view of the global indices owned by this process.
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this node.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
GlobalOrdinal getIndexBase() const
The index base for this Map.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
size_t getLocalNumElements() const
The number of elements belonging to the calling node.
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 Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
Replace this Map&#39;s communicator with a subset communicator.
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this node.
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.
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.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map&#39;s Comm object.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
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 isContiguous() const
True if this Map is distributed contiguously, else false.
LocalOrdinal getMinLocalIndex() const
The minimum local index.
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
size_t global_size_t
Global size_t object.
Teuchos::ArrayView< const GlobalOrdinal > getLocalElementList() const
Return a view of the global indices owned by this node.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
GlobalOrdinal getIndexBase() const
The index base for this Map.
GlobalOrdinal getIndexBase() const
The index base for this Map.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
Kokkos::View< const global_ordinal_type *, typename Node::device_type > global_indices_array_device_type
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in 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&#39;s communicator with a subset communicator.
std::string description() const
Return a simple one-line description of this object.
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
typename Map< LocalOrdinal, GlobalOrdinal, Node >::local_map_type local_map_type
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
bool isContiguous() const
True if this Map is distributed contiguously, else false.
#define XPETRA_MONITOR(funcName)
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
size_t getLocalNumElements() const
The number of elements belonging to the calling node.
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.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
global_size_t getGlobalNumElements() const
The number of elements in this Map.
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().
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the 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.
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > replaceCommWithSubset(const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const
Replace this Map&#39;s communicator with a subset communicator.
local_map_type getLocalMap() const
Get the local Map for Kokkos kernels.
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.
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.
std::string description() const
Return a simple one-line description of this object.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
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.
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.
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.