Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Epetra_CrsMatrix.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Epetra: Linear Algebra Services Package
6 // Copyright 2011 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 Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_CRSMATRIX_H
45 #define EPETRA_CRSMATRIX_H
46 
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
48 #ifdef __GNUC__
49 #warning "The Epetra package is deprecated"
50 #endif
51 #endif
52 
53 
54 
55 #include "Epetra_ConfigDefs.h"
56 #include "Epetra_DistObject.h"
57 #include "Epetra_CompObject.h"
58 #include "Epetra_BLAS.h"
59 #include "Epetra_RowMatrix.h"
60 #include "Epetra_Operator.h"
61 #include "Epetra_CrsGraph.h"
62 #include "Epetra_Map.h"
63 
64 #ifdef Epetra_ENABLE_CASK
65 #include "cask.h"
66 #endif
67 
68 class Epetra_Map;
69 class Epetra_Import;
70 class Epetra_Export;
71 class Epetra_Vector;
72 class Epetra_MultiVector;
74 
75 
76 // Define this to see a complete dump a an Epetra_CrsMatrix::Multiply(...) call
77 //#define EPETRA_CRS_MATRIX_TRACE_DUMP_MULTIPLY
78 
79 #ifdef EPETRA_CRS_MATRIX_TRACE_DUMP_MULTIPLY
80 extern bool Epetra_CrsMatrixTraceDumpMultiply;
81 #endif // EPETRA_CRS_MATRIX_TRACE_DUMP_MULTIPLY
82 
84 
181 class EPETRA_LIB_DLL_EXPORT Epetra_CrsMatrix: public Epetra_DistObject, public Epetra_CompObject, public Epetra_BLAS, public virtual Epetra_RowMatrix {
182  public:
183 
185 
186 
198  Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, const int* NumEntriesPerRow, bool StaticProfile = false);
199 
201 
213  Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, int NumEntriesPerRow, bool StaticProfile = false);
214 
216 
229  Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, const Epetra_Map& ColMap, const int* NumEntriesPerRow, bool StaticProfile = false);
230 
232 
246  Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, const Epetra_Map& ColMap, int NumEntriesPerRow, bool StaticProfile = false);
247 
249 
256 
258 
295  Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Import & RowImporter, const Epetra_Map * DomainMap=0, const Epetra_Map * RangeMap=0, bool RestrictCommunicator = false);
296 
298 
338  Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Import & RowImporter, const Epetra_Import * DomainImporter, const Epetra_Map * DomainMap, const Epetra_Map * RangeMap, bool RestrictCommunicator);
339 
341 
378  Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Export & RowExporter, const Epetra_Map * DomainMap=0, const Epetra_Map * RangeMap=0, bool RestrictCommunicator = false);
379 
381 
421  Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Export & RowExporter, const Epetra_Export * DomainExporter, const Epetra_Map * DomainMap, const Epetra_Map * RangeMap, bool RestrictCommunicator);
422 
423 
425  Epetra_CrsMatrix(const Epetra_CrsMatrix& Matrix);
426 
428  virtual ~Epetra_CrsMatrix();
430 
432 
433 
436 
438 
445  int PutScalar(double ScalarConstant);
446 
448 
455  int Scale(double ScalarConstant);
456 
458 
484 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
485  virtual int InsertGlobalValues(int GlobalRow, int NumEntries, const double* Values, const int* Indices);
486 #endif
487 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
488  virtual int InsertGlobalValues(long long GlobalRow, int NumEntries, const double* Values, const long long* Indices);
489 #endif
490 
492 
518 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
519  virtual int InsertGlobalValues(int GlobalRow, int NumEntries, double* Values, int* Indices);
520 #endif
521 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
522  virtual int InsertGlobalValues(long long GlobalRow, int NumEntries, double* Values, long long* Indices);
523 #endif
524 
526 
538 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
539  virtual int ReplaceGlobalValues(int GlobalRow, int NumEntries, const double* Values, const int* Indices);
540 #endif
541 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
542  virtual int ReplaceGlobalValues(long long GlobalRow, int NumEntries, const double* Values, const long long* Indices);
543 #endif
544 
546 
558 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
559  virtual int SumIntoGlobalValues(int GlobalRow, int NumEntries, const double* Values, const int* Indices);
560 #endif
561 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
562  virtual int SumIntoGlobalValues(long long GlobalRow, int NumEntries, const double* Values, const long long* Indices);
563 #endif
564 
566 
579  int InsertMyValues(int MyRow, int NumEntries, const double* Values, const int* Indices);
580 
582 
595  int InsertMyValues(int MyRow, int NumEntries, double* Values, int* Indices);
596 
598 
610  int ReplaceMyValues(int MyRow, int NumEntries, const double* Values, const int* Indices);
611 
613 
626  int SumIntoMyValues(int MyRow, int NumEntries, const double* Values, const int* Indices);
627 
629 
642  int ReplaceDiagonalValues(const Epetra_Vector& Diagonal);
643 
645 
647 
648 
649 
651  /* This version of FillComplete assumes that the domain and range
652  distributions are identical to the matrix row distributions.
653  \param OptimizeDataStorage - (In) If true, storage will be packed for optimal performance. Depending
654  on how the matrix was constructed, optimizing the storage may have no impact on performance
655  or one-time memory use, or may have a large impact. If the user was careful in allocating memory
656  for the matrix by setting StaticProfile to true in the matrix constructor, then no extra storage
657  will be allocated in attempting to optimize storage. If the user did not set StaticProfile to true,
658  then optimizing the storage will temporarily use additional memory, will have a noticeable impact
659  on performance and ultimately reduce the storage associated with the matrix.
660 
661  By default storage will be optimized. If you cannot tolerate the increased temporary memory use,
662  should set this value to false.
663 
664  \return error code, 0 if successful. Returns a positive warning code of 3
665  if the matrix is rectangular (meaning that the other overloading of
666  FillComplete should have been called, with differen domain-map and
667  range-map specified).
668  */
669  int FillComplete(bool OptimizeDataStorage = true);
670 
672  /* This version of FillComplete requires the explicit specification of the domain
673  and range distribution maps. These maps are used for importing and exporting vector
674  and multi-vector elements that are needed for distributed matrix computations. For
675  example, to compute y = Ax in parallel, we would specify the DomainMap as the distribution
676  of the vector x and the RangeMap as the distribution of the vector y.
677  \param DomainMap - (In) Map that describes the distribution of vector and multi-vectors in the
678  matrix domain.
679  \param RangeMap - (In) Map that describes the distribution of vector and multi-vectors in the
680  matrix range.
681 
682  \param OptimizeDataStorage - (In) If true, storage will be packed for optimal performance. Depending
683  on how the matrix was constructed, optimizing the storage may have no impact on performance
684  or one-time memory use, or may have a large impact. If the user was careful in allocating memory
685  for the matrix by setting StaticProfile to true in the matrix constructor, then no extra storage
686  will be allocated in attempting to optimize storage. If the user did not set StaticProfile to true,
687  then optimizing the storage will temporarily use additional memory, will have a noticeable impact
688  on performance and ultimately reduce the storage associated with the matrix.
689 
690  By default storage will be optimized. If you cannot tolerate the increased temporary memory use,
691  should set this value to false.
692 
693  \return error code, 0 if successful. positive warning code of 2 if it is detected that the
694  matrix-graph got out of sync since this matrix was constructed (for instance if
695  graph.FillComplete() was called by another matrix that shares the graph)
696 
697  \post IndicesAreLocal()==true
698  */
699  int FillComplete(const Epetra_Map& DomainMap, const Epetra_Map& RangeMap, bool OptimizeDataStorage = true);
700 
702 
722  int OptimizeStorage();
723 
724 
726  int MakeDataContiguous() {EPETRA_CHK_ERR(OptimizeStorage()); return(0);}
728 
730 
731 
733 
743 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
744  int ExtractGlobalRowCopy(int GlobalRow, int Length, int& NumEntries, double* Values, int* Indices) const;
745 #endif
746 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
747  int ExtractGlobalRowCopy(long long GlobalRow, int Length, int& NumEntries, double* Values, long long* Indices) const;
748 #endif
749 
751 
762  int ExtractMyRowCopy(int MyRow, int Length, int& NumEntries, double* Values, int* Indices) const;
763 
765 
773 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
774  int ExtractGlobalRowCopy(int GlobalRow, int Length, int& NumEntries, double* Values) const;
775 #endif
776 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
777  int ExtractGlobalRowCopy(long long GlobalRow, int Length, int& NumEntries, double* Values) const;
778 #endif
779 
781 
789  int ExtractMyRowCopy(int MyRow, int Length, int& NumEntries, double* Values) const;
790 
792 
799  int ExtractDiagonalCopy(Epetra_Vector& Diagonal) const;
800 
802 
813 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
814  int ExtractGlobalRowView(int GlobalRow, int& NumEntries, double*& Values, int*& Indices) const;
815 #endif
816 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
817  int ExtractGlobalRowView(long long GlobalRow, int& NumEntries, double*& Values, long long*& Indices) const;
818 #endif
819 
821 
832  int ExtractMyRowView(int MyRow, int& NumEntries, double*& Values, int*& Indices) const;
833 
835 
842 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
843  int ExtractGlobalRowView(int GlobalRow, int& NumEntries, double*& Values) const;
844 #endif
845 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
846  int ExtractGlobalRowView(long long GlobalRow, int& NumEntries, double*& Values) const;
847 #endif
848 
850 
857  int ExtractMyRowView(int MyRow, int& NumEntries, double*& Values) const;
859 
861 
862 
864 
873  int Multiply(bool TransA, const Epetra_Vector& x, Epetra_Vector& y) const;
874  int Multiply1(bool TransA, const Epetra_Vector& x, Epetra_Vector& y) const;
875 
876 
878 
887  int Multiply(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
888  int Multiply1(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
889 
891 
902  int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector& x, Epetra_Vector& y) const;
903 
905 
916  int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
917 
919 
935  int InvRowSums(Epetra_Vector& x) const;
936 
938 
950  int InvRowMaxs(Epetra_Vector& x) const;
951 
953 
961  int LeftScale(const Epetra_Vector& x);
962 
964 
981  int InvColSums(Epetra_Vector& x) const;
982 
984 
996  int InvColMaxs(Epetra_Vector& x) const;
997 
999 
1007  int RightScale(const Epetra_Vector& x);
1009 
1011 
1012 
1013 
1015  bool Filled() const {return(Graph_.Filled());}
1016 
1018  bool StorageOptimized() const {return(StorageOptimized_);}
1019 
1021  bool IndicesAreGlobal() const {return(Graph_.IndicesAreGlobal());}
1022 
1024  bool IndicesAreLocal() const {return(Graph_.IndicesAreLocal());}
1025 
1027  bool IndicesAreContiguous() const {return(Graph_.IndicesAreContiguous());}
1028 
1030  bool LowerTriangular() const {return(Graph_.LowerTriangular());}
1031 
1033  bool UpperTriangular() const {return(Graph_.UpperTriangular());}
1034 
1036  bool NoDiagonal() const {return(Graph_.NoDiagonal());}
1037 
1039 
1041 
1042 
1044  /* Returns the quantity \f$ \| A \|_\infty\f$ such that
1045  \f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f]
1046  \warning The NormInf() method will not properly calculate the infinity norm for a matrix that has entries that are
1047  replicated on multiple processors. */
1048  double NormInf() const;
1049 
1051  /* Returns the quantity \f$ \| A \|_1\f$ such that
1052  \f[\| A \|_1= \max_{1\lej\len} \sum_{i=1}^m |a_{ij}| \f].
1053  \warning The NormOne() method will not properly calculate the one norm for a matrix that has entries that are
1054  replicated on multiple processors.
1055  */
1056  double NormOne() const;
1057 
1059  /* Returns the quantity \f[ \| A \|_{Frobenius} = \sqrt{\sum_{i=1}^m \sum_{j=1}^n\|a_{ij}\|^2}\f]
1060  \warning the NormFrobenius() method will not properly calculate the frobenius norm for a matrix that
1061  has entries which are replicated on multiple processors. In that case, the returned
1062  norm will be larger than the true norm.
1063  */
1064  double NormFrobenius() const;
1065 
1067  /*
1068  Note that if maps are defined such that some nonzeros appear on
1069  multiple processors, then those nonzeros will be counted multiple times.
1070  If the user wishes to assemble a matrix from overlapping submatrices,
1071  they can use Epetra_FECrsMatrix.
1072  */
1073 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1074  int NumGlobalNonzeros() const {
1075  if(RowMap().GlobalIndicesInt())
1076  return (int) NumGlobalNonzeros64();
1077  throw "Epetra_CrsMatrix::NumGlobalNonzeros: GlobalIndices not int.";
1078  }
1079 #endif
1080  long long NumGlobalNonzeros64() const {return(Graph_.NumGlobalNonzeros64());}
1081 
1083 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1084  int NumGlobalRows() const {
1085  if(RowMap().GlobalIndicesInt())
1086  return (int) NumGlobalRows64();
1087  throw "Epetra_CrsMatrix::NumGlobalRows: GlobalIndices not int.";
1088  }
1089 #endif
1090  long long NumGlobalRows64() const {return(Graph_.NumGlobalRows64());}
1091 
1093 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1094  int NumGlobalCols() const {
1095  if(RowMap().GlobalIndicesInt())
1096  return (int) NumGlobalCols64();
1097  throw "Epetra_CrsMatrix::NumGlobalCols: GlobalIndices not int.";
1098  }
1099 #endif
1100  long long NumGlobalCols64() const {return(Graph_.NumGlobalCols64());}
1101 
1103 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1104  int NumGlobalDiagonals() const {
1105  if(RowMap().GlobalIndicesInt())
1106  return (int) NumGlobalDiagonals64();
1107  throw "Epetra_CrsMatrix::NumGlobalDiagonals: GlobalIndices not int.";
1108  }
1109 #endif
1110  long long NumGlobalDiagonals64() const {return(Graph_.NumGlobalDiagonals64());}
1111 
1113  int NumMyNonzeros() const {return(Graph_.NumMyNonzeros());}
1114 
1116  int NumMyRows() const {return(Graph_.NumMyRows());}
1117 
1119 
1123  int NumMyCols() const {return(Graph_.NumMyCols());}
1124 
1126 
1129  int NumMyDiagonals() const {return(Graph_.NumMyDiagonals());}
1130 
1132  int NumGlobalEntries(long long Row) const {return(Graph_.NumGlobalIndices(Row));}
1133 
1135  int NumAllocatedGlobalEntries(int Row) const{return(Graph_.NumAllocatedGlobalIndices(Row));}
1136 
1138 
1141  int MaxNumEntries() const {return(Graph_.MaxNumIndices());}
1142 
1144 
1147  int GlobalMaxNumEntries() const {return(Graph_.GlobalMaxNumIndices());}
1148 
1150  int NumMyEntries(int Row) const {return(Graph_.NumMyIndices(Row));}
1151 
1153  int NumAllocatedMyEntries(int Row) const {return(Graph_.NumAllocatedMyIndices(Row));}
1154 
1156 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1157  int IndexBase() const {
1159  if(RowMap().GlobalIndicesInt())
1160  return (int) IndexBase64();
1161  throw "Epetra_CrsMatrix::IndexBase: GlobalIndices not int.";
1162  }
1163 #endif
1164  long long IndexBase64() const {return(Graph_.IndexBase64());};
1165 
1166 
1168  bool StaticGraph() {return(StaticGraph_);}
1169 
1171  const Epetra_CrsGraph& Graph() const {return(Graph_);}
1172 
1174  const Epetra_Map& RowMap() const {return((Epetra_Map &)Graph_.RowMap());}
1175 
1177 
1183  int ReplaceRowMap(const Epetra_BlockMap& newmap);
1184 
1186 
1190  bool HaveColMap() const {return(Graph_.HaveColMap());}
1191 
1193 
1201  int ReplaceColMap(const Epetra_BlockMap& newmap);
1202 
1204 
1214  int ReplaceDomainMapAndImporter(const Epetra_Map & NewDomainMap, const Epetra_Import * NewImporter);
1215 
1217 
1228  int RemoveEmptyProcessesInPlace(const Epetra_BlockMap * NewMap);
1229 
1231 
1238  const Epetra_Map& ColMap() const {return((Epetra_Map &) Graph_.ColMap());}
1239 
1241 
1244  const Epetra_Map& DomainMap() const {return((Epetra_Map &)Graph_.DomainMap());}
1245 
1247 
1250  const Epetra_Map& RangeMap() const {return((Epetra_Map &)Graph_.RangeMap());}
1251 
1253  const Epetra_Import* Importer() const {return(Graph_.Importer());}
1254 
1256  const Epetra_Export* Exporter() const {return(Graph_.Exporter());}
1257 
1259  const Epetra_Comm& Comm() const {return(Epetra_DistObject::Comm());}
1261 
1263 
1264 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1266  int LRID( int GRID_in) const {return(Graph_.LRID(GRID_in));}
1267 #endif
1268 
1269 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1270  int LRID( long long GRID_in) const {return(Graph_.LRID(GRID_in));}
1271 #endif
1272 
1273 #if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
1274  // default implementation so that no compiler/linker error in case neither 32 nor 64
1275  // bit indices present.
1276  int LRID(long long GRID_in) const {return(Graph_.LRID(GRID_in));}
1277 #endif
1278 
1280 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1281  int GRID(int LRID_in) const {
1282  if(RowMap().GlobalIndicesInt())
1283  return (int) GRID64(LRID_in);
1284  throw "Epetra_CrsMatrix::GRID: GlobalIndices not int.";
1285  }
1286 #endif
1287  long long GRID64( int LRID_in) const {return(Graph_.GRID64(LRID_in));}
1288 
1290 
1293 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1294  int LCID( int GCID_in) const {return(Graph_.LCID(GCID_in));}
1295 #endif
1296 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1297  int LCID( long long GCID_in) const {return(Graph_.LCID(GCID_in));}
1298 #endif
1299 
1301 
1304 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1305  int GCID(int LCID_in) const {
1306  if(RowMap().GlobalIndicesInt())
1307  return (int) GCID64(LCID_in);
1308  throw "Epetra_CrsMatrix::GCID: GlobalIndices not int.";
1309  }
1310 #endif
1311  long long GCID64( int LCID_in) const {return(Graph_.GCID64(LCID_in));}
1312 
1314 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1315  bool MyGRID(int GRID_in) const {return(Graph_.MyGRID(GRID_in));}
1316 #endif
1317 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1318  bool MyGRID(long long GRID_in) const {return(Graph_.MyGRID(GRID_in));}
1319 #endif
1320 
1322  bool MyLRID(int LRID_in) const {return(Graph_.MyLRID(LRID_in));}
1323 
1325 
1328 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1329  bool MyGCID(int GCID_in) const {return(Graph_.MyGCID(GCID_in));}
1330 #endif
1331 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1332  bool MyGCID(long long GCID_in) const {return(Graph_.MyGCID(GCID_in));}
1333 #endif
1334 
1336 
1339  bool MyLCID(int LCID_in) const {return(Graph_.MyLCID(LCID_in));}
1340 
1342 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1343  bool MyGlobalRow(int GID) const {return(Graph_.MyGlobalRow(GID));}
1344 #endif
1345 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1346  bool MyGlobalRow(long long GID) const {return(Graph_.MyGlobalRow(GID));}
1347 #endif
1348 
1349 
1350 
1352 
1353 
1355  virtual void Print(std::ostream& os) const;
1357 
1359 
1360 
1362  const char* Label() const {return(Epetra_Object::Label());}
1363 
1365 
1373  int SetUseTranspose(bool UseTranspose_in) {UseTranspose_ = UseTranspose_in; return(0);}
1374 
1376 
1384  int Apply(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const {
1386 
1388 
1402  return(Solve(UpperTriangular(), Epetra_CrsMatrix::UseTranspose(), NoDiagonal(), X, Y));}
1403 
1405  bool HasNormInf() const {return(true);}
1406 
1408  bool UseTranspose() const {return(UseTranspose_);}
1409 
1412  {
1413  if (UseTranspose()) return(RangeMap());
1414  else return(DomainMap());
1415  }
1416 
1419  {
1420  if (UseTranspose()) return(DomainMap());
1421  else return(RangeMap());
1422  }
1423 
1425 
1427 
1429 
1438  int NumMyRowEntries(int MyRow, int& NumEntries) const;
1439 
1441  const Epetra_BlockMap& Map() const { return Epetra_DistObject::Map(); }
1442 
1444  const Epetra_Map& RowMatrixRowMap() const {return(RowMap());}
1445 
1447  const Epetra_Map& RowMatrixColMap() const {return(ColMap());}
1448 
1450  const Epetra_Import* RowMatrixImporter() const {return(Importer());}
1451 
1453 
1455 
1456 
1458 
1463  inline double* operator[] (int Loc) {
1464  if (StorageOptimized()){ int * ind = Graph().IndexOffset(); return(All_Values_+ind[Loc]);}
1465  else return Values_[Loc];}
1466  inline double* operator[] (int Loc) const {
1467  if (StorageOptimized()){ int * ind = Graph().IndexOffset(); return(All_Values_+ind[Loc]);}
1468  else return Values_[Loc];}
1470 
1472 
1473 
1487  int ExtractCrsDataPointers(int *& IndexOffset, int *& Indices, double *& Values_in) const {
1488  if (StorageOptimized()) {
1489  IndexOffset = Graph().IndexOffset();
1490  Indices = Graph().All_Indices();
1491  Values_in = All_Values();
1492  return (0);
1493  }
1494  else { IndexOffset = 0; Indices = 0; Values_in = 0; return (-1);} }
1495 
1496 
1498 
1501  Epetra_IntSerialDenseVector& ExpertExtractIndexOffset();
1502 
1504 
1507  Epetra_IntSerialDenseVector& ExpertExtractIndices();
1508 
1510 
1513  double *& ExpertExtractValues() {return All_Values_;}
1514 
1515 
1517 
1522  int ExpertStaticFillComplete(const Epetra_Map & DomainMap,const Epetra_Map & RangeMap, const Epetra_Import * Importer=0, const Epetra_Export * Exporter=0, int NumMyDiagonals=-1);
1523 
1524 
1526 
1529  int ExpertMakeUniqueCrsGraphData();
1530 
1532 
1542  int SortGhostsAssociatedWithEachProcessor(bool Flag) {Graph_.SortGhostsAssociatedWithEachProcessor(Flag); return(0);}
1544 
1546 
1547 
1549  const Epetra_Map& ImportMap() const {return((Epetra_Map&) Graph_.ImportMap());}
1550 
1552  int TransformToLocal();
1553 
1555  int TransformToLocal(const Epetra_Map* DomainMap, const Epetra_Map* RangeMap);
1556 
1558 
1559 
1560  protected:
1561  bool Allocated() const {return(Allocated_);}
1562  int SetAllocated(bool Flag) {Allocated_ = Flag; return(0);}
1563  double** Values() const {
1564  if (StorageOptimized()) throw ReportError("This method: double** Values() cannot be called when StorageOptimized()==true", -1);
1565  else return(Values_);}
1566  double* All_Values() const {
1567  if (!StorageOptimized()) throw ReportError("This method: double* All_Values()cannot be called when StorageOptimized()==false", -1);
1568  else return(All_Values_);}
1569  double* Values(int LocalRow) const {
1570  if (StorageOptimized())
1571  if (Graph().StorageOptimized())
1572  return(All_Values_+Graph().IndexOffset()[LocalRow]);
1573  else throw ReportError("This method: double* Values()cannot be called when StorageOptimized()==true and Graph().StorageOptimized()==false", -1);
1574  else return(Values_[LocalRow]);}
1575 
1576  void InitializeDefaults();
1577  int Allocate();
1578 
1579 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1580  int InsertValues(int LocalRow, int NumEntries, double* Values, int* Indices);
1581  int InsertValues(int LocalRow, int NumEntries, const double* Values, const int* Indices);
1582 #endif
1583 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1584  int InsertValues(int LocalRow, int NumEntries, double* Values, long long* Indices);
1585  int InsertValues(int LocalRow, int NumEntries, const double* Values, const long long* Indices);
1586 #endif
1587 
1588  int InsertOffsetValues(long long GlobalRow, int NumEntries, double *Values, int *Indices);
1589  int InsertOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices);
1590  int ReplaceOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices);
1591  int SumIntoOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices);
1592  void UpdateImportVector(int NumVectors) const;
1593  void UpdateExportVector(int NumVectors) const;
1594  void GeneralMV(double * x, double * y) const;
1595  void GeneralMTV(double * x, double * y) const;
1596  void GeneralMM(double ** X, int LDX, double ** Y, int LDY, int NumVectors) const;
1597  void GeneralMTM(double ** X, int LDX, double ** Y, int LDY, int NumVectors) const;
1598  void GeneralSV(bool Upper, bool Trans, bool UnitDiagonal, double * x, double * y) const;
1599  void GeneralSM(bool Upper, bool Trans, bool UnitDiagonal, double ** X, int LDX, double ** Y, int LDY, int NumVectors) const;
1600 
1601  void SetStaticGraph(bool Flag) {StaticGraph_ = Flag;}
1602 
1603  int CheckSizes(const Epetra_SrcDistObject& A);
1604 
1605  int CopyAndPermute(const Epetra_SrcDistObject& Source,
1606  int NumSameIDs,
1607  int NumPermuteIDs,
1608  int* PermuteToLIDs,
1609  int* PermuteFromLIDs,
1610  const Epetra_OffsetIndex * Indexor,
1611  Epetra_CombineMode CombineMode = Zero);
1612  int CopyAndPermuteCrsMatrix(const Epetra_CrsMatrix& A,
1613  int NumSameIDs,
1614  int NumPermuteIDs,
1615  int* PermuteToLIDs,
1616  int* PermuteFromLIDs,
1617  const Epetra_OffsetIndex * Indexor,
1618  Epetra_CombineMode CombineMode);
1619  int CopyAndPermuteRowMatrix(const Epetra_RowMatrix& A,
1620  int NumSameIDs,
1621  int NumPermuteIDs,
1622  int* PermuteToLIDs,
1623  int* PermuteFromLIDs,
1624  const Epetra_OffsetIndex * Indexor,
1625  Epetra_CombineMode CombineMode);
1626 
1627  int PackAndPrepare(const Epetra_SrcDistObject& Source,
1628  int NumExportIDs,
1629  int* ExportLIDs,
1630  int& LenExports,
1631  char*& Exports,
1632  int& SizeOfPacket,
1633  int* Sizes,
1634  bool& VarSizes,
1635  Epetra_Distributor& Distor);
1636 
1637  int UnpackAndCombine(const Epetra_SrcDistObject& Source,
1638  int NumImportIDs,
1639  int* ImportLIDs,
1640  int LenImports,
1641  char* Imports,
1642  int& SizeOfPacket,
1643  Epetra_Distributor& Distor,
1644  Epetra_CombineMode CombineMode,
1645  const Epetra_OffsetIndex * Indexor);
1646 
1648  int SortEntries();
1649 
1651  bool Sorted() const {return(Graph_.Sorted());}
1652 
1654  int MergeRedundantEntries();
1655 
1657  bool NoRedundancies() const {return(Graph_.NoRedundancies());}
1658 
1659  void DeleteMemory();
1660 
1668 
1669  double** Values_;
1671  double* All_Values_;
1672  mutable double NormInf_;
1673  mutable double NormOne_;
1674  mutable double NormFrob_;
1675 
1679 
1681 
1683 #ifdef Epetra_ENABLE_CASK
1684  caskHandle_t cask;
1685 #endif
1686  private:
1687 
1688  // These are the pre-5.0 versions of solve. They are still faster that generic 5.0 solves, so we keep them around
1689  int Solve1(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector& x, Epetra_Vector& y) const;
1690  int Solve1(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
1691 
1692 private:
1693 
1694  template<typename int_type>
1695  int TInsertGlobalValues(int_type Row, int NumEntries, const double* values, const int_type* Indices);
1696 
1697  template<typename int_type>
1698  int TInsertGlobalValues(int_type Row, int NumEntries, double* values, int_type* Indices);
1699 
1700  template<typename int_type>
1701  int InsertValues(int Row, int NumEntries, const double* values, const int_type* Indices);
1702 
1703  template<typename int_type>
1704  int InsertValues(int Row, int NumEntries, double* values, int_type* Indices);
1705 
1706  template<typename int_type>
1707  int TReplaceGlobalValues(int_type Row, int NumEntries, const double * srcValues, const int_type *Indices);
1708 
1709  template<typename int_type>
1710  int TSumIntoGlobalValues(int_type Row, int NumEntries, const double * srcValues, const int_type *Indices);
1711 
1712  template<typename int_type>
1713  int ExtractGlobalRowCopy(int_type Row, int Length, int & NumEntries, double * values, int_type * Indices) const;
1714 
1715  template<typename int_type>
1716  int ExtractGlobalRowCopy(int_type Row, int Length, int & NumEntries, double * values) const;
1717 
1718  template<typename int_type>
1719  int ExtractGlobalRowView(int_type Row, int & NumEntries, double *& values, int_type *& Indices) const;
1720 
1721  template<typename int_type>
1722  int ExtractGlobalRowView(int_type Row, int & NumEntries, double *& values) const;
1723 
1724  template<typename int_type>
1725  int TCopyAndPermuteCrsMatrix(const Epetra_CrsMatrix& A,
1726  int NumSameIDs,
1727  int NumPermuteIDs,
1728  int* PermuteToLIDs,
1729  int* PermuteFromLIDs,
1730  const Epetra_OffsetIndex * Indexor,
1731  Epetra_CombineMode CombineMode);
1732 
1733  template<typename int_type>
1734  int TCopyAndPermuteRowMatrix(const Epetra_RowMatrix& A,
1735  int NumSameIDs,
1736  int NumPermuteIDs,
1737  int* PermuteToLIDs,
1738  int* PermuteFromLIDs,
1739  const Epetra_OffsetIndex * Indexor,
1740  Epetra_CombineMode CombineMode);
1741 
1742  template<typename int_type>
1743  int TUnpackAndCombine(const Epetra_SrcDistObject& Source,
1744  int NumImportIDs,
1745  int* ImportLIDs,
1746  int LenImports,
1747  char* Imports,
1748  int& SizeOfPacket,
1749  Epetra_Distributor& Distor,
1750  Epetra_CombineMode CombineMode,
1751  const Epetra_OffsetIndex * Indexor);
1752 
1753  // Used for fused[import|export] constructors
1754  template<class TransferType>
1755  void FusedTransfer(const Epetra_CrsMatrix & SourceMatrix,
1756  const TransferType & RowTransfer,
1757  const TransferType* DomainTransfer,
1758  const Epetra_Map * DomainMap,
1759  const Epetra_Map * RangeMap,
1760  bool RestrictCommunicator);
1761 
1762  public:
1763 
1764  void FusedImport(const Epetra_CrsMatrix & SourceMatrix,
1765  const Epetra_Import & RowImporter,
1766  const Epetra_Map * DomainMap,
1767  const Epetra_Map * RangeMap,
1768  bool RestrictCommunicator);
1769 
1770  void FusedExport(const Epetra_CrsMatrix & SourceMatrix,
1771  const Epetra_Export & RowExporter,
1772  const Epetra_Map * DomainMap,
1773  const Epetra_Map * RangeMap,
1774  bool RestrictCommunicator);
1775 
1776  void FusedImport(const Epetra_CrsMatrix & SourceMatrix,
1777  const Epetra_Import & RowImporter,
1778  const Epetra_Import * DomainImporter,
1779  const Epetra_Map * DomainMap,
1780  const Epetra_Map * RangeMap,
1781  bool RestrictCommunicator);
1782 
1783  void FusedExport(const Epetra_CrsMatrix & SourceMatrix,
1784  const Epetra_Export & RowExporter,
1785  const Epetra_Export * DomainExporter,
1786  const Epetra_Map * DomainMap,
1787  const Epetra_Map * RangeMap,
1788  bool RestrictCommunicator);
1789 
1790 
1791 };
1792 #endif /* EPETRA_CRSMATRIX_H */
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
int LRID(int GRID_in) const
Returns the local row index for given global row index, returns -1 if no local row for this global ro...
bool MyGlobalRow(int GID) const
Returns true of GID is owned by the calling processor, otherwise it returns false.
bool MyGRID(int GRID_in) const
Returns true if the GRID passed in belongs to the calling processor in this map, otherwise returns fa...
Epetra_Map: A class for partitioning vectors and matrices.
Definition: Epetra_Map.h:127
int NumGlobalEntries(long long Row) const
Returns the current number of nonzero entries in specified global row on this processor.
virtual long long NumGlobalDiagonals64() const =0
const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
const Epetra_Map & RangeMap() const
Returns the Epetra_Map object associated with the range of this matrix operator.
Epetra_IntSerialDenseVector: A class for constructing and using dense vectors.
bool HasNormInf() const
Returns true because this class can compute an Inf-norm.
virtual int RightScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x.
bool StorageOptimized() const
If OptimizeStorage() has been called, this query returns true, otherwise it returns false...
long long IndexBase64() const
int NumAllocatedGlobalEntries(int Row) const
Returns the allocated number of nonzero entries in specified global row on this processor.
long long NumGlobalRows64() const
virtual double NormOne() const =0
Returns the one norm of the global matrix.
int NumMyEntries(int Row) const
Returns the current number of nonzero entries in specified local row on this processor.
const Epetra_Comm & Comm() const
Returns the address of the Epetra_Comm for this multi-vector.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int CopyAndPermute(const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)=0
Perform ID copies and permutations that are on processor.
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
int Multiply(bool TransA, const Epetra_Vector &x, Epetra_Vector &y) const
Returns the result of a Epetra_CrsMatrix multiplied by a Epetra_Vector x in y.
int * IndexOffset() const
bool UseTranspose() const
Returns the current UseTranspose setting.
double * All_Values() const
long long NumGlobalCols64() const
virtual void Print(std::ostream &os) const
Print method.
int NumGlobalRows() const
Returns the number of global matrix rows.
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
long long GRID64(int LRID_in) const
double ** Values() const
int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons...
const Epetra_Map & RowMatrixRowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
Epetra_DataAccess CV_
#define EPETRA_CHK_ERR(a)
bool NoRedundancies() const
If MergeRedundantEntries() has been called, this query returns true, otherwise it returns false...
int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons...
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements...
Definition: Epetra_Export.h:70
const Epetra_Map & ImportMap() const
Use ColMap() instead.
bool HaveColMap() const
Returns true if we have a well-defined ColMap, and returns false otherwise.
bool Sorted() const
If SortEntries() has been called, this query returns true, otherwise it returns false.
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const =0
Returns a copy of the main diagonal in a user-provided vector.
virtual int LeftScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x.
Epetra_CompObject & operator=(const Epetra_CompObject &src)
const Epetra_Map & ColMap() const
Returns the Epetra_Map object that describes the set of column-indices that appear in each processor&#39;...
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
Definition: Epetra_Import.h:71
bool IndicesAreLocal() const
If matrix indices has been transformed to local, this query returns true, otherwise it returns false...
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this matrix operator. ...
bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
virtual int InvRowSums(Epetra_Vector &x) const =0
Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x...
bool MyLCID(int LCID_in) const
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns fa...
bool MyGCID(long long GCID_in) const
int GlobalMaxNumEntries() const
Returns the maximum number of nonzero entries across all rows on all processors.
virtual int CheckSizes(const Epetra_SrcDistObject &Source)=0
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not...
int MakeDataContiguous()
Eliminates memory that is used for construction. Make consecutive row index sections contiguous...
bool MyLRID(int LRID_in) const
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns fa...
bool StaticGraph()
Returns true if the graph associated with this matrix was pre-constructed and therefore not changeabl...
int LRID(long long GRID_in) const
long long NumGlobalNonzeros64() const
Epetra_BLAS: The Epetra BLAS Wrapper Class.
Definition: Epetra_BLAS.h:78
const Epetra_Map & RowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const =0
Returns the number of nonzero entries in MyRow.
int NumMyCols() const
Returns the number of entries in the set of column-indices that appear on this processor.
virtual const char * Label() const
Epetra_Object Label access funtion.
Epetra_MultiVector * ExportVector_
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:81
virtual bool UseTranspose() const =0
Returns the current UseTranspose setting.
const Epetra_Import * Importer() const
Returns the Epetra_Import object that contains the import operations for distributed operations...
int MaxNumEntries() const
Returns the maximum number of nonzero entries across all rows on this processor.
double * Values(int LocalRow) const
int LCID(long long GCID_in) const
bool NoDiagonal() const
If matrix has no diagonal entries in global index space, this query returns true, otherwise it return...
const char * Label() const
Returns a character string describing the operator.
bool MyGCID(int GCID_in) const
Returns true if the GCID passed in belongs to the calling processor in this map, otherwise returns fa...
Epetra_CompObject: Functionality and data that is common to all computational classes.
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
virtual double NormInf() const =0
Returns the infinity norm of the global matrix.
void SetStaticGraph(bool Flag)
int LCID(int GCID_in) const
Returns the local column index for given global column index, returns -1 if no local column for this ...
virtual int UnpackAndCombine(const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor)=0
Perform any unpacking and combining after call to DoTransfer().
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
bool MyGlobalRow(long long GID) const
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true...
Epetra_CrsGraph Graph_
bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
const Epetra_Export * Exporter() const
Returns the Epetra_Export object that contains the export operations for distributed operations...
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
bool MyGRID(long long GRID_in) const
int NumGlobalCols() const
Returns the number of global matrix columns.
int * All_Indices() const
virtual long long NumGlobalCols64() const =0
bool IndicesAreGlobal() const
If matrix indices has not been transformed to local, this query returns true, otherwise it returns fa...
virtual long long NumGlobalNonzeros64() const =0
int SetAllocated(bool Flag)
const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with columns of this matrix.
virtual int Multiply(bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this matrix operator.
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
bool Allocated() const
int GRID(int LRID_in) const
Returns the global row index for give local row index, returns IndexBase-1 if we don&#39;t have this loca...
int SortGhostsAssociatedWithEachProcessor(bool Flag)
Forces FillComplete() to locally order ghostnodes associated with each remote processor in ascending ...
bool Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
const Epetra_Map & DomainMap() const
Returns the Epetra_Map object associated with the domain of this matrix operator. ...
Epetra_CombineMode
virtual bool UpperTriangular() const =0
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
virtual int ExtractMyRowCopy(int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const =0
Returns a copy of the specified local row in user-provided arrays.
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y...
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
virtual int InvColSums(Epetra_Vector &x) const =0
Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x...
int NumAllocatedMyEntries(int Row) const
Returns the allocated number of nonzero entries in specified local row on this processor.
const Epetra_CrsGraph & Graph() const
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices...
Epetra_DataAccess
const Epetra_BlockMap & Map() const
Map() method inherited from Epetra_DistObject.
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
virtual int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X a...
Epetra_MultiVector * ImportVector_
long long GCID64(int LCID_in) const
double *& ExpertExtractValues()
Returns a reference to the double* used to hold the values array.
virtual long long NumGlobalRows64() const =0
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs. ...
Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in pa...
int ExtractCrsDataPointers(int *&IndexOffset, int *&Indices, double *&Values_in) const
Returns internal data pointers associated with Crs matrix format.
virtual int PackAndPrepare(const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)=0
Perform any packing or preparation required for call to DoTransfer().
int GCID(int LCID_in) const
Returns the global column index for give local column index, returns IndexBase-1 if we don&#39;t have thi...
long long NumGlobalDiagonals64() const
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor&#39;s portion of the matrix.