Xpetra_TpetraMap.hpp
Go to the documentation of this file.
1 // @HEADER
2 //
3 // ***********************************************************************
4 //
5 // Xpetra: A linear algebra interface package
6 // Copyright 2012 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact
39 // Jonathan Hu (jhu@sandia.gov)
40 // Andrey Prokopenko (aprokop@sandia.gov)
41 // Ray Tuminaro (rstumin@sandia.gov)
42 //
43 // ***********************************************************************
44 //
45 // @HEADER
46 #ifndef XPETRA_TPETRAMAP_HPP
47 #define XPETRA_TPETRAMAP_HPP
48 
49 /* this file is automatically generated - do not edit (see script/tpetra.py) */
50 
52 
53 #include <Tpetra_Map.hpp>
54 
55 #include "Xpetra_Map.hpp"
56 #include "Xpetra_Utils.hpp"
57 
58 #include "Xpetra_Exceptions.hpp"
59 
60 namespace Xpetra {
61 
62  // TODO: move that elsewhere
63  template <class LocalOrdinal, class GlobalOrdinal, class Node>
64  const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node>& toTpetra(const Xpetra::Map<LocalOrdinal,GlobalOrdinal,Node>&);
65 
66  template <class LocalOrdinal, class GlobalOrdinal, class Node>
67  const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node > > toTpetra(const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >&);
68 
69  template <class LocalOrdinal, class GlobalOrdinal, class Node>
70  const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node > > toXpetra(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
71 
72  template <class LocalOrdinal, class GlobalOrdinal, class Node>
73  const RCP<Map<LocalOrdinal,GlobalOrdinal,Node > > toXpetraNonConst(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
74  //
75 
76  template <class LocalOrdinal = Map<>::local_ordinal_type,
77  class GlobalOrdinal = typename Map<LocalOrdinal>::global_ordinal_type,
78  class Node = typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
79  class TpetraMap
80  : public virtual Map<LocalOrdinal,GlobalOrdinal,Node> {
81 
82  public:
83 
85 
86 
88  TpetraMap (global_size_t numGlobalElements,
89  GlobalOrdinal indexBase,
90  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
92  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node))
93  : map_ (Teuchos::rcp (new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > (numGlobalElements,
94  indexBase, comm,
95  toTpetra(lg), node)))
96  {}
97 
99  TpetraMap (global_size_t numGlobalElements,
100  size_t numLocalElements,
101  GlobalOrdinal indexBase,
102  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
103  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node))
104  : map_ (Teuchos::rcp (new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > (numGlobalElements,
105  numLocalElements,
106  indexBase, comm,
107  node)))
108  {}
109 
111  TpetraMap (global_size_t numGlobalElements,
113  GlobalOrdinal indexBase,
114  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
115  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node))
116  : map_(Teuchos::rcp(new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >(numGlobalElements,
117  elementList, indexBase,
118  comm, node)))
119  {}
120 
123 
125 
127 
128 
130  global_size_t getGlobalNumElements() const { XPETRA_MONITOR("TpetraMap::getGlobalNumElements"); return map_->getGlobalNumElements(); }
131 
133  size_t getNodeNumElements() const { XPETRA_MONITOR("TpetraMap::getNodeNumElements"); return map_->getNodeNumElements(); }
134 
136  GlobalOrdinal getIndexBase() const { XPETRA_MONITOR("TpetraMap::getIndexBase"); return map_->getIndexBase(); }
137 
139  LocalOrdinal getMinLocalIndex() const { XPETRA_MONITOR("TpetraMap::getMinLocalIndex"); return map_->getMinLocalIndex(); }
140 
142  LocalOrdinal getMaxLocalIndex() const { XPETRA_MONITOR("TpetraMap::getMaxLocalIndex"); return map_->getMaxLocalIndex(); }
143 
145  GlobalOrdinal getMinGlobalIndex() const { XPETRA_MONITOR("TpetraMap::getMinGlobalIndex"); return map_->getMinGlobalIndex(); }
146 
148  GlobalOrdinal getMaxGlobalIndex() const { XPETRA_MONITOR("TpetraMap::getMaxGlobalIndex"); return map_->getMaxGlobalIndex(); }
149 
151  GlobalOrdinal getMinAllGlobalIndex() const { XPETRA_MONITOR("TpetraMap::getMinAllGlobalIndex"); return map_->getMinAllGlobalIndex(); }
152 
154  GlobalOrdinal getMaxAllGlobalIndex() const { XPETRA_MONITOR("TpetraMap::getMaxAllGlobalIndex"); return map_->getMaxAllGlobalIndex(); }
155 
157  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { XPETRA_MONITOR("TpetraMap::getLocalElement"); return map_->getLocalElement(globalIndex); }
158 
160  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { XPETRA_MONITOR("TpetraMap::getGlobalElement"); return map_->getGlobalElement(localIndex); }
161 
163  LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const { XPETRA_MONITOR("TpetraMap::getRemoteIndexList"); return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList, LIDList)); }
164 
166  LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const { XPETRA_MONITOR("TpetraMap::getRemoteIndexList"); return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList)); }
167 
169  Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const { XPETRA_MONITOR("TpetraMap::getNodeElementList"); return map_->getNodeElementList(); }
170 
172 
174 
175 
177  bool isNodeLocalElement(LocalOrdinal localIndex) const { XPETRA_MONITOR("TpetraMap::isNodeLocalElement"); return map_->isNodeLocalElement(localIndex); }
178 
180  bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { XPETRA_MONITOR("TpetraMap::isNodeGlobalElement"); return map_->isNodeGlobalElement(globalIndex); }
181 
183  bool isContiguous() const { XPETRA_MONITOR("TpetraMap::isContiguous"); return map_->isContiguous(); }
184 
186  bool isDistributed() const { XPETRA_MONITOR("TpetraMap::isDistributed"); return map_->isDistributed(); }
187 
189  bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { XPETRA_MONITOR("TpetraMap::isCompatible"); return map_->isCompatible(toTpetra(map)); }
190 
192  bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { XPETRA_MONITOR("TpetraMap::isSameAs"); return map_->isSameAs(toTpetra(map)); }
193 
195 
197 
198 
200  Teuchos::RCP< const Teuchos::Comm< int > > getComm() const { XPETRA_MONITOR("TpetraMap::getComm"); return map_->getComm(); }
201 
203  Teuchos::RCP< Node > getNode() const { XPETRA_MONITOR("TpetraMap::getNode"); return map_->getNode(); }
204 
206 
208 
209 
211  std::string description() const { XPETRA_MONITOR("TpetraMap::description"); return map_->description(); }
212 
214  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const { XPETRA_MONITOR("TpetraMap::describe"); map_->describe(out, verbLevel); }
215 
217  return toXpetra(map_->removeEmptyProcesses());
218  }
220  return toXpetra(map_->replaceCommWithSubset(newComm));
221  }
222 
223  template<class Node2>
225  return toXpetraNonConst(map_->clone(node2));
226  }
227 
229 
231 
232 
234  TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map)
235  : map_(map) { }
236 
238  UnderlyingLib lib() const { return UseTpetra; }
239 
242 
243 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
244 #ifdef HAVE_XPETRA_TPETRA
245  using local_map_type = typename Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type;
247  local_map_type getLocalMap () const {
248  return map_->getLocalMap();
249  }
250 #endif
251 #endif
252 
254 
255  protected:
256 
258 
259  }; // TpetraMap class
260 
261  // TODO: move that elsewhere
262  template <class LocalOrdinal, class GlobalOrdinal, class Node>
263  const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> & toTpetra(const Map<LocalOrdinal,GlobalOrdinal,Node> &map) {
264  // TODO: throw exception
265  const TpetraMap<LocalOrdinal,GlobalOrdinal,Node> & tpetraMap = dynamic_cast<const TpetraMap<LocalOrdinal,GlobalOrdinal,Node> &>(*map.getMap());
266  return *tpetraMap.getTpetra_Map();
267  }
268 
269  template <class LocalOrdinal, class GlobalOrdinal, class Node>
271  typedef TpetraMap<LocalOrdinal, GlobalOrdinal, Node> TpetraMapClass;
272  if (map != Teuchos::null) {
273  XPETRA_RCP_DYNAMIC_CAST(const TpetraMapClass, map->getMap(), tpetraMap, "toTpetra");
274  return tpetraMap->getTpetra_Map();
275  }
276  return Teuchos::null;
277  }
278 
279  // In some cases (for instance, in MueLu adapter to Tpetra operator), we need to return a reference. This is only possible if
280  // we assume that the map argument is nonzero
281  template <class LocalOrdinal, class GlobalOrdinal, class Node>
283  TEUCHOS_TEST_FOR_EXCEPTION(map.is_null(), std::invalid_argument, "map must be nonzero");
284  typedef TpetraMap<LocalOrdinal, GlobalOrdinal, Node> TpetraMapClass;
285  XPETRA_RCP_DYNAMIC_CAST(const TpetraMapClass, map->getMap(), tpetraMap, "toTpetra");
286  return tpetraMap->getTpetra_Map();
287  }
288 
289  template <class LocalOrdinal, class GlobalOrdinal, class Node>
290  const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > toXpetra(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >& map) {
291  if (!map.is_null())
293 
294  return Teuchos::null;
295  }
296 
297  template <class LocalOrdinal, class GlobalOrdinal, class Node>
298  const RCP<Map<LocalOrdinal,GlobalOrdinal,Node> > toXpetraNonConst(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >& map) {
299  if (!map.is_null())
301 
302  return Teuchos::null;
303  }
304 
305  // TODO: removed (but currently used in unit test)
306  namespace useTpetra {
307 
309  template <class LocalOrdinal, class GlobalOrdinal, class Node>
311  createLocalMapWithNode(size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > & /* node */ = Teuchos::null) {
312  XPETRA_MONITOR("useTpetra::createLocalMapWithNode");
313 
314  return rcp(new TpetraMap<LocalOrdinal,GlobalOrdinal,Node>(Tpetra::createLocalMapWithNode<LocalOrdinal,GlobalOrdinal,Node>(numElements, comm)));
315  }
316 
318  template <class LocalOrdinal, class GlobalOrdinal>
320  createContigMap(global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm) {
321  XPETRA_MONITOR("useTpetra::createContigMap");
322 
323  return rcp(new TpetraMap<LocalOrdinal,GlobalOrdinal>(Tpetra::createContigMap<LocalOrdinal,GlobalOrdinal>(numElements, localNumElements, comm)));
324  }
325 
327  template <class LocalOrdinal, class GlobalOrdinal, class Node>
329  createContigMapWithNode(global_size_t numElements, size_t localNumElements,
330  const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > & /* node */ = Teuchos::null) {
331  XPETRA_MONITOR("useTpetra::createContigMap");
332  return rcp(new TpetraMap<LocalOrdinal,GlobalOrdinal,Node>(Tpetra::createContigMapWithNode<LocalOrdinal,GlobalOrdinal,Node>(numElements, localNumElements, comm)));
333  }
334  } // useTpetra namespace
335 
336  // TODO: move that elsewhere
337  template <class LocalOrdinal, class GlobalOrdinal, class Node>
338  const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node>& toTpetra(const Xpetra::Map<LocalOrdinal,GlobalOrdinal,Node>&);
339 
340  template <class LocalOrdinal, class GlobalOrdinal, class Node>
341  const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node > > toTpetra(const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >&);
342 
343  template <class LocalOrdinal, class GlobalOrdinal, class Node>
344  const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node > > toXpetra(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
345 
346  template <class LocalOrdinal, class GlobalOrdinal, class Node>
347  const RCP<Map<LocalOrdinal,GlobalOrdinal,Node > > toXpetraNonConst(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> >&);
348 
349 #ifdef HAVE_XPETRA_EPETRA
350 
351 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
352  (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
353 
354  // specialization for Tpetra Map on EpetraNode and GO=int
355  template <>
356  class TpetraMap<int, int, EpetraNode>
357  : public virtual Map<int,int,EpetraNode> {
358 
359  public:
360  typedef int GlobalOrdinal;
361  typedef int LocalOrdinal;
362  typedef EpetraNode Node;
363 
365 
366 
368  TpetraMap (global_size_t numGlobalElements,
369  GlobalOrdinal indexBase,
370  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
372  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node)) {
374  }
375 
377  TpetraMap (global_size_t numGlobalElements,
378  size_t numLocalElements,
379  GlobalOrdinal indexBase,
380  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
381  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node)) {
383  }
384 
386  TpetraMap (global_size_t numGlobalElements,
388  GlobalOrdinal indexBase,
389  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
390  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node)) {
392  }
393 
396 
398 
400 
401 
403  global_size_t getGlobalNumElements() const { return 0; }
404 
406  size_t getNodeNumElements() const { return 0; }
407 
409  GlobalOrdinal getIndexBase() const { return 0; }
410 
412  LocalOrdinal getMinLocalIndex() const { return 0; }
413 
415  LocalOrdinal getMaxLocalIndex() const { return 0; }
416 
418  GlobalOrdinal getMinGlobalIndex() const { return 0; }
419 
421  GlobalOrdinal getMaxGlobalIndex() const { return 0; }
422 
424  GlobalOrdinal getMinAllGlobalIndex() const { return 0; }
425 
427  GlobalOrdinal getMaxAllGlobalIndex() const { return 0; }
428 
430  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
431 
433  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
434 
437 
440 
443 
445 
447 
448 
450  bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; }
451 
453  bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; }
454 
456  bool isContiguous() const { return false; }
457 
459  bool isDistributed() const { return false; }
460 
462  bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
463 
465  bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
466 
468 
470 
471 
473  Teuchos::RCP< const Teuchos::Comm< int > > getComm() const { return Teuchos::null; }
474 
476  Teuchos::RCP< Node > getNode() const { return Teuchos::null; }
477 
479 
481 
482 
484  std::string description() const { return std::string(""); }
485 
488 
491 
492  template<class Node2>
493  RCP<Map<LocalOrdinal, GlobalOrdinal, Node2> > clone(const RCP<Node2> &node2) const { return Teuchos::null; }
494 
496 
498 
499 
501  TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map) {
503  }
504 
506  UnderlyingLib lib() const { return UseTpetra; }
507 
510 
511 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
512 #ifdef HAVE_XPETRA_TPETRA
513  using local_map_type = typename Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type;
515  local_map_type getLocalMap () const {
516  return local_map_type();
517  }
518 #endif
519 #endif
520 
522 
523  }; // TpetraMap class (specialization for GO=int and NO=EpetraNode)
524 #endif
525 
526 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
527  (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
528  // specialization for Tpetra Map on EpetraNode and GO=int
529  template <>
530  class TpetraMap<int, long long, EpetraNode>
531  : public virtual Map<int,long long,EpetraNode> {
532 
533  public:
534  typedef long long GlobalOrdinal;
535  typedef int LocalOrdinal;
536  typedef EpetraNode Node;
537 
539 
540 
542  TpetraMap (global_size_t numGlobalElements,
543  GlobalOrdinal indexBase,
544  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
546  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node)) {
548  }
549 
551  TpetraMap (global_size_t numGlobalElements,
552  size_t numLocalElements,
553  GlobalOrdinal indexBase,
554  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
555  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node)) {
557  }
558 
560  TpetraMap (global_size_t numGlobalElements,
562  GlobalOrdinal indexBase,
563  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
564  const Teuchos::RCP< Node > &node = Teuchos::rcp(new Node)) {
566  }
567 
570 
572 
574 
575 
577  global_size_t getGlobalNumElements() const { return 0; }
578 
580  size_t getNodeNumElements() const { return 0; }
581 
583  GlobalOrdinal getIndexBase() const { return 0; }
584 
586  LocalOrdinal getMinLocalIndex() const { return 0; }
587 
589  LocalOrdinal getMaxLocalIndex() const { return 0; }
590 
592  GlobalOrdinal getMinGlobalIndex() const { return 0; }
593 
595  GlobalOrdinal getMaxGlobalIndex() const { return 0; }
596 
598  GlobalOrdinal getMinAllGlobalIndex() const { return 0; }
599 
601  GlobalOrdinal getMaxAllGlobalIndex() const { return 0; }
602 
604  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
605 
607  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
608 
611 
614 
617 
619 
621 
622 
624  bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; }
625 
627  bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; }
628 
630  bool isContiguous() const { return false; }
631 
633  bool isDistributed() const { return false; }
634 
636  bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
637 
639  bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
640 
642 
644 
645 
647  Teuchos::RCP< const Teuchos::Comm< int > > getComm() const { return Teuchos::null; }
648 
650  Teuchos::RCP< Node > getNode() const { return Teuchos::null; }
651 
653 
655 
656 
658  std::string description() const { return std::string(""); }
659 
662 
665 
666  template<class Node2>
667  RCP<Map<LocalOrdinal, GlobalOrdinal, Node2> > clone(const RCP<Node2> &node2) const { return Teuchos::null; }
668 
670 
672 
673 
675  TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map) {
677  }
678 
680  UnderlyingLib lib() const { return UseTpetra; }
681 
684 
685 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
686 #ifdef HAVE_XPETRA_TPETRA
687  using local_map_type = typename Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type;
689  local_map_type getLocalMap () const {
690  // We will never be here, this is a stub class
691  return local_map_type();
692  }
693 #endif
694 #endif
695 
697  }; // TpetraMap class (specialization for GO=int and NO=EpetraNode)
698 #endif
699 
700 #endif // HAVE_XPETRA_EPETRA
701 
702 } // Xpetra namespace
703 
704 // TODO: remove?
706 template <class LocalOrdinal, class GlobalOrdinal, class Node>
708  XPETRA_MONITOR("TpetraMap==TpetraMap");
709  return map1.isSameAs(map2);
710 }
711 
713 template <class LocalOrdinal, class GlobalOrdinal, class Node>
715  XPETRA_MONITOR("TpetraMap!=TpetraMap");
716  return !map1.isSameAs(map2);
717 }
718 
719 #define XPETRA_TPETRAMAP_SHORT
720 #endif // XPETRA_TPETRAMAP_HPP
Xpetra::TpetraMap::removeEmptyProcesses
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
Definition: Xpetra_TpetraMap.hpp:216
Xpetra::TpetraMap< int, long long, EpetraNode >::getNode
Teuchos::RCP< Node > getNode() const
Get this Map's Node object.
Definition: Xpetra_TpetraMap.hpp:650
XPETRA_RCP_DYNAMIC_CAST
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
Definition: Xpetra_Exceptions.hpp:65
Kokkos::Compat::KokkosSerialWrapperNode
Definition: Kokkos_SerialNode.hpp:57
Xpetra::LocalGlobal
LocalGlobal
Definition: Xpetra_ConfigDefs.hpp:173
Xpetra::TpetraMap::replaceCommWithSubset
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.
Definition: Xpetra_TpetraMap.hpp:219
Xpetra::useTpetra::createContigMapWithNode
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, Node > > createContigMapWithNode(global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &=Teuchos::null)
Non-member function to create a (potentially) non-uniform, contiguous Map with a user-specified node.
Definition: Xpetra_TpetraMap.hpp:329
Xpetra::TpetraMap< int, long long, EpetraNode >::TpetraMap
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
Definition: Xpetra_TpetraMap.hpp:560
Xpetra::TpetraMap< int, long long, EpetraNode >::isNodeGlobalElement
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
Definition: Xpetra_TpetraMap.hpp:627
Xpetra::TpetraMap< int, int, EpetraNode >::getMinAllGlobalIndex
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
Definition: Xpetra_TpetraMap.hpp:424
Xpetra::TpetraMap< int, long long, EpetraNode >::getMaxAllGlobalIndex
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
Definition: Xpetra_TpetraMap.hpp:601
Xpetra::TpetraMap< int, long long, EpetraNode >::getNodeNumElements
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
Definition: Xpetra_TpetraMap.hpp:580
Xpetra
Xpetra namespace
Definition: Xpetra_BlockedCrsMatrix.hpp:86
Xpetra::TpetraMap< int, long long, EpetraNode >::getNodeElementList
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
Definition: Xpetra_TpetraMap.hpp:616
Xpetra::TpetraMap< int, int, EpetraNode >::removeEmptyProcesses
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
Definition: Xpetra_TpetraMap.hpp:489
Xpetra::TpetraMap< int, long long, EpetraNode >::getLocalElement
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
Definition: Xpetra_TpetraMap.hpp:604
Xpetra::TpetraMap::getMinGlobalIndex
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
Definition: Xpetra_TpetraMap.hpp:145
Xpetra::TpetraMap< int, long long, EpetraNode >::LocalOrdinal
int LocalOrdinal
Definition: Xpetra_TpetraMap.hpp:535
Xpetra::global_size_t
size_t global_size_t
Global size_t object.
Definition: Xpetra_ConfigDefs.hpp:170
Xpetra::TpetraMap< int, int, EpetraNode >::getRemoteIndexList
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.
Definition: Xpetra_TpetraMap.hpp:436
Xpetra::TpetraMap< int, int, EpetraNode >::isNodeGlobalElement
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
Definition: Xpetra_TpetraMap.hpp:453
Xpetra::TpetraMap< int, int, EpetraNode >::getNode
Teuchos::RCP< Node > getNode() const
Get this Map's Node object.
Definition: Xpetra_TpetraMap.hpp:476
Xpetra::TpetraMap< int, long long, EpetraNode >::isCompatible
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
Definition: Xpetra_TpetraMap.hpp:636
Xpetra::TpetraMap< int, int, EpetraNode >::TpetraMap
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
Definition: Xpetra_TpetraMap.hpp:386
Xpetra::TpetraMap< int, int, EpetraNode >::getMaxAllGlobalIndex
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
Definition: Xpetra_TpetraMap.hpp:427
Xpetra::TpetraMap::TpetraMap
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with Tpetra-defined contiguous uniform distribution.
Definition: Xpetra_TpetraMap.hpp:88
Xpetra::TpetraMap< int, int, EpetraNode >::LocalOrdinal
int LocalOrdinal
Definition: Xpetra_TpetraMap.hpp:361
Xpetra::TpetraMap< int, long long, EpetraNode >::getMinLocalIndex
LocalOrdinal getMinLocalIndex() const
The minimum local index.
Definition: Xpetra_TpetraMap.hpp:586
Xpetra::TpetraMap::getTpetra_Map
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
Definition: Xpetra_TpetraMap.hpp:241
Xpetra::TpetraMap< int, int, EpetraNode >::getIndexBase
GlobalOrdinal getIndexBase() const
The index base for this Map.
Definition: Xpetra_TpetraMap.hpp:409
Xpetra::toTpetra
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
Definition: Xpetra_TpetraCrsGraph.hpp:338
Xpetra::TpetraMap< int, int, EpetraNode >::lib
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
Definition: Xpetra_TpetraMap.hpp:506
Xpetra::useTpetra::createContigMap
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal > > createContigMap(global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
Non-member function to create a (potentially) non-uniform, contiguous Map with the default node.
Definition: Xpetra_TpetraMap.hpp:320
Xpetra::TpetraMap< int, long long, EpetraNode >::removeEmptyProcesses
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > removeEmptyProcesses() const
Return a new Map with processes with zero elements removed.
Definition: Xpetra_TpetraMap.hpp:663
Xpetra::TpetraMap< int, long long, EpetraNode >::getMaxGlobalIndex
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
Definition: Xpetra_TpetraMap.hpp:595
Xpetra::toXpetraNonConst
const RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > toXpetraNonConst(const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &)
Definition: Xpetra_TpetraMap.hpp:298
Xpetra::TpetraMap::TpetraMap
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
Definition: Xpetra_TpetraMap.hpp:234
Xpetra::TpetraMap< int, int, EpetraNode >::~TpetraMap
~TpetraMap()
Destructor.
Definition: Xpetra_TpetraMap.hpp:395
Xpetra::TpetraMap::getLocalElement
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
Definition: Xpetra_TpetraMap.hpp:157
Xpetra::TpetraMap< int, long long, EpetraNode >::getComm
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
Definition: Xpetra_TpetraMap.hpp:647
Xpetra::TpetraMap< int, long long, EpetraNode >::getMinAllGlobalIndex
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
Definition: Xpetra_TpetraMap.hpp:598
Xpetra::TpetraMap< int, long long, EpetraNode >::isNodeLocalElement
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
Definition: Xpetra_TpetraMap.hpp:624
Xpetra::TpetraMap< int, long long, EpetraNode >::Node
EpetraNode Node
Definition: Xpetra_TpetraMap.hpp:536
Xpetra::TpetraMap< int, int, EpetraNode >::getNodeElementList
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
Definition: Xpetra_TpetraMap.hpp:442
Xpetra::TpetraMap::getGlobalElement
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
Definition: Xpetra_TpetraMap.hpp:160
Xpetra::TpetraMap< int, long long, EpetraNode >::TpetraMap
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with Tpetra-defined contiguous uniform distribution.
Definition: Xpetra_TpetraMap.hpp:542
Xpetra::TpetraMap< int, int, EpetraNode >::Node
EpetraNode Node
Definition: Xpetra_TpetraMap.hpp:362
Xpetra::TpetraMap::getNodeNumElements
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
Definition: Xpetra_TpetraMap.hpp:133
Xpetra::toXpetra
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
Definition: Xpetra_EpetraCrsGraph.cpp:168
Xpetra::TpetraMap< int, int, EpetraNode >::isContiguous
bool isContiguous() const
True if this Map is distributed contiguously, else false.
Definition: Xpetra_TpetraMap.hpp:456
Teuchos::rcp
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Xpetra::TpetraMap< int, long long, EpetraNode >::getGlobalNumElements
global_size_t getGlobalNumElements() const
The number of elements in this Map.
Definition: Xpetra_TpetraMap.hpp:577
Xpetra::TpetraMap::description
std::string description() const
Return a simple one-line description of this object.
Definition: Xpetra_TpetraMap.hpp:211
Teuchos::EVerbosityLevel
EVerbosityLevel
Xpetra::TpetraMap< int, long long, EpetraNode >::isContiguous
bool isContiguous() const
True if this Map is distributed contiguously, else false.
Definition: Xpetra_TpetraMap.hpp:630
Xpetra_Utils.hpp
Xpetra::GloballyDistributed
Definition: Xpetra_ConfigDefs.hpp:175
Xpetra::UseTpetra
Definition: Xpetra_Map.hpp:83
Xpetra::TpetraMap< int, long long, EpetraNode >::TpetraMap
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with a user-defined contiguous distribution.
Definition: Xpetra_TpetraMap.hpp:551
Xpetra::TpetraMap::clone
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
Definition: Xpetra_TpetraMap.hpp:224
Xpetra::TpetraMap< int, int, EpetraNode >::getComm
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
Definition: Xpetra_TpetraMap.hpp:473
Xpetra::TpetraMap< int, int, EpetraNode >::getLocalElement
LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const
The local index corresponding to the given global index.
Definition: Xpetra_TpetraMap.hpp:430
Xpetra::TpetraMap< int, int, EpetraNode >::getMaxGlobalIndex
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
Definition: Xpetra_TpetraMap.hpp:421
Xpetra::TpetraMap::getNode
Teuchos::RCP< Node > getNode() const
Get this Map's Node object.
Definition: Xpetra_TpetraMap.hpp:203
Xpetra::TpetraMap< int, long long, EpetraNode >::getGlobalElement
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
Definition: Xpetra_TpetraMap.hpp:607
Xpetra::TpetraMap< int, long long, EpetraNode >::getIndexBase
GlobalOrdinal getIndexBase() const
The index base for this Map.
Definition: Xpetra_TpetraMap.hpp:583
Teuchos::ArrayView
Xpetra::TpetraMap< int, int, EpetraNode >::getMaxLocalIndex
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
Definition: Xpetra_TpetraMap.hpp:415
Xpetra::Map
Definition: Xpetra_Map.hpp:90
Xpetra::TpetraMap< int, long long, EpetraNode >::TpetraMap
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
Definition: Xpetra_TpetraMap.hpp:675
Xpetra::TpetraMap< int, int, EpetraNode >::GlobalOrdinal
int GlobalOrdinal
Definition: Xpetra_TpetraMap.hpp:360
Xpetra::TpetraMap< int, long long, EpetraNode >::lib
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
Definition: Xpetra_TpetraMap.hpp:680
Teuchos::RCP
Xpetra::TpetraMap< int, long long, EpetraNode >::clone
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
Definition: Xpetra_TpetraMap.hpp:667
Xpetra::TpetraMap::isNodeGlobalElement
bool isNodeGlobalElement(GlobalOrdinal globalIndex) const
True if the global index is found in this Map on this node, else false.
Definition: Xpetra_TpetraMap.hpp:180
Xpetra::TpetraMap::getMinAllGlobalIndex
GlobalOrdinal getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
Definition: Xpetra_TpetraMap.hpp:151
Xpetra::TpetraMap::~TpetraMap
~TpetraMap()
Destructor.
Definition: Xpetra_TpetraMap.hpp:122
Xpetra::TpetraMap< int, long long, EpetraNode >::getMaxLocalIndex
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
Definition: Xpetra_TpetraMap.hpp:589
Xpetra::TpetraMap::isSameAs
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
Definition: Xpetra_TpetraMap.hpp:192
Xpetra::TpetraMap< int, long long, EpetraNode >::getTpetra_Map
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
Definition: Xpetra_TpetraMap.hpp:683
Xpetra::TpetraMap< int, int, EpetraNode >::TpetraMap
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with a user-defined contiguous distribution.
Definition: Xpetra_TpetraMap.hpp:377
Xpetra::Map::getMap
virtual RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Definition: Xpetra_Map.hpp:220
Teuchos::basic_FancyOStream
Xpetra::TpetraMap< int, int, EpetraNode >::describe
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.
Definition: Xpetra_TpetraMap.hpp:487
Xpetra::TpetraMap< int, int, EpetraNode >::getTpetra_Map
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
Definition: Xpetra_TpetraMap.hpp:509
operator==
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().
Definition: Xpetra_TpetraMap.hpp:707
Xpetra::TpetraMap::isCompatible
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
Definition: Xpetra_TpetraMap.hpp:189
XPETRA_TPETRA_ETI_EXCEPTION
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
Definition: Xpetra_Exceptions.hpp:79
Xpetra::TpetraMap
Definition: Xpetra_TpetraMap.hpp:79
Xpetra::TpetraMap::getMaxLocalIndex
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
Definition: Xpetra_TpetraMap.hpp:142
Xpetra::TpetraMap::map_
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > map_
Definition: Xpetra_TpetraMap.hpp:257
Xpetra::TpetraMap< int, int, EpetraNode >::isNodeLocalElement
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
Definition: Xpetra_TpetraMap.hpp:450
Xpetra::TpetraMap::getRemoteIndexList
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.
Definition: Xpetra_TpetraMap.hpp:163
Xpetra::TpetraMap< int, long long, EpetraNode >::isSameAs
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
Definition: Xpetra_TpetraMap.hpp:639
Xpetra::TpetraMap::getMaxAllGlobalIndex
GlobalOrdinal getMaxAllGlobalIndex() const
The maximum global index over all processes in the communicator.
Definition: Xpetra_TpetraMap.hpp:154
Xpetra::TpetraMap::TpetraMap
TpetraMap(global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with user-defined arbitrary (possibly noncontiguous) distribution.
Definition: Xpetra_TpetraMap.hpp:111
Xpetra::TpetraMap::describe
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.
Definition: Xpetra_TpetraMap.hpp:214
Xpetra::TpetraMap::getComm
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map's Comm object.
Definition: Xpetra_TpetraMap.hpp:200
Xpetra::TpetraMap< int, int, EpetraNode >::getRemoteIndexList
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
Definition: Xpetra_TpetraMap.hpp:439
Xpetra::TpetraMap< int, int, EpetraNode >::replaceCommWithSubset
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.
Definition: Xpetra_TpetraMap.hpp:490
Xpetra::TpetraMap::isContiguous
bool isContiguous() const
True if this Map is distributed contiguously, else false.
Definition: Xpetra_TpetraMap.hpp:183
Xpetra::TpetraMap::lib
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
Definition: Xpetra_TpetraMap.hpp:238
Xpetra::TpetraMap::getRemoteIndexList
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
Definition: Xpetra_TpetraMap.hpp:166
Xpetra::TpetraMap::isDistributed
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
Definition: Xpetra_TpetraMap.hpp:186
Xpetra::TpetraMap< int, long long, EpetraNode >::getRemoteIndexList
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.
Definition: Xpetra_TpetraMap.hpp:610
Xpetra::TpetraMap::getMaxGlobalIndex
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
Definition: Xpetra_TpetraMap.hpp:148
Xpetra::Map::global_ordinal_type
GlobalOrdinal global_ordinal_type
Definition: Xpetra_Map.hpp:95
Xpetra_TpetraConfigDefs.hpp
Xpetra::toTpetraNonZero
const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > toTpetraNonZero(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Definition: Xpetra_TpetraMap.hpp:282
Xpetra::TpetraMap::getNodeElementList
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
Definition: Xpetra_TpetraMap.hpp:169
Xpetra::TpetraMap< int, int, EpetraNode >::clone
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
Definition: Xpetra_TpetraMap.hpp:493
Xpetra::TpetraMap< int, int, EpetraNode >::getMinGlobalIndex
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
Definition: Xpetra_TpetraMap.hpp:418
Xpetra::TpetraMap< int, long long, EpetraNode >::description
std::string description() const
Return a simple one-line description of this object.
Definition: Xpetra_TpetraMap.hpp:658
Xpetra::TpetraMap::TpetraMap
TpetraMap(global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with a user-defined contiguous distribution.
Definition: Xpetra_TpetraMap.hpp:99
Xpetra::TpetraMap< int, long long, EpetraNode >::describe
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.
Definition: Xpetra_TpetraMap.hpp:661
operator!=
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().
Definition: Xpetra_TpetraMap.hpp:714
Xpetra_Exceptions.hpp
Xpetra::TpetraMap::isNodeLocalElement
bool isNodeLocalElement(LocalOrdinal localIndex) const
True if the local index is valid for this Map on this node, else false.
Definition: Xpetra_TpetraMap.hpp:177
Xpetra::UnderlyingLib
UnderlyingLib
Definition: Xpetra_Map.hpp:81
Xpetra::TpetraMap< int, int, EpetraNode >::description
std::string description() const
Return a simple one-line description of this object.
Definition: Xpetra_TpetraMap.hpp:484
Xpetra::TpetraMap< int, int, EpetraNode >::isSameAs
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
Definition: Xpetra_TpetraMap.hpp:465
Xpetra::TpetraMap< int, int, EpetraNode >::getGlobalNumElements
global_size_t getGlobalNumElements() const
The number of elements in this Map.
Definition: Xpetra_TpetraMap.hpp:403
Xpetra::TpetraMap< int, int, EpetraNode >::isCompatible
bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is compatible with this Map.
Definition: Xpetra_TpetraMap.hpp:462
Xpetra::TpetraMap< int, long long, EpetraNode >::isDistributed
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
Definition: Xpetra_TpetraMap.hpp:633
Xpetra::TpetraMap< int, long long, EpetraNode >::~TpetraMap
~TpetraMap()
Destructor.
Definition: Xpetra_TpetraMap.hpp:569
Xpetra::TpetraMap< int, int, EpetraNode >::isDistributed
bool isDistributed() const
Whether this Map is globally distributed or locally replicated.
Definition: Xpetra_TpetraMap.hpp:459
Xpetra::TpetraMap< int, int, EpetraNode >::TpetraMap
TpetraMap(global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalGlobal lg=GloballyDistributed, const Teuchos::RCP< Node > &node=Teuchos::rcp(new Node))
Constructor with Tpetra-defined contiguous uniform distribution.
Definition: Xpetra_TpetraMap.hpp:368
Xpetra::TpetraMap< int, int, EpetraNode >::getGlobalElement
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
Definition: Xpetra_TpetraMap.hpp:433
Teuchos::Comm
Xpetra::TpetraMap< int, int, EpetraNode >::TpetraMap
TpetraMap(const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
TpetraMap constructor to wrap a Tpetra::Map object.
Definition: Xpetra_TpetraMap.hpp:501
Xpetra::useTpetra::createLocalMapWithNode
Teuchos::RCP< const TpetraMap< LocalOrdinal, GlobalOrdinal, Node > > createLocalMapWithNode(size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &=Teuchos::null)
Non-member function to create a locally replicated Map with a specified node.
Definition: Xpetra_TpetraMap.hpp:311
Xpetra::TpetraMap< int, long long, EpetraNode >::getMinGlobalIndex
GlobalOrdinal getMinGlobalIndex() const
The minimum global index owned by the calling process.
Definition: Xpetra_TpetraMap.hpp:592
Xpetra::Map::node_type
Node node_type
Definition: Xpetra_Map.hpp:96
Xpetra::TpetraMap< int, long long, EpetraNode >::GlobalOrdinal
long long GlobalOrdinal
Definition: Xpetra_TpetraMap.hpp:534
Xpetra::TpetraMap< int, int, EpetraNode >::getNodeNumElements
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
Definition: Xpetra_TpetraMap.hpp:406
Teuchos::Describable::verbLevel_default
static const EVerbosityLevel verbLevel_default
Xpetra::TpetraMap< int, long long, EpetraNode >::replaceCommWithSubset
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.
Definition: Xpetra_TpetraMap.hpp:664
Xpetra::TpetraMap< int, int, EpetraNode >::getMinLocalIndex
LocalOrdinal getMinLocalIndex() const
The minimum local index.
Definition: Xpetra_TpetraMap.hpp:412
TEUCHOS_TEST_FOR_EXCEPTION
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Xpetra::LookupStatus
LookupStatus
Definition: Xpetra_ConfigDefs.hpp:179
XPETRA_MONITOR
#define XPETRA_MONITOR(funcName)
Definition: Xpetra_ConfigDefs.hpp:128
Xpetra::TpetraMap< int, long long, EpetraNode >::getRemoteIndexList
LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
Return the process IDs for the given global IDs.
Definition: Xpetra_TpetraMap.hpp:613
Xpetra::IDNotPresent
Definition: Xpetra_ConfigDefs.hpp:181
Xpetra::TpetraMap::getMinLocalIndex
LocalOrdinal getMinLocalIndex() const
The minimum local index.
Definition: Xpetra_TpetraMap.hpp:139
Xpetra::TpetraMap::getGlobalNumElements
global_size_t getGlobalNumElements() const
The number of elements in this Map.
Definition: Xpetra_TpetraMap.hpp:130
Xpetra_Map.hpp
Xpetra::TpetraMap::getIndexBase
GlobalOrdinal getIndexBase() const
The index base for this Map.
Definition: Xpetra_TpetraMap.hpp:136