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 // ***********************************************************************
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_DEF_HPP
47 #define XPETRA_TPETRAMAP_DEF_HPP
48 
50 
51 
52 
53 namespace Xpetra {
54 
55 
57 
58 
59 
60 
61 
62  template<class LocalOrdinal, class GlobalOrdinal, class Node>
64  TpetraMap (global_size_t numGlobalElements,
65  GlobalOrdinal indexBase,
66  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
67  LocalGlobal lg)
68  : map_ (Teuchos::rcp (new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > (numGlobalElements,
69  indexBase, comm,
70  toTpetra(lg))))
71  {}
72 
73 
75 
76 
77  template<class LocalOrdinal, class GlobalOrdinal, class Node>
79  TpetraMap (global_size_t numGlobalElements,
80  size_t numLocalElements,
81  GlobalOrdinal indexBase,
82  const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
83  : map_ (Teuchos::rcp (new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > (numGlobalElements,
84  numLocalElements,
85  indexBase, comm)))
86  {}
87 
88 
90 
91 
92  template<class LocalOrdinal, class GlobalOrdinal, class Node>
94  TpetraMap (global_size_t numGlobalElements,
95  const Teuchos::ArrayView< const GlobalOrdinal > &elementList,
96  GlobalOrdinal indexBase,
97  const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
98  : map_(Teuchos::rcp(new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >(numGlobalElements,
99  elementList,
100  indexBase,
101  comm)))
102  {}
103 
104 
105 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
106 #ifdef HAVE_XPETRA_TPETRA
107 
109  template<class LocalOrdinal, class GlobalOrdinal, class Node>
111  TpetraMap (global_size_t numGlobalElements,
112  const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
113  GlobalOrdinal indexBase,
114  const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
115  : map_(Teuchos::rcp(new Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node >(numGlobalElements,
116  indexList,
117  indexBase,
118  comm)))
119  {}
120 #endif
121 #endif
122 
124 template<class LocalOrdinal, class GlobalOrdinal, class Node>
126 { }
127 
129 
130 template<class LocalOrdinal, class GlobalOrdinal, class Node>
132 { XPETRA_MONITOR("TpetraMap::getGlobalNumElements"); return map_->getGlobalNumElements(); }
133 
134 template<class LocalOrdinal, class GlobalOrdinal, class Node>
136 { XPETRA_MONITOR("TpetraMap::getNodeNumElements"); return map_->getNodeNumElements(); }
137 
138 template<class LocalOrdinal, class GlobalOrdinal, class Node>
140 { XPETRA_MONITOR("TpetraMap::getIndexBase"); return map_->getIndexBase(); }
141 
142 template<class LocalOrdinal, class GlobalOrdinal, class Node>
144 { XPETRA_MONITOR("TpetraMap::getMinLocalIndex"); return map_->getMinLocalIndex(); }
145 
146 template<class LocalOrdinal, class GlobalOrdinal, class Node>
148 { XPETRA_MONITOR("TpetraMap::getMaxLocalIndex"); return map_->getMaxLocalIndex(); }
149 
150 template<class LocalOrdinal, class GlobalOrdinal, class Node>
152 { XPETRA_MONITOR("TpetraMap::getMinGlobalIndex"); return map_->getMinGlobalIndex(); }
153 
154 template<class LocalOrdinal, class GlobalOrdinal, class Node>
156 { XPETRA_MONITOR("TpetraMap::getMaxGlobalIndex"); return map_->getMaxGlobalIndex(); }
157 
158 template<class LocalOrdinal, class GlobalOrdinal, class Node>
160 { XPETRA_MONITOR("TpetraMap::getMinAllGlobalIndex"); return map_->getMinAllGlobalIndex(); }
161 
162 template<class LocalOrdinal, class GlobalOrdinal, class Node>
164 { XPETRA_MONITOR("TpetraMap::getMaxAllGlobalIndex"); return map_->getMaxAllGlobalIndex(); }
165 
166 template<class LocalOrdinal, class GlobalOrdinal, class Node>
167 LocalOrdinal TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getLocalElement(GlobalOrdinal globalIndex) const
168 { XPETRA_MONITOR("TpetraMap::getLocalElement"); return map_->getLocalElement(globalIndex); }
169 
170 template<class LocalOrdinal, class GlobalOrdinal, class Node>
171 GlobalOrdinal TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getGlobalElement(LocalOrdinal localIndex) const
172 { XPETRA_MONITOR("TpetraMap::getGlobalElement"); return map_->getGlobalElement(localIndex); }
173 
174 template<class LocalOrdinal, class GlobalOrdinal, class Node>
175 LookupStatus TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const
176 { XPETRA_MONITOR("TpetraMap::getRemoteIndexList"); return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList, LIDList)); }
177 
178 template<class LocalOrdinal, class GlobalOrdinal, class Node>
179 LookupStatus TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const
180 { XPETRA_MONITOR("TpetraMap::getRemoteIndexList"); return toXpetra(map_->getRemoteIndexList(GIDList, nodeIDList)); }
181 
182 template<class LocalOrdinal, class GlobalOrdinal, class Node>
183 Teuchos::ArrayView< const GlobalOrdinal > TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getNodeElementList() const
184 { XPETRA_MONITOR("TpetraMap::getNodeElementList"); return map_->getNodeElementList(); }
185 
186 template<class LocalOrdinal, class GlobalOrdinal, class Node>
188 { XPETRA_MONITOR("TpetraMap::isNodeLocalElement"); return map_->isNodeLocalElement(localIndex); }
189 
190 template<class LocalOrdinal, class GlobalOrdinal, class Node>
192 { XPETRA_MONITOR("TpetraMap::isNodeGlobalElement"); return map_->isNodeGlobalElement(globalIndex); }
193 
194 template<class LocalOrdinal, class GlobalOrdinal, class Node>
196 { XPETRA_MONITOR("TpetraMap::isContiguous"); return map_->isContiguous(); }
197 
198 template<class LocalOrdinal, class GlobalOrdinal, class Node>
200 { XPETRA_MONITOR("TpetraMap::isDistributed"); return map_->isDistributed(); }
201 
202 template<class LocalOrdinal, class GlobalOrdinal, class Node>
204 { XPETRA_MONITOR("TpetraMap::isCompatible"); return map_->isCompatible(toTpetra(map)); }
205 
206 template<class LocalOrdinal, class GlobalOrdinal, class Node>
208 { XPETRA_MONITOR("TpetraMap::isSameAs"); return map_->isSameAs(toTpetra(map)); }
209 
210 template<class LocalOrdinal, class GlobalOrdinal, class Node>
211 Teuchos::RCP< const Teuchos::Comm< int > > TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getComm() const
212 { XPETRA_MONITOR("TpetraMap::getComm"); return map_->getComm(); }
213 
214 template<class LocalOrdinal, class GlobalOrdinal, class Node>
216 { XPETRA_MONITOR("TpetraMap::description"); return map_->description(); }
217 
218 template<class LocalOrdinal, class GlobalOrdinal, class Node>
219 void TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
220 { XPETRA_MONITOR("TpetraMap::describe"); map_->describe(out, verbLevel); }
221 
222 template<class LocalOrdinal, class GlobalOrdinal, class Node>
223 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::removeEmptyProcesses () const
224 {
225  return toXpetra(map_->removeEmptyProcesses());
226 }
227 
228 template<class LocalOrdinal, class GlobalOrdinal, class Node>
229 RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::replaceCommWithSubset (const Teuchos::RCP<const Teuchos::Comm<int> >& newComm) const
230 {
231  return toXpetra(map_->replaceCommWithSubset(newComm));
232 }
233 
234 template<class LocalOrdinal, class GlobalOrdinal, class Node>
235 TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map)
236 : map_(map) { }
237 
238 template<class LocalOrdinal, class GlobalOrdinal, class Node>
240 
241 template<class LocalOrdinal, class GlobalOrdinal, class Node>
242 RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > TpetraMap<LocalOrdinal,GlobalOrdinal,Node>::getTpetra_Map() const
243 { return map_; }
244 
245 
246 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
247 #ifdef HAVE_XPETRA_TPETRA
248 
249 template<class LocalOrdinal, class GlobalOrdinal, class Node>
251 {
252  return map_->getLocalMap();
253 }
254 #endif
255 #endif
256 
257 
258 #ifdef HAVE_XPETRA_EPETRA
259 
260 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
261  (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
262 
263  // specialization for Tpetra Map on EpetraNode and GO=int
264  template <>
265  class TpetraMap<int, int, EpetraNode>
266  : public virtual Map<int,int,EpetraNode> {
267 
268  public:
269  typedef int GlobalOrdinal;
270  typedef int LocalOrdinal;
271  typedef EpetraNode Node;
272 
274 
275 
276 
278 
279 
280  TpetraMap (global_size_t numGlobalElements,
281  GlobalOrdinal indexBase,
282  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
285  }
286 
287 
289 
290 
291  TpetraMap (global_size_t numGlobalElements,
292  size_t numLocalElements,
293  GlobalOrdinal indexBase,
294  const Teuchos::RCP< const Teuchos::Comm< int > > &comm) {
296  }
297 
298 
300 
301 
302  TpetraMap (global_size_t numGlobalElements,
303  const Teuchos::ArrayView< const GlobalOrdinal > &elementList,
304  GlobalOrdinal indexBase,
305  const Teuchos::RCP< const Teuchos::Comm< int > > &comm) {
307  }
308 
309 
312 
314 
316 
317 
319  global_size_t getGlobalNumElements() const { return 0; }
320 
322  size_t getNodeNumElements() const { return 0; }
323 
325  GlobalOrdinal getIndexBase() const { return 0; }
326 
328  LocalOrdinal getMinLocalIndex() const { return 0; }
329 
331  LocalOrdinal getMaxLocalIndex() const { return 0; }
332 
334  GlobalOrdinal getMinGlobalIndex() const { return 0; }
335 
337  GlobalOrdinal getMaxGlobalIndex() const { return 0; }
338 
340  GlobalOrdinal getMinAllGlobalIndex() const { return 0; }
341 
343  GlobalOrdinal getMaxAllGlobalIndex() const { return 0; }
344 
346  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
347 
349  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
350 
352  LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const { return Xpetra::IDNotPresent; }
353 
355  LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const { return Xpetra::IDNotPresent; }
356 
358  Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const { return Teuchos::ArrayView<const GlobalOrdinal>(); }
359 
361 
363 
364 
366  bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; }
367 
369  bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; }
370 
372  bool isContiguous() const { return false; }
373 
375  bool isDistributed() const { return false; }
376 
378  bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
379 
381  bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
382 
384 
386 
387 
389  Teuchos::RCP< const Teuchos::Comm< int > > getComm() const { return Teuchos::null; }
390 
391 
393 
395 
396 
398  std::string description() const { return std::string(""); }
399 
401  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const { }
402 
403  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > removeEmptyProcesses () const { return Teuchos::null; }
404  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > replaceCommWithSubset (const Teuchos::RCP<const Teuchos::Comm<int> >& newComm) const { return Teuchos::null; }
405 
407 
409 
410 
412  TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map) {
414  }
415 
417  UnderlyingLib lib() const { return UseTpetra; }
418 
420  RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const { return Teuchos::null; }
421 
422 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
423 #ifdef HAVE_XPETRA_TPETRA
424  using local_map_type = typename Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type;
426  local_map_type getLocalMap () const {
427  return local_map_type();
428  }
429 #endif
430 #endif
431 
433 
434  }; // TpetraMap class (specialization for GO=int and NO=EpetraNode)
435 #endif
436 
437 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \
438  (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
439  // specialization for Tpetra Map on EpetraNode and GO=int
440  template <>
441  class TpetraMap<int, long long, EpetraNode>
442  : public virtual Map<int,long long,EpetraNode> {
443 
444  public:
445  typedef long long GlobalOrdinal;
446  typedef int LocalOrdinal;
447  typedef EpetraNode Node;
448 
450 
451 
453  TpetraMap (global_size_t numGlobalElements,
454  GlobalOrdinal indexBase,
455  const Teuchos::RCP< const Teuchos::Comm< int > > &comm,
458  }
459 
461  TpetraMap (global_size_t numGlobalElements,
462  size_t numLocalElements,
463  GlobalOrdinal indexBase,
464  const Teuchos::RCP< const Teuchos::Comm< int > > &comm) {
466  }
467 
469  TpetraMap (global_size_t numGlobalElements,
470  const Teuchos::ArrayView< const GlobalOrdinal > &elementList,
471  GlobalOrdinal indexBase,
472  const Teuchos::RCP< const Teuchos::Comm< int > > &comm) {
474  }
475 
478 
480 
482 
483 
485  global_size_t getGlobalNumElements() const { return 0; }
486 
488  size_t getNodeNumElements() const { return 0; }
489 
491  GlobalOrdinal getIndexBase() const { return 0; }
492 
494  LocalOrdinal getMinLocalIndex() const { return 0; }
495 
497  LocalOrdinal getMaxLocalIndex() const { return 0; }
498 
500  GlobalOrdinal getMinGlobalIndex() const { return 0; }
501 
503  GlobalOrdinal getMaxGlobalIndex() const { return 0; }
504 
506  GlobalOrdinal getMinAllGlobalIndex() const { return 0; }
507 
509  GlobalOrdinal getMaxAllGlobalIndex() const { return 0; }
510 
512  LocalOrdinal getLocalElement(GlobalOrdinal globalIndex) const { return 0; }
513 
515  GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const { return 0; }
516 
518  LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList, const Teuchos::ArrayView< LocalOrdinal > &LIDList) const { return Xpetra::IDNotPresent; }
519 
521  LookupStatus getRemoteIndexList(const Teuchos::ArrayView< const GlobalOrdinal > &GIDList, const Teuchos::ArrayView< int > &nodeIDList) const { return Xpetra::IDNotPresent; }
522 
524  Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const { return Teuchos::ArrayView<const GlobalOrdinal>(); }
525 
527 
529 
530 
532  bool isNodeLocalElement(LocalOrdinal localIndex) const { return false; }
533 
535  bool isNodeGlobalElement(GlobalOrdinal globalIndex) const { return false; }
536 
538  bool isContiguous() const { return false; }
539 
541  bool isDistributed() const { return false; }
542 
544  bool isCompatible(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
545 
547  bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const { return false; }
548 
550 
552 
553 
555  Teuchos::RCP< const Teuchos::Comm< int > > getComm() const { return Teuchos::null; }
556 
557 
559 
561 
562 
564  std::string description() const { return std::string(""); }
565 
567  void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const { }
568 
569  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > removeEmptyProcesses () const { return Teuchos::null; }
570  RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > replaceCommWithSubset (const Teuchos::RCP<const Teuchos::Comm<int> >& newComm) const { return Teuchos::null; }
571 
573 
575 
576 
578  TpetraMap(const Teuchos::RCP<const Tpetra::Map<LocalOrdinal, GlobalOrdinal, Node > > &map) {
580  }
581 
583  UnderlyingLib lib() const { return UseTpetra; }
584 
586  RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const { return Teuchos::null; }
587 
588 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
589 #ifdef HAVE_XPETRA_TPETRA
590  using local_map_type = typename Map<LocalOrdinal, GlobalOrdinal, Node>::local_map_type;
592  local_map_type getLocalMap () const {
593  // We will never be here, this is a stub class
594  return local_map_type();
595  }
596 #endif
597 #endif
598 
600  }; // TpetraMap class (specialization for GO=int and NO=EpetraNode)
601 #endif
602 
603 #endif // HAVE_XPETRA_EPETRA
604 
605 } // Xpetra namespace
606 
607 // TODO: remove?
609 template <class LocalOrdinal, class GlobalOrdinal, class Node>
611  XPETRA_MONITOR("TpetraMap==TpetraMap");
612  return map1.isSameAs(map2);
613 }
614 
616 template <class LocalOrdinal, class GlobalOrdinal, class Node>
618  XPETRA_MONITOR("TpetraMap!=TpetraMap");
619  return !map1.isSameAs(map2);
620 }
621 
622 #endif // XPETRA_TPETRAMAP_DEF_HPP
623 
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this node.
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?)
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
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.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
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.
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.
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.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const
Return a view of the global indices owned by this 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.
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.
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.
bool isSameAs(const Map< LocalOrdinal, GlobalOrdinal, Node > &map) const
True if and only if map is identical to this Map.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map&#39;s Comm object.
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 getMinAllGlobalIndex() const
The minimum global index over all processes in the communicator.
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.
size_t global_size_t
Global size_t object.
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.
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.
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Map() const
Get the underlying Tpetra map.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Get this Map&#39;s Comm object.
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
GlobalOrdinal getGlobalElement(LocalOrdinal localIndex) const
The global index corresponding to the given local index.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
GlobalOrdinal getMaxGlobalIndex() const
The maximum global index owned by the calling process.
Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() 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.
UnderlyingLib lib() const
Get the library used by this object (Tpetra or Epetra?)
LocalOrdinal getMaxLocalIndex() const
The maximum local index on the calling process.
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
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)
size_t getNodeNumElements() const
The number of elements belonging to the calling node.
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.
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.
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.
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.