Xpetra_EpetraCrsGraph.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_EPETRACRSGRAPH_HPP
47 #define XPETRA_EPETRACRSGRAPH_HPP
48 
49 /* this file is automatically generated - do not edit (see script/epetra.py) */
50 
52 
53 #include "Xpetra_CrsGraph.hpp"
54 
55 #include "Xpetra_EpetraExport.hpp"
56 #include "Xpetra_EpetraImport.hpp"
57 #include "Xpetra_EpetraMap.hpp"
58 #include "Xpetra_EpetraUtils.hpp"
59 
60 #include <Epetra_CrsGraph.h>
61 
62 namespace Xpetra {
63 
64 // TODO: move that elsewhere
65 template<class GlobalOrdinal, class Node>
66 RCP< const CrsGraph<int, GlobalOrdinal, Node> >
67 toXpetra (const Epetra_CrsGraph& graph);
68 
69 template<class GlobalOrdinal, class Node>
70 const Epetra_CrsGraph&
71 toEpetra (const RCP<const CrsGraph<int, GlobalOrdinal, Node> > &graph);
72 
73 template<class GlobalOrdinal, class Node>
75  : public CrsGraph<int, GlobalOrdinal, Node>
76 {
77  typedef int LocalOrdinal;
78 
81 
82 public:
83 
85 
86  EpetraCrsGraphT(const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< Teuchos::ParameterList > &plist=Teuchos::null) {
89  "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
90  }
91 
93  EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null) {
95  "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
96  }
97 
99  // Definition not in cpp, so comment out
100  EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null) {
102  "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
103  }
104 
106  virtual ~EpetraCrsGraphT() { }
107 
109 
111 
112 
114  void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView<const GlobalOrdinal> &indices) { }
115 
117  void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal> &indices) { }
118 
120  void removeLocalIndices(LocalOrdinal localRow) { }
121 
123 
125 
126 
128  void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null){ }
129 
131  void fillComplete(const RCP< ParameterList > &params=null) { }
133 
135 
136 
139  return Teuchos::null;
140  }
141 
144 
147 
150 
153 
156 
159 
161  global_size_t getGlobalNumRows() const { return 0; }
162 
164  global_size_t getGlobalNumCols() const { return 0; }
165 
167  size_t getNodeNumRows() const { return 0; }
168 
170  size_t getNodeNumCols() const { return 0; }
171 
173  GlobalOrdinal getIndexBase() const { return 0; }
174 
176  global_size_t getGlobalNumEntries() const { return 0; }
177 
179  size_t getNodeNumEntries() const { return 0; }
180 
182  size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; }
183 
185  size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { return 0; }
186 
188  size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { return 0; }
189 
191  size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { return 0; }
192 
194  size_t getGlobalMaxNumRowEntries() const { return 0; }
195 
197  size_t getNodeMaxNumRowEntries() const { return 0; }
198 
200  bool hasColMap() const { return false; }
201 
203  bool isLocallyIndexed() const { return false; }
204 
206  bool isGloballyIndexed() const { return false; }
207 
209  bool isFillComplete() const { return false; }
210 
212  bool isStorageOptimized() const { return false; }
213 
215  void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView<const GlobalOrdinal> &Indices) const { }
216 
218  void getLocalRowView(LocalOrdinal LocalRow, ArrayView<const LocalOrdinal> &indices) const { }
219 
220 
223 
225 
227 
228 
230  std::string description() const { return std::string(""); }
231 
234 
236 
238  //{@
239 
242 
246 
250 
254 
259 
261 
262 
266  "Xpetra::EpetraCrsGraph only available for GO=int or GO=long long with EpetraNode (Serial or OpenMP depending on configuration)");
267  }
268 
270  RCP< const Epetra_CrsGraph> getEpetra_CrsGraph() const { return Teuchos::null; }
271 
273 
274 private:
275 
276 }; // EpetraCrsGraphT class
277 
278 // specialization on GO=int and Node=EpetraNode
279 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
280 template<>
282 : public virtual CrsGraph<int, int, EpetraNode>
283 {
284  typedef int LocalOrdinal;
285  typedef int GlobalOrdinal;
286  typedef EpetraNode Node;
287 
290 
291 public:
292 
294 
295  EpetraCrsGraphT(const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< Teuchos::ParameterList > &plist=Teuchos::null)
297 : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<GlobalOrdinal,Node>(rowMap), maxNumEntriesPerRow, toEpetra(pftype)))) { }
298 
299 
301  // Definition not in cpp, so comment out
302  //EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null);
303 
305  EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null)
306  : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<GlobalOrdinal,Node>(rowMap), toEpetra<GlobalOrdinal,Node>(colMap), maxNumEntriesPerRow, toEpetra(pftype)))) { }
307 
309  // Definition not in cpp, so comment out
310  EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null) {
311  Teuchos::Array<int> numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int"
312  graph_ = Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<GlobalOrdinal,Node>(rowMap), toEpetra<GlobalOrdinal,Node>(colMap), numEntriesPerRowToAlloc.getRawPtr(), toEpetra(pftype)));
313  }
314 
316  virtual ~EpetraCrsGraphT() { }
317 
319 
321 
322 
325  XPETRA_MONITOR("EpetraCrsGraphT::insertGlobalIndices");
326 
327  GlobalOrdinal* indices_rawPtr = const_cast<GlobalOrdinal*>(indices.getRawPtr()); // there is no const in the Epetra interface :(
328  XPETRA_ERR_CHECK(graph_->InsertGlobalIndices(globalRow, indices.size(), indices_rawPtr));
329  }
330 
332  void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal> &indices) {
333  XPETRA_MONITOR("EpetraCrsGraphT::insertLocalIndices");
334 
335  int* indices_rawPtr = const_cast<int*>(indices.getRawPtr()); // there is no const in the Epetra interface :(
336  XPETRA_ERR_CHECK(graph_->InsertMyIndices(localRow, indices.size(), indices_rawPtr));
337  }
338 
340  void removeLocalIndices(LocalOrdinal localRow) { XPETRA_MONITOR("EpetraCrsGraphT::removeLocalIndices"); graph_->RemoveMyIndices(localRow); }
341 
343 
345 
346 
348  void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null){
349  XPETRA_MONITOR("EpetraCrsGraphT::fillComplete");
350 
351  graph_->FillComplete(toEpetra<GlobalOrdinal,Node>(domainMap), toEpetra<GlobalOrdinal,Node>(rangeMap));
352  bool doOptimizeStorage = true;
353  if (params != null && params->get("Optimize Storage",true) == false) doOptimizeStorage = false;
354  if (doOptimizeStorage) graph_->OptimizeStorage();
355  }
356 
358  void fillComplete(const RCP< ParameterList > &params=null) {
359  XPETRA_MONITOR("EpetraCrsGraphT::fillComplete");
360 
361  graph_->FillComplete();
362  bool doOptimizeStorage = true;
363  if (params != null && params->get("Optimize Storage",true) == false) doOptimizeStorage = false;
364  if (doOptimizeStorage) graph_->OptimizeStorage();
365  }
367 
369 
370 
373  XPETRA_MONITOR("EpetraCrsGraphT::getComm");
374  return toXpetra (graph_->Comm ());
375  }
376 
378  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getRowMap"); return toXpetra<GlobalOrdinal,Node>(graph_->RowMap()); }
379 
381  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getColMap"); return toXpetra<GlobalOrdinal,Node>(graph_->ColMap()); }
382 
384  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getDomainMap"); return toXpetra<GlobalOrdinal,Node>(graph_->DomainMap()); }
385 
387  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getRangeMap"); return toXpetra<GlobalOrdinal,Node>(graph_->RangeMap()); }
388 
390  RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const { XPETRA_MONITOR("EpetraCrsGraphT::getImporter"); return toXpetra<GlobalOrdinal,Node>(graph_->Importer()); }
391 
393  RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const { XPETRA_MONITOR("EpetraCrsGraphT::getExporter"); return toXpetra<GlobalOrdinal,Node>(graph_->Exporter()); }
394 
396  global_size_t getGlobalNumRows() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumRows"); return graph_->NumGlobalRows64(); }
397 
399  global_size_t getGlobalNumCols() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumCols"); return graph_->NumGlobalCols64(); }
400 
402  size_t getNodeNumRows() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeNumRows"); return graph_->NumMyRows(); }
403 
405  size_t getNodeNumCols() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeNumCols"); return graph_->NumMyCols(); }
406 
408  GlobalOrdinal getIndexBase() const { XPETRA_MONITOR("EpetraCrsGraphT::getIndexBase"); return (GlobalOrdinal) graph_->IndexBase64(); }
409 
411  global_size_t getGlobalNumEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumEntries"); return graph_->NumGlobalEntries64(); }
412 
414  size_t getNodeNumEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeNumEntries"); return graph_->NumMyEntries(); }
415 
417  size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInGlobalRow"); return graph_->NumGlobalIndices(globalRow); }
418 
420  size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInLocalRow"); return graph_->NumMyIndices(localRow); }
421 
423  size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInGlobalRow"); return graph_->NumAllocatedGlobalIndices(globalRow); }
424 
426  size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInLocalRow"); return graph_->NumAllocatedMyIndices(localRow); }
427 
429  size_t getGlobalMaxNumRowEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalMaxNumRowEntries"); return graph_->GlobalMaxNumIndices(); }
430 
432  size_t getNodeMaxNumRowEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeMaxNumRowEntries"); return graph_->MaxNumIndices(); }
433 
435  bool hasColMap() const { XPETRA_MONITOR("EpetraCrsGraphT::hasColMap"); return graph_->HaveColMap(); }
436 
438  bool isLocallyIndexed() const { XPETRA_MONITOR("EpetraCrsGraphT::isLocallyIndexed"); return graph_->IndicesAreLocal(); }
439 
441  bool isGloballyIndexed() const { XPETRA_MONITOR("EpetraCrsGraphT::isGloballyIndexed"); return graph_->IndicesAreGlobal(); }
442 
444  bool isFillComplete() const { XPETRA_MONITOR("EpetraCrsGraphT::isFillComplete"); return graph_->Filled(); }
445 
447  bool isStorageOptimized() const { XPETRA_MONITOR("EpetraCrsGraphT::isStorageOptimized"); return graph_->StorageOptimized(); }
448 
451  XPETRA_MONITOR("EpetraCrsGraphT::getGlobalRowView");
452 
453  int numEntries;
454  GlobalOrdinal * eIndices;
455 
456  XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices));
457  if (numEntries == 0) { eIndices = NULL; } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor.
458 
459  Indices = ArrayView<const GlobalOrdinal>(eIndices, numEntries);
460  }
461 
464  XPETRA_MONITOR("EpetraCrsGraphT::getLocalRowView");
465 
466  int numEntries;
467  int * eIndices;
468 
469  XPETRA_ERR_CHECK(graph_->ExtractMyRowView(LocalRow, numEntries, eIndices));
470  if (numEntries == 0) { eIndices = NULL; } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor.
471 
472  indices = ArrayView<const int>(eIndices, numEntries);
473  }
474 
477 
478 
480 
481 
482 
484 
485 
487  std::string description() const { XPETRA_MONITOR("EpetraCrsGraphT::description"); return "NotImplemented"; }
488 
491  XPETRA_MONITOR("EpetraCrsGraphT::describe");
492 
493  out << "EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl;
494  const Epetra_BlockMap rowmap = graph_->RowMap();
495  if (rowmap.Comm().MyPID() == 0) out << "** EpetraCrsGraphT **\n\nrowmap" << std::endl;
496  rowmap.Print(out);
497  graph_->Print(out);
498  }
499 
501 
503  //{@
504 
506  Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getMap"); return toXpetra<GlobalOrdinal,Node>(graph_->Map()); }
507 
511  XPETRA_MONITOR("EpetraCrsGraphT::doImport");
512 
513  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
514  XPETRA_DYNAMIC_CAST(const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
515 
516  RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
517  int err = graph_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM));
518  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
519  }
520 
524  XPETRA_MONITOR("EpetraCrsGraphT::doExport");
525 
526  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
527  XPETRA_DYNAMIC_CAST(const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
528 
529  RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
530  int err = graph_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM));
531  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
532  }
533 
537  XPETRA_MONITOR("EpetraCrsGraphT::doImport");
538 
539  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
540  XPETRA_DYNAMIC_CAST(const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
541 
542  RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
543  int err = graph_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM));
544  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
545 
546  }
547 
551  XPETRA_MONITOR("EpetraCrsGraphT::doExport");
552 
553  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
554  XPETRA_DYNAMIC_CAST(const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
555 
556  RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
557  int err = graph_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM));
558  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
559  }
561 
563 
564 
566  EpetraCrsGraphT(const Teuchos::RCP<Epetra_CrsGraph> &graph) : graph_(graph) {
567  TEUCHOS_TEST_FOR_EXCEPTION(!graph->RowMap().GlobalIndicesIsType<GlobalOrdinal>(), std::runtime_error, "Xpetra::EpetraCrsGraphT: GlobalOrdinal mismatch.");
568  }
569 
572 
574 
575 private:
576 
578 
579 
580 };
581 
582 #endif // specialization on Node=EpetraNode and GO=int
583 
584 // specialization on GO=long long and Node=EpetraNode
585 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
586 template<>
587 class EpetraCrsGraphT<long long, EpetraNode>
588 : public virtual CrsGraph<int, long long, EpetraNode>
589 {
590  typedef int LocalOrdinal;
591  typedef long long GlobalOrdinal;
592  typedef EpetraNode Node;
593 
596 
597 public:
598 
600 
601  EpetraCrsGraphT(const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< Teuchos::ParameterList > &plist=Teuchos::null)
603 : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<GlobalOrdinal,Node>(rowMap), maxNumEntriesPerRow, toEpetra(pftype)))) { }
604 
605 
607  // Definition not in cpp, so comment out
608  //EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null);
609 
611  EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null)
612  : graph_(Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<GlobalOrdinal,Node>(rowMap), toEpetra<GlobalOrdinal,Node>(colMap), maxNumEntriesPerRow, toEpetra(pftype)))) { }
613 
615  // Definition not in cpp, so comment out
616  EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null) {
617  Teuchos::Array<int> numEntriesPerRowToAlloc(NumEntriesPerRowToAlloc.begin(), NumEntriesPerRowToAlloc.end()); // convert array of "size_t" to array of "int"
618  graph_ = Teuchos::rcp(new Epetra_CrsGraph(Copy, toEpetra<GlobalOrdinal,Node>(rowMap), toEpetra<GlobalOrdinal,Node>(colMap), numEntriesPerRowToAlloc.getRawPtr(), toEpetra(pftype)));
619  }
620 
622  virtual ~EpetraCrsGraphT() { }
623 
625 
627 
628 
631  XPETRA_MONITOR("EpetraCrsGraphT::insertGlobalIndices");
632 
633  GlobalOrdinal* indices_rawPtr = const_cast<GlobalOrdinal*>(indices.getRawPtr()); // there is no const in the Epetra interface :(
634  XPETRA_ERR_CHECK(graph_->InsertGlobalIndices(globalRow, indices.size(), indices_rawPtr));
635  }
636 
638  void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal> &indices) {
639  XPETRA_MONITOR("EpetraCrsGraphT::insertLocalIndices");
640 
641  int* indices_rawPtr = const_cast<int*>(indices.getRawPtr()); // there is no const in the Epetra interface :(
642  XPETRA_ERR_CHECK(graph_->InsertMyIndices(localRow, indices.size(), indices_rawPtr));
643  }
644 
646  void removeLocalIndices(LocalOrdinal localRow) { XPETRA_MONITOR("EpetraCrsGraphT::removeLocalIndices"); graph_->RemoveMyIndices(localRow); }
647 
649 
651 
652 
654  void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null){
655  XPETRA_MONITOR("EpetraCrsGraphT::fillComplete");
656 
657  graph_->FillComplete(toEpetra<GlobalOrdinal,Node>(domainMap), toEpetra<GlobalOrdinal,Node>(rangeMap));
658  bool doOptimizeStorage = true;
659  if (params != null && params->get("Optimize Storage",true) == false) doOptimizeStorage = false;
660  if (doOptimizeStorage) graph_->OptimizeStorage();
661  }
662 
664  void fillComplete(const RCP< ParameterList > &params=null) {
665  XPETRA_MONITOR("EpetraCrsGraphT::fillComplete");
666 
667  graph_->FillComplete();
668  bool doOptimizeStorage = true;
669  if (params != null && params->get("Optimize Storage",true) == false) doOptimizeStorage = false;
670  if (doOptimizeStorage) graph_->OptimizeStorage();
671  }
673 
675 
676 
679  XPETRA_MONITOR("EpetraCrsGraphT::getComm");
680  return toXpetra (graph_->Comm ());
681  }
682 
684  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getRowMap"); return toXpetra<GlobalOrdinal,Node>(graph_->RowMap()); }
685 
687  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getColMap"); return toXpetra<GlobalOrdinal,Node>(graph_->ColMap()); }
688 
690  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getDomainMap"); return toXpetra<GlobalOrdinal,Node>(graph_->DomainMap()); }
691 
693  RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getRangeMap"); return toXpetra<GlobalOrdinal,Node>(graph_->RangeMap()); }
694 
696  RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const { XPETRA_MONITOR("EpetraCrsGraphT::getImporter"); return toXpetra<GlobalOrdinal,Node>(graph_->Importer()); }
697 
699  RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const { XPETRA_MONITOR("EpetraCrsGraphT::getExporter"); return toXpetra<GlobalOrdinal,Node>(graph_->Exporter()); }
700 
702  global_size_t getGlobalNumRows() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumRows"); return graph_->NumGlobalRows64(); }
703 
705  global_size_t getGlobalNumCols() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumCols"); return graph_->NumGlobalCols64(); }
706 
708  size_t getNodeNumRows() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeNumRows"); return graph_->NumMyRows(); }
709 
711  size_t getNodeNumCols() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeNumCols"); return graph_->NumMyCols(); }
712 
714  GlobalOrdinal getIndexBase() const { XPETRA_MONITOR("EpetraCrsGraphT::getIndexBase"); return (GlobalOrdinal) graph_->IndexBase64(); }
715 
717  global_size_t getGlobalNumEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalNumEntries"); return graph_->NumGlobalEntries64(); }
718 
720  size_t getNodeNumEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeNumEntries"); return graph_->NumMyEntries(); }
721 
723  size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInGlobalRow"); return graph_->NumGlobalIndices(globalRow); }
724 
726  size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumEntriesInLocalRow"); return graph_->NumMyIndices(localRow); }
727 
729  size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInGlobalRow"); return graph_->NumAllocatedGlobalIndices(globalRow); }
730 
732  size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const { XPETRA_MONITOR("EpetraCrsGraphT::getNumAllocatedEntriesInLocalRow"); return graph_->NumAllocatedMyIndices(localRow); }
733 
735  size_t getGlobalMaxNumRowEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getGlobalMaxNumRowEntries"); return graph_->GlobalMaxNumIndices(); }
736 
738  size_t getNodeMaxNumRowEntries() const { XPETRA_MONITOR("EpetraCrsGraphT::getNodeMaxNumRowEntries"); return graph_->MaxNumIndices(); }
739 
741  bool hasColMap() const { XPETRA_MONITOR("EpetraCrsGraphT::hasColMap"); return graph_->HaveColMap(); }
742 
744  bool isLocallyIndexed() const { XPETRA_MONITOR("EpetraCrsGraphT::isLocallyIndexed"); return graph_->IndicesAreLocal(); }
745 
747  bool isGloballyIndexed() const { XPETRA_MONITOR("EpetraCrsGraphT::isGloballyIndexed"); return graph_->IndicesAreGlobal(); }
748 
750  bool isFillComplete() const { XPETRA_MONITOR("EpetraCrsGraphT::isFillComplete"); return graph_->Filled(); }
751 
753  bool isStorageOptimized() const { XPETRA_MONITOR("EpetraCrsGraphT::isStorageOptimized"); return graph_->StorageOptimized(); }
754 
757  XPETRA_MONITOR("EpetraCrsGraphT::getGlobalRowView");
758 
759  int numEntries;
760  GlobalOrdinal * eIndices;
761 
762  XPETRA_ERR_CHECK(graph_->ExtractGlobalRowView(GlobalRow, numEntries, eIndices));
763  if (numEntries == 0) { eIndices = NULL; } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor.
764 
765  Indices = ArrayView<const GlobalOrdinal>(eIndices, numEntries);
766  }
767 
770  XPETRA_MONITOR("EpetraCrsGraphT::getLocalRowView");
771 
772  int numEntries;
773  int * eIndices;
774 
775  XPETRA_ERR_CHECK(graph_->ExtractMyRowView(LocalRow, numEntries, eIndices));
776  if (numEntries == 0) { eIndices = NULL; } // Cf. TEUCHOS_TEST_FOR_EXCEPT( p == 0 && size_in != 0 ) in Teuchos ArrayView constructor.
777 
778  indices = ArrayView<const int>(eIndices, numEntries);
779  }
780 
783 
784 
786 
788 
789 
791  std::string description() const { XPETRA_MONITOR("EpetraCrsGraphT::description"); return "NotImplemented"; }
792 
795  XPETRA_MONITOR("EpetraCrsGraphT::describe");
796 
797  out << "EpetraCrsGraphT::describe : Warning, verbosity level is ignored by this method." << std::endl;
798  const Epetra_BlockMap rowmap = graph_->RowMap();
799  if (rowmap.Comm().MyPID() == 0) out << "** EpetraCrsGraphT **\n\nrowmap" << std::endl;
800  rowmap.Print(out);
801  graph_->Print(out);
802  }
803 
805 
807  //{@
808 
810  Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const { XPETRA_MONITOR("EpetraCrsGraphT::getMap"); return toXpetra<GlobalOrdinal,Node>(graph_->Map()); }
811 
815  XPETRA_MONITOR("EpetraCrsGraphT::doImport");
816 
817  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
818  XPETRA_DYNAMIC_CAST(const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
819 
820  RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
821  int err = graph_->Import(*v, *tImporter.getEpetra_Import(), toEpetra(CM));
822  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
823  }
824 
828  XPETRA_MONITOR("EpetraCrsGraphT::doExport");
829 
830  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
831  XPETRA_DYNAMIC_CAST(const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
832 
833  RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
834  int err = graph_->Export(*v, *tImporter.getEpetra_Import(), toEpetra(CM));
835  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
836  }
837 
841  XPETRA_MONITOR("EpetraCrsGraphT::doImport");
842 
843  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, source, tSource, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
844  XPETRA_DYNAMIC_CAST(const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
845 
846  RCP<const Epetra_CrsGraph> v = tSource.getEpetra_CrsGraph();
847  int err = graph_->Import(*v, *tExporter.getEpetra_Export(), toEpetra(CM));
848  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
849 
850  }
851 
855  XPETRA_MONITOR("EpetraCrsGraphT::doExport");
856 
857  XPETRA_DYNAMIC_CAST(const EpetraCrsGraphT<GlobalOrdinal XPETRA_COMMA Node>, dest, tDest, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraCrsGraphT as input arguments.");
858  XPETRA_DYNAMIC_CAST(const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter, "Xpetra::EpetraCrsGraphT::doImport only accept Xpetra::EpetraImportT as input arguments.");
859 
860  RCP<const Epetra_CrsGraph> v = tDest.getEpetra_CrsGraph();
861  int err = graph_->Export(*v, *tExporter.getEpetra_Export(), toEpetra(CM));
862  TEUCHOS_TEST_FOR_EXCEPTION(err != 0, std::runtime_error, "Catch error code returned by Epetra.");
863  }
865 
867 
868 
870  EpetraCrsGraphT(const Teuchos::RCP<Epetra_CrsGraph> &graph) : graph_(graph) {
871  TEUCHOS_TEST_FOR_EXCEPTION(!graph->RowMap().GlobalIndicesIsType<GlobalOrdinal>(), std::runtime_error, "Xpetra::EpetraCrsGraphT: GlobalOrdinal mismatch.");
872  }
873 
876 
878 
879 private:
880 
882 
883 
884 };
885 #endif // specialization on Node=EpetraNode and GO=int
886 
887 } // Xpetra namespace
888 
889 #endif // XPETRA_EPETRACRSGRAPH_HPP
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNodeMaxNumRowEntries
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:738
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNumEntriesInLocalRow
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:726
Xpetra::EpetraCrsGraphT::describe
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
Definition: Xpetra_EpetraCrsGraph.hpp:233
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getEpetra_CrsGraph
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
Definition: Xpetra_EpetraCrsGraph.hpp:571
Kokkos::Compat::KokkosSerialWrapperNode
Definition: Kokkos_SerialNode.hpp:57
Xpetra_EpetraMap.hpp
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::isLocallyIndexed
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:744
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getMap
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
Definition: Xpetra_EpetraCrsGraph.hpp:810
Epetra_BlockMap::Comm
const Epetra_Comm & Comm() const
Xpetra::EpetraCrsGraphT::getGlobalNumEntries
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:176
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::insertGlobalIndices
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:630
Xpetra::EpetraCrsGraphT< int, EpetraNode >::~EpetraCrsGraphT
virtual ~EpetraCrsGraphT()
Destructor.
Definition: Xpetra_EpetraCrsGraph.hpp:316
Xpetra::EpetraCrsGraphT< int, EpetraNode >::insertGlobalIndices
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:324
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getExporter
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:393
Xpetra::EpetraCrsGraphT< int, EpetraNode >::GlobalOrdinal
int GlobalOrdinal
Definition: Xpetra_EpetraCrsGraph.hpp:285
Xpetra
Xpetra namespace
Definition: Xpetra_BlockedCrsMatrix.hpp:86
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::doImport
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
Definition: Xpetra_EpetraCrsGraph.hpp:813
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::computeGlobalConstants
void computeGlobalConstants()
Force the computation of global constants if we don't have them.
Definition: Xpetra_EpetraCrsGraph.hpp:782
Xpetra::EpetraCrsGraphT::getComm
RCP< const Comm< int > > getComm() const
Returns the communicator.
Definition: Xpetra_EpetraCrsGraph.hpp:138
Xpetra::EpetraCrsGraphT< int, EpetraNode >::LocalOrdinal
int LocalOrdinal
Definition: Xpetra_EpetraCrsGraph.hpp:284
Xpetra::EpetraCrsGraphT::~EpetraCrsGraphT
virtual ~EpetraCrsGraphT()
Destructor.
Definition: Xpetra_EpetraCrsGraph.hpp:106
Xpetra::EpetraCrsGraphT< int, EpetraNode >::isFillComplete
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
Definition: Xpetra_EpetraCrsGraph.hpp:444
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::graph_
RCP< Epetra_CrsGraph > graph_
Definition: Xpetra_EpetraCrsGraph.hpp:881
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNodeNumCols
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:405
Xpetra::global_size_t
size_t global_size_t
Global size_t object.
Definition: Xpetra_ConfigDefs.hpp:170
Xpetra_CrsGraph.hpp
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::doExport
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
Definition: Xpetra_EpetraCrsGraph.hpp:853
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNumEntriesInLocalRow
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:420
Xpetra::EpetraCrsGraphT< int, EpetraNode >::doImport
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
Definition: Xpetra_EpetraCrsGraph.hpp:535
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getGlobalMaxNumRowEntries
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
Definition: Xpetra_EpetraCrsGraph.hpp:429
Xpetra::EpetraCrsGraphT::getNumEntriesInLocalRow
size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of entries on this node in the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:185
Xpetra::EpetraCrsGraphT< int, EpetraNode >::hasColMap
bool hasColMap() const
Whether the graph has a column Map.
Definition: Xpetra_EpetraCrsGraph.hpp:435
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getGlobalNumRows
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:702
Xpetra::EpetraCrsGraphT::doImport
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
Definition: Xpetra_EpetraCrsGraph.hpp:252
Xpetra::DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node >
Xpetra::EpetraCrsGraphT::removeLocalIndices
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:120
Xpetra::DynamicProfile
Definition: Xpetra_ConfigDefs.hpp:187
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::removeLocalIndices
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:646
Xpetra::EpetraCrsGraphT< int, EpetraNode >::removeLocalIndices
void removeLocalIndices(LocalOrdinal localRow)
Remove all graph indices from the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:340
Epetra_BlockMap::Print
virtual void Print(std::ostream &os) const
XPETRA_DYNAMIC_CAST
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
Definition: Xpetra_Exceptions.hpp:58
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::description
std::string description() const
Return a simple one-line description of this object.
Definition: Xpetra_EpetraCrsGraph.hpp:791
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::map_type
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
Definition: Xpetra_EpetraCrsGraph.hpp:595
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNodeNumCols
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:711
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::isGloballyIndexed
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:747
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getDomainMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:384
Xpetra::EpetraCrsGraphT::insertLocalIndices
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:117
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::EpetraCrsGraphT
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
Definition: Xpetra_EpetraCrsGraph.hpp:870
Xpetra::Export
Definition: Xpetra_Export.hpp:62
Xpetra::EpetraCrsGraphT::fillComplete
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
Signal that data entry is complete, specifying domain and range maps.
Definition: Xpetra_EpetraCrsGraph.hpp:128
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::~EpetraCrsGraphT
virtual ~EpetraCrsGraphT()
Destructor.
Definition: Xpetra_EpetraCrsGraph.hpp:622
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getColMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:687
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getIndexBase
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:408
Xpetra::EpetraCrsGraphT::getNumAllocatedEntriesInLocalRow
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:191
Xpetra::toXpetra
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
Definition: Xpetra_EpetraCrsGraph.cpp:168
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getRowMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:378
Xpetra::EpetraCrsGraphT::getNodeNumCols
size_t getNodeNumCols() const
Returns the number of columns connected to the locally owned rows of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:170
rcp
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::EVerbosityLevel
EVerbosityLevel
Xpetra::EpetraCrsGraphT::getRowMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:143
Xpetra::EpetraCrsGraphT< int, EpetraNode >::insertLocalIndices
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:332
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::describe
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
Definition: Xpetra_EpetraCrsGraph.hpp:794
Xpetra::EpetraCrsGraphT::computeGlobalConstants
void computeGlobalConstants()
Force the computation of global constants if we don't have them.
Definition: Xpetra_EpetraCrsGraph.hpp:222
Xpetra::EpetraCrsGraphT::map_type
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
Definition: Xpetra_EpetraCrsGraph.hpp:80
Xpetra::EpetraCrsGraphT::getMap
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
Definition: Xpetra_EpetraCrsGraph.hpp:241
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getGlobalRowView
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
Definition: Xpetra_EpetraCrsGraph.hpp:450
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNumAllocatedEntriesInLocalRow
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:426
Teuchos::ArrayView
Xpetra_EpetraImport.hpp
Xpetra::EpetraCrsGraphT::getNodeNumEntries
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:179
Xpetra::Map
Definition: Xpetra_Map.hpp:90
Xpetra::EpetraCrsGraphT::getColMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:146
Xpetra::Import
Definition: Xpetra_Import.hpp:62
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getImporter
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:696
Xpetra::CombineMode
CombineMode
Xpetra::Combine Mode enumerable type.
Definition: Xpetra_ConfigDefs.hpp:214
Teuchos::RCP
Xpetra::EpetraCrsGraphT::getNodeMaxNumRowEntries
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:197
Xpetra::EpetraCrsGraphT< int, EpetraNode >::describe
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
Definition: Xpetra_EpetraCrsGraph.hpp:490
Xpetra::EpetraCrsGraphT
Definition: Xpetra_EpetraCrsGraph.hpp:74
Teuchos::Array
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getGlobalNumCols
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:705
Xpetra::EpetraCrsGraphT::getDomainMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:149
Xpetra::EpetraCrsGraphT::getNumEntriesInGlobalRow
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
Definition: Xpetra_EpetraCrsGraph.hpp:182
Xpetra::EpetraCrsGraphT< int, EpetraNode >::map_type
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
Definition: Xpetra_EpetraCrsGraph.hpp:289
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::insertLocalIndices
void insertLocalIndices(const LocalOrdinal localRow, const ArrayView< const LocalOrdinal > &indices)
Insert local indices into the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:638
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNumEntriesInGlobalRow
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
Definition: Xpetra_EpetraCrsGraph.hpp:723
Xpetra::EpetraCrsGraphT< int, EpetraNode >::computeGlobalConstants
void computeGlobalConstants()
Force the computation of global constants if we don't have them.
Definition: Xpetra_EpetraCrsGraph.hpp:476
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getGlobalNumCols
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:399
Teuchos::ArrayRCP
Xpetra::EpetraCrsGraphT::getLocalRowView
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
Definition: Xpetra_EpetraCrsGraph.hpp:218
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::doImport
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import (using an Exporter).
Definition: Xpetra_EpetraCrsGraph.hpp:839
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getRangeMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:693
Xpetra_EpetraUtils.hpp
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getRowMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRowMap() const
Returns the Map that describes the row distribution in this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:684
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNodeNumEntries
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:414
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getGlobalNumRows
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:396
Xpetra::Exceptions::RuntimeError
Exception throws to report errors in the internal logical of the program.
Definition: Xpetra_Exceptions.hpp:101
Xpetra::EpetraCrsGraphT< int, EpetraNode >::doExport
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
Definition: Xpetra_EpetraCrsGraph.hpp:549
Xpetra::EpetraCrsGraphT::getGlobalNumCols
global_size_t getGlobalNumCols() const
Returns the number of global columns in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:164
Teuchos::basic_FancyOStream
Teuchos::ArrayView::size
size_type size() const
Xpetra::EpetraCrsGraphT::isLocallyIndexed
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:203
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::doExport
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
Definition: Xpetra_EpetraCrsGraph.hpp:826
Xpetra::EpetraCrsGraphT< int, EpetraNode >::EpetraCrsGraphT
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
Definition: Xpetra_EpetraCrsGraph.hpp:566
Xpetra::CrsGraph
Definition: Xpetra_CrsGraph.hpp:80
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNodeNumRows
size_t getNodeNumRows() const
Returns the number of graph rows owned on the calling node.
Definition: Xpetra_EpetraCrsGraph.hpp:402
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getGlobalMaxNumRowEntries
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
Definition: Xpetra_EpetraCrsGraph.hpp:735
Xpetra::EpetraCrsGraphT< int, EpetraNode >::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null)
Constructor specifying column Map and fixed number of entries for each row.
Definition: Xpetra_EpetraCrsGraph.hpp:305
Xpetra::EpetraCrsGraphT::isFillComplete
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
Definition: Xpetra_EpetraCrsGraph.hpp:209
Xpetra::EpetraCrsGraphT::getExporter
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:158
Xpetra::EpetraCrsGraphT::hasColMap
bool hasColMap() const
Whether the graph has a column Map.
Definition: Xpetra_EpetraCrsGraph.hpp:200
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNumAllocatedEntriesInGlobalRow
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row .
Definition: Xpetra_EpetraCrsGraph.hpp:423
Xpetra::EpetraCrsGraphT< int, EpetraNode >::isGloballyIndexed
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:441
Xpetra::EpetraCrsGraphT::LocalOrdinal
int LocalOrdinal
Definition: Xpetra_EpetraCrsGraph.hpp:77
Xpetra::EpetraCrsGraphT::getEpetra_CrsGraph
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
Definition: Xpetra_EpetraCrsGraph.hpp:270
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null)
Constructor specifying column Map and fixed number of entries for each row.
Definition: Xpetra_EpetraCrsGraph.hpp:611
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getLocalRowView
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
Definition: Xpetra_EpetraCrsGraph.hpp:463
Xpetra::EpetraCrsGraphT< int, EpetraNode >::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
Definition: Xpetra_EpetraCrsGraph.hpp:310
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getEpetra_CrsGraph
RCP< const Epetra_CrsGraph > getEpetra_CrsGraph() const
Get the underlying Epetra graph.
Definition: Xpetra_EpetraCrsGraph.hpp:875
Xpetra::EpetraCrsGraphT::isStorageOptimized
bool isStorageOptimized() const
Returns true if storage has been optimized.
Definition: Xpetra_EpetraCrsGraph.hpp:212
Teuchos::ArrayView::getRawPtr
T * getRawPtr() const
Xpetra::EpetraCrsGraphT::insertGlobalIndices
void insertGlobalIndices(GlobalOrdinal globalRow, const ArrayView< const GlobalOrdinal > &indices)
Insert global indices into the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:114
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNodeNumEntries
size_t getNodeNumEntries() const
Returns the local number of entries in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:720
Xpetra::EpetraCrsGraphT::getGlobalRowView
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
Definition: Xpetra_EpetraCrsGraph.hpp:215
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getDomainMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getDomainMap() const
Returns the Map associated with the domain of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:690
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::isFillComplete
bool isFillComplete() const
Whether fillComplete() has been called and the graph is in compute mode.
Definition: Xpetra_EpetraCrsGraph.hpp:750
Epetra_BlockMap
Xpetra::EpetraCrsGraphT::EpetraCrsGraphT
EpetraCrsGraphT(const Teuchos::RCP< Epetra_CrsGraph > &graph)
EpetraCrsGraphT constructor to wrap a Epetra_CrsGraph object.
Definition: Xpetra_EpetraCrsGraph.hpp:264
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getImporter
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:390
Xpetra::EpetraCrsGraphT::getNodeNumRows
size_t getNodeNumRows() const
Returns the number of graph rows owned on the calling node.
Definition: Xpetra_EpetraCrsGraph.hpp:167
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getComm
RCP< const Comm< int > > getComm() const
Returns the communicator.
Definition: Xpetra_EpetraCrsGraph.hpp:678
Xpetra::EpetraCrsGraphT::getNumAllocatedEntriesInGlobalRow
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row .
Definition: Xpetra_EpetraCrsGraph.hpp:188
Xpetra::EpetraCrsGraphT< int, EpetraNode >::description
std::string description() const
Return a simple one-line description of this object.
Definition: Xpetra_EpetraCrsGraph.hpp:487
Xpetra::EpetraCrsGraphT::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const map_type > &rowMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const RCP< Teuchos::ParameterList > &plist=Teuchos::null)
Constructor specifying fixed number of entries for each row.
Definition: Xpetra_EpetraCrsGraph.hpp:87
Xpetra::EpetraCrsGraphT::doExport
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export (using an Importer).
Definition: Xpetra_EpetraCrsGraph.hpp:256
Xpetra::EpetraCrsGraphT< int, EpetraNode >::doExport
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
Definition: Xpetra_EpetraCrsGraph.hpp:522
Xpetra::EpetraImportT
Definition: Xpetra_EpetraImport.hpp:66
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::Node
EpetraNode Node
Definition: Xpetra_EpetraCrsGraph.hpp:592
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::GlobalOrdinal
long long GlobalOrdinal
Definition: Xpetra_EpetraCrsGraph.hpp:591
Xpetra::toEpetra
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
Definition: Xpetra_EpetraCrsGraph.cpp:57
Xpetra::EpetraCrsGraphT::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
Definition: Xpetra_EpetraCrsGraph.hpp:100
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::fillComplete
void fillComplete(const RCP< ParameterList > &params=null)
Signal that data entry is complete.
Definition: Xpetra_EpetraCrsGraph.hpp:664
Xpetra::EpetraExportT
Definition: Xpetra_EpetraExport.hpp:68
Xpetra::EpetraCrsGraphT::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, size_t maxNumEntriesPerRow, ProfileType pftype=DynamicProfile, const Teuchos::RCP< Teuchos::ParameterList > &plist=null)
Constructor specifying column Map and fixed number of entries for each row.
Definition: Xpetra_EpetraCrsGraph.hpp:93
Xpetra::EpetraCrsGraphT::doExport
void doExport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export.
Definition: Xpetra_EpetraCrsGraph.hpp:248
Teuchos::ArrayRCP::end
iterator end() const
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNumAllocatedEntriesInLocalRow
size_t getNumAllocatedEntriesInLocalRow(LocalOrdinal localRow) const
Returns the current number of allocated entries on this node in the specified local row.
Definition: Xpetra_EpetraCrsGraph.hpp:732
Epetra_CrsGraph
Xpetra::EpetraCrsGraphT< int, EpetraNode >::fillComplete
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
Signal that data entry is complete, specifying domain and range maps.
Definition: Xpetra_EpetraCrsGraph.hpp:348
Xpetra::EpetraCrsGraphT< int, EpetraNode >::graph_
RCP< Epetra_CrsGraph > graph_
Definition: Xpetra_EpetraCrsGraph.hpp:577
Xpetra::EpetraCrsGraphT< int, EpetraNode >::doImport
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
Definition: Xpetra_EpetraCrsGraph.hpp:509
Xpetra::EpetraCrsGraphT::getGlobalMaxNumRowEntries
size_t getGlobalMaxNumRowEntries() const
Maximum number of entries in all rows over all processes.
Definition: Xpetra_EpetraCrsGraph.hpp:194
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getGlobalNumEntries
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:411
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::isStorageOptimized
bool isStorageOptimized() const
Returns true if storage has been optimized.
Definition: Xpetra_EpetraCrsGraph.hpp:753
Xpetra::EpetraCrsGraphT::fillComplete
void fillComplete(const RCP< ParameterList > &params=null)
Signal that data entry is complete.
Definition: Xpetra_EpetraCrsGraph.hpp:131
Teuchos::ArrayRCP::begin
iterator begin() const
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getColMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getColMap() const
Returns the Map that describes the column distribution in this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:381
Xpetra::EpetraCrsGraphT::getGlobalNumRows
global_size_t getGlobalNumRows() const
Returns the number of global rows in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:161
Xpetra::EpetraCrsGraphT< int, EpetraNode >::fillComplete
void fillComplete(const RCP< ParameterList > &params=null)
Signal that data entry is complete.
Definition: Xpetra_EpetraCrsGraph.hpp:358
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNodeNumRows
size_t getNodeNumRows() const
Returns the number of graph rows owned on the calling node.
Definition: Xpetra_EpetraCrsGraph.hpp:708
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::EpetraCrsGraphT
EpetraCrsGraphT(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rowMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap, const ArrayRCP< const size_t > &NumEntriesPerRowToAlloc, ProfileType pftype=DynamicProfile, const RCP< ParameterList > &params=null)
Definition: Xpetra_EpetraCrsGraph.hpp:616
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getNumAllocatedEntriesInGlobalRow
size_t getNumAllocatedEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of allocated entries for this node in the specified global row .
Definition: Xpetra_EpetraCrsGraph.hpp:729
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getMap
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
Implements DistObject interface.
Definition: Xpetra_EpetraCrsGraph.hpp:506
Xpetra::EpetraCrsGraphT::doImport
void doImport(const DistObject< GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import.
Definition: Xpetra_EpetraCrsGraph.hpp:244
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNodeMaxNumRowEntries
size_t getNodeMaxNumRowEntries() const
Maximum number of entries in all rows owned by the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:432
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::fillComplete
void fillComplete(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap, const RCP< ParameterList > &params=null)
Signal that data entry is complete, specifying domain and range maps.
Definition: Xpetra_EpetraCrsGraph.hpp:654
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getNumEntriesInGlobalRow
size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const
Returns the current number of entries on this node in the specified global row.
Definition: Xpetra_EpetraCrsGraph.hpp:417
XPETRA_ERR_CHECK
#define XPETRA_ERR_CHECK(arg)
Definition: Xpetra_ConfigDefs.hpp:271
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getRangeMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:387
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getExporter
RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > getExporter() const
Returns the exporter associated with this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:699
Xpetra::EpetraCrsGraphT::getImporter
RCP< const Import< LocalOrdinal, GlobalOrdinal, Node > > getImporter() const
Returns the importer associated with this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:155
Xpetra_EpetraConfigDefs.hpp
Xpetra::EpetraCrsGraphT< int, EpetraNode >::getComm
RCP< const Comm< int > > getComm() const
Returns the communicator.
Definition: Xpetra_EpetraCrsGraph.hpp:372
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::LocalOrdinal
int LocalOrdinal
Definition: Xpetra_EpetraCrsGraph.hpp:590
Xpetra::EpetraCrsGraphT< int, EpetraNode >::Node
EpetraNode Node
Definition: Xpetra_EpetraCrsGraph.hpp:286
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getIndexBase
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:714
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getGlobalNumEntries
global_size_t getGlobalNumEntries() const
Returns the global number of entries in the graph.
Definition: Xpetra_EpetraCrsGraph.hpp:717
Teuchos::Describable::verbLevel_default
static const EVerbosityLevel verbLevel_default
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getLocalRowView
void getLocalRowView(LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices) const
Return a const, nonpersisting view of local indices in the given row.
Definition: Xpetra_EpetraCrsGraph.hpp:769
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::hasColMap
bool hasColMap() const
Whether the graph has a column Map.
Definition: Xpetra_EpetraCrsGraph.hpp:741
Xpetra_EpetraExport.hpp
TEUCHOS_TEST_FOR_EXCEPTION
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Xpetra::EpetraCrsGraphT< long long, EpetraNode >::getGlobalRowView
void getGlobalRowView(GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &Indices) const
Return a const, nonpersisting view of global indices in the given row.
Definition: Xpetra_EpetraCrsGraph.hpp:756
XPETRA_MONITOR
#define XPETRA_MONITOR(funcName)
Definition: Xpetra_ConfigDefs.hpp:128
Copy
Copy
Xpetra::EpetraCrsGraphT::isGloballyIndexed
bool isGloballyIndexed() const
Whether column indices are stored using global indices on the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:206
Epetra_Comm::MyPID
virtual int MyPID() const=0
Xpetra::EpetraCrsGraphT::getRangeMap
RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getRangeMap() const
Returns the Map associated with the domain of this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:152
Xpetra::EpetraCrsGraphT< int, EpetraNode >::isLocallyIndexed
bool isLocallyIndexed() const
Whether column indices are stored using local indices on the calling process.
Definition: Xpetra_EpetraCrsGraph.hpp:438
Epetra_CrsGraph::RowMap
const Epetra_BlockMap & RowMap() const
Xpetra::EpetraCrsGraphT::description
std::string description() const
Return a simple one-line description of this object.
Definition: Xpetra_EpetraCrsGraph.hpp:230
Xpetra::ProfileType
ProfileType
Definition: Xpetra_ConfigDefs.hpp:185
Xpetra::EpetraCrsGraphT< int, EpetraNode >::isStorageOptimized
bool isStorageOptimized() const
Returns true if storage has been optimized.
Definition: Xpetra_EpetraCrsGraph.hpp:447
Xpetra::EpetraCrsGraphT::getIndexBase
GlobalOrdinal getIndexBase() const
Returns the index base for global indices for this graph.
Definition: Xpetra_EpetraCrsGraph.hpp:173