Epetra Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
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#include "Epetra_ConfigDefs.h"
48#include "Epetra_DistObject.h"
49#include "Epetra_CompObject.h"
50#include "Epetra_BLAS.h"
51#include "Epetra_RowMatrix.h"
52#include "Epetra_Operator.h"
53#include "Epetra_CrsGraph.h"
54#include "Epetra_Map.h"
55
56#ifdef Epetra_ENABLE_CASK
57#include "cask.h"
58#endif
59
60class Epetra_Map;
61class Epetra_Import;
62class Epetra_Export;
63class Epetra_Vector;
66
67
68// Define this to see a complete dump a an Epetra_CrsMatrix::Multiply(...) call
69//#define EPETRA_CRS_MATRIX_TRACE_DUMP_MULTIPLY
70
71#ifdef EPETRA_CRS_MATRIX_TRACE_DUMP_MULTIPLY
72extern bool Epetra_CrsMatrixTraceDumpMultiply;
73#endif // EPETRA_CRS_MATRIX_TRACE_DUMP_MULTIPLY
74
76
173class EPETRA_LIB_DLL_EXPORT Epetra_CrsMatrix: public Epetra_DistObject, public Epetra_CompObject, public Epetra_BLAS, public virtual Epetra_RowMatrix {
174 public:
175
177
178
190 Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, const int* NumEntriesPerRow, bool StaticProfile = false);
191
193
205 Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, int NumEntriesPerRow, bool StaticProfile = false);
206
208
221 Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, const Epetra_Map& ColMap, const int* NumEntriesPerRow, bool StaticProfile = false);
222
224
238 Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map& RowMap, const Epetra_Map& ColMap, int NumEntriesPerRow, bool StaticProfile = false);
239
241
248
250
287 Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Import & RowImporter, const Epetra_Map * DomainMap=0, const Epetra_Map * RangeMap=0, bool RestrictCommunicator = false);
288
290
330 Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Import & RowImporter, const Epetra_Import * DomainImporter, const Epetra_Map * DomainMap, const Epetra_Map * RangeMap, bool RestrictCommunicator);
331
333
370 Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Export & RowExporter, const Epetra_Map * DomainMap=0, const Epetra_Map * RangeMap=0, bool RestrictCommunicator = false);
371
373
413 Epetra_CrsMatrix(const Epetra_CrsMatrix & SourceMatrix, const Epetra_Export & RowExporter, const Epetra_Export * DomainExporter, const Epetra_Map * DomainMap, const Epetra_Map * RangeMap, bool RestrictCommunicator);
414
415
417 Epetra_CrsMatrix(const Epetra_CrsMatrix& Matrix);
418
420 virtual ~Epetra_CrsMatrix();
422
424
425
428
430
437 int PutScalar(double ScalarConstant);
438
440
447 int Scale(double ScalarConstant);
448
450
476#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
477 virtual int InsertGlobalValues(int GlobalRow, int NumEntries, const double* Values, const int* Indices);
478#endif
479#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
480 virtual int InsertGlobalValues(long long GlobalRow, int NumEntries, const double* Values, const long long* Indices);
481#endif
482
484
510#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
511 virtual int InsertGlobalValues(int GlobalRow, int NumEntries, double* Values, int* Indices);
512#endif
513#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
514 virtual int InsertGlobalValues(long long GlobalRow, int NumEntries, double* Values, long long* Indices);
515#endif
516
518
530#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
531 virtual int ReplaceGlobalValues(int GlobalRow, int NumEntries, const double* Values, const int* Indices);
532#endif
533#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
534 virtual int ReplaceGlobalValues(long long GlobalRow, int NumEntries, const double* Values, const long long* Indices);
535#endif
536
538
550#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
551 virtual int SumIntoGlobalValues(int GlobalRow, int NumEntries, const double* Values, const int* Indices);
552#endif
553#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
554 virtual int SumIntoGlobalValues(long long GlobalRow, int NumEntries, const double* Values, const long long* Indices);
555#endif
556
558
571 int InsertMyValues(int MyRow, int NumEntries, const double* Values, const int* Indices);
572
574
587 int InsertMyValues(int MyRow, int NumEntries, double* Values, int* Indices);
588
590
602 int ReplaceMyValues(int MyRow, int NumEntries, const double* Values, const int* Indices);
603
605
618 int SumIntoMyValues(int MyRow, int NumEntries, const double* Values, const int* Indices);
619
621
634 int ReplaceDiagonalValues(const Epetra_Vector& Diagonal);
635
637
639
640
641
643 /* This version of FillComplete assumes that the domain and range
644 distributions are identical to the matrix row distributions.
645 \param OptimizeDataStorage - (In) If true, storage will be packed for optimal performance. Depending
646 on how the matrix was constructed, optimizing the storage may have no impact on performance
647 or one-time memory use, or may have a large impact. If the user was careful in allocating memory
648 for the matrix by setting StaticProfile to true in the matrix constructor, then no extra storage
649 will be allocated in attempting to optimize storage. If the user did not set StaticProfile to true,
650 then optimizing the storage will temporarily use additional memory, will have a noticeable impact
651 on performance and ultimately reduce the storage associated with the matrix.
652
653 By default storage will be optimized. If you cannot tolerate the increased temporary memory use,
654 should set this value to false.
655
656 \return error code, 0 if successful. Returns a positive warning code of 3
657 if the matrix is rectangular (meaning that the other overloading of
658 FillComplete should have been called, with differen domain-map and
659 range-map specified).
660 */
661 int FillComplete(bool OptimizeDataStorage = true);
662
664 /* This version of FillComplete requires the explicit specification of the domain
665 and range distribution maps. These maps are used for importing and exporting vector
666 and multi-vector elements that are needed for distributed matrix computations. For
667 example, to compute y = Ax in parallel, we would specify the DomainMap as the distribution
668 of the vector x and the RangeMap as the distribution of the vector y.
669 \param DomainMap - (In) Map that describes the distribution of vector and multi-vectors in the
670 matrix domain.
671 \param RangeMap - (In) Map that describes the distribution of vector and multi-vectors in the
672 matrix range.
673
674 \param OptimizeDataStorage - (In) If true, storage will be packed for optimal performance. Depending
675 on how the matrix was constructed, optimizing the storage may have no impact on performance
676 or one-time memory use, or may have a large impact. If the user was careful in allocating memory
677 for the matrix by setting StaticProfile to true in the matrix constructor, then no extra storage
678 will be allocated in attempting to optimize storage. If the user did not set StaticProfile to true,
679 then optimizing the storage will temporarily use additional memory, will have a noticeable impact
680 on performance and ultimately reduce the storage associated with the matrix.
681
682 By default storage will be optimized. If you cannot tolerate the increased temporary memory use,
683 should set this value to false.
684
685 \return error code, 0 if successful. positive warning code of 2 if it is detected that the
686 matrix-graph got out of sync since this matrix was constructed (for instance if
687 graph.FillComplete() was called by another matrix that shares the graph)
688
689 \post IndicesAreLocal()==true
690 */
691 int FillComplete(const Epetra_Map& DomainMap, const Epetra_Map& RangeMap, bool OptimizeDataStorage = true);
692
694
714 int OptimizeStorage();
715
716
718 int MakeDataContiguous() {EPETRA_CHK_ERR(OptimizeStorage()); return(0);}
720
722
723
725
735#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
736 int ExtractGlobalRowCopy(int GlobalRow, int Length, int& NumEntries, double* Values, int* Indices) const;
737#endif
738#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
739 int ExtractGlobalRowCopy(long long GlobalRow, int Length, int& NumEntries, double* Values, long long* Indices) const;
740#endif
741
743
754 int ExtractMyRowCopy(int MyRow, int Length, int& NumEntries, double* Values, int* Indices) const;
755
757
765#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
766 int ExtractGlobalRowCopy(int GlobalRow, int Length, int& NumEntries, double* Values) const;
767#endif
768#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
769 int ExtractGlobalRowCopy(long long GlobalRow, int Length, int& NumEntries, double* Values) const;
770#endif
771
773
781 int ExtractMyRowCopy(int MyRow, int Length, int& NumEntries, double* Values) const;
782
784
791 int ExtractDiagonalCopy(Epetra_Vector& Diagonal) const;
792
794
805#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
806 int ExtractGlobalRowView(int GlobalRow, int& NumEntries, double*& Values, int*& Indices) const;
807#endif
808#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
809 int ExtractGlobalRowView(long long GlobalRow, int& NumEntries, double*& Values, long long*& Indices) const;
810#endif
811
813
824 int ExtractMyRowView(int MyRow, int& NumEntries, double*& Values, int*& Indices) const;
825
827
834#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
835 int ExtractGlobalRowView(int GlobalRow, int& NumEntries, double*& Values) const;
836#endif
837#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
838 int ExtractGlobalRowView(long long GlobalRow, int& NumEntries, double*& Values) const;
839#endif
840
842
849 int ExtractMyRowView(int MyRow, int& NumEntries, double*& Values) const;
851
853
854
856
865 int Multiply(bool TransA, const Epetra_Vector& x, Epetra_Vector& y) const;
866 int Multiply1(bool TransA, const Epetra_Vector& x, Epetra_Vector& y) const;
867
868
870
879 int Multiply(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
880 int Multiply1(bool TransA, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
881
883
894 int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector& x, Epetra_Vector& y) const;
895
897
908 int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
909
911
927 int InvRowSums(Epetra_Vector& x) const;
928
930
942 int InvRowMaxs(Epetra_Vector& x) const;
943
945
953 int LeftScale(const Epetra_Vector& x);
954
956
973 int InvColSums(Epetra_Vector& x) const;
974
976
988 int InvColMaxs(Epetra_Vector& x) const;
989
991
999 int RightScale(const Epetra_Vector& x);
1001
1003
1004
1005
1007 bool Filled() const {return(Graph_.Filled());}
1008
1010 bool StorageOptimized() const {return(StorageOptimized_);}
1011
1013 bool IndicesAreGlobal() const {return(Graph_.IndicesAreGlobal());}
1014
1016 bool IndicesAreLocal() const {return(Graph_.IndicesAreLocal());}
1017
1019 bool IndicesAreContiguous() const {return(Graph_.IndicesAreContiguous());}
1020
1022 bool LowerTriangular() const {return(Graph_.LowerTriangular());}
1023
1025 bool UpperTriangular() const {return(Graph_.UpperTriangular());}
1026
1028 bool NoDiagonal() const {return(Graph_.NoDiagonal());}
1029
1031
1033
1034
1036 /* Returns the quantity \f$ \| A \|_\infty\f$ such that
1037 \f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f]
1038 \warning The NormInf() method will not properly calculate the infinity norm for a matrix that has entries that are
1039 replicated on multiple processors. */
1040 double NormInf() const;
1041
1043 /* Returns the quantity \f$ \| A \|_1\f$ such that
1044 \f[\| A \|_1= \max_{1\lej\len} \sum_{i=1}^m |a_{ij}| \f].
1045 \warning The NormOne() method will not properly calculate the one norm for a matrix that has entries that are
1046 replicated on multiple processors.
1047 */
1048 double NormOne() const;
1049
1051 /* Returns the quantity \f[ \| A \|_{Frobenius} = \sqrt{\sum_{i=1}^m \sum_{j=1}^n\|a_{ij}\|^2}\f]
1052 \warning the NormFrobenius() method will not properly calculate the frobenius norm for a matrix that
1053 has entries which are replicated on multiple processors. In that case, the returned
1054 norm will be larger than the true norm.
1055 */
1056 double NormFrobenius() const;
1057
1059 /*
1060 Note that if maps are defined such that some nonzeros appear on
1061 multiple processors, then those nonzeros will be counted multiple times.
1062 If the user wishes to assemble a matrix from overlapping submatrices,
1063 they can use Epetra_FECrsMatrix.
1064 */
1065#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1066 int NumGlobalNonzeros() const {
1067 if(RowMap().GlobalIndicesInt())
1068 return (int) NumGlobalNonzeros64();
1069 throw "Epetra_CrsMatrix::NumGlobalNonzeros: GlobalIndices not int.";
1070 }
1071#endif
1072 long long NumGlobalNonzeros64() const {return(Graph_.NumGlobalNonzeros64());}
1073
1075#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1076 int NumGlobalRows() const {
1077 if(RowMap().GlobalIndicesInt())
1078 return (int) NumGlobalRows64();
1079 throw "Epetra_CrsMatrix::NumGlobalRows: GlobalIndices not int.";
1080 }
1081#endif
1082 long long NumGlobalRows64() const {return(Graph_.NumGlobalRows64());}
1083
1085#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1086 int NumGlobalCols() const {
1087 if(RowMap().GlobalIndicesInt())
1088 return (int) NumGlobalCols64();
1089 throw "Epetra_CrsMatrix::NumGlobalCols: GlobalIndices not int.";
1090 }
1091#endif
1092 long long NumGlobalCols64() const {return(Graph_.NumGlobalCols64());}
1093
1095#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1097 if(RowMap().GlobalIndicesInt())
1098 return (int) NumGlobalDiagonals64();
1099 throw "Epetra_CrsMatrix::NumGlobalDiagonals: GlobalIndices not int.";
1100 }
1101#endif
1102 long long NumGlobalDiagonals64() const {return(Graph_.NumGlobalDiagonals64());}
1103
1105 int NumMyNonzeros() const {return(Graph_.NumMyNonzeros());}
1106
1108 int NumMyRows() const {return(Graph_.NumMyRows());}
1109
1111
1115 int NumMyCols() const {return(Graph_.NumMyCols());}
1116
1118
1121 int NumMyDiagonals() const {return(Graph_.NumMyDiagonals());}
1122
1124 int NumGlobalEntries(long long Row) const {return(Graph_.NumGlobalIndices(Row));}
1125
1127 int NumAllocatedGlobalEntries(int Row) const{return(Graph_.NumAllocatedGlobalIndices(Row));}
1128
1130
1133 int MaxNumEntries() const {return(Graph_.MaxNumIndices());}
1134
1136
1139 int GlobalMaxNumEntries() const {return(Graph_.GlobalMaxNumIndices());}
1140
1142 int NumMyEntries(int Row) const {return(Graph_.NumMyIndices(Row));}
1143
1145 int NumAllocatedMyEntries(int Row) const {return(Graph_.NumAllocatedMyIndices(Row));}
1146
1148#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1150 int IndexBase() const {
1151 if(RowMap().GlobalIndicesInt())
1152 return (int) IndexBase64();
1153 throw "Epetra_CrsMatrix::IndexBase: GlobalIndices not int.";
1154 }
1155#endif
1156 long long IndexBase64() const {return(Graph_.IndexBase64());};
1157
1158
1160 bool StaticGraph() {return(StaticGraph_);}
1161
1163 const Epetra_CrsGraph& Graph() const {return(Graph_);}
1164
1166 const Epetra_Map& RowMap() const {return((Epetra_Map &)Graph_.RowMap());}
1167
1169
1175 int ReplaceRowMap(const Epetra_BlockMap& newmap);
1176
1178
1182 bool HaveColMap() const {return(Graph_.HaveColMap());}
1183
1185
1193 int ReplaceColMap(const Epetra_BlockMap& newmap);
1194
1196
1206 int ReplaceDomainMapAndImporter(const Epetra_Map & NewDomainMap, const Epetra_Import * NewImporter);
1207
1209
1220 int RemoveEmptyProcessesInPlace(const Epetra_BlockMap * NewMap);
1221
1223
1230 const Epetra_Map& ColMap() const {return((Epetra_Map &) Graph_.ColMap());}
1231
1233
1236 const Epetra_Map& DomainMap() const {return((Epetra_Map &)Graph_.DomainMap());}
1237
1239
1242 const Epetra_Map& RangeMap() const {return((Epetra_Map &)Graph_.RangeMap());}
1243
1245 const Epetra_Import* Importer() const {return(Graph_.Importer());}
1246
1248 const Epetra_Export* Exporter() const {return(Graph_.Exporter());}
1249
1251 const Epetra_Comm& Comm() const {return(Epetra_DistObject::Comm());}
1253
1255
1256
1257#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1258 int LRID( int GRID_in) const {return(Graph_.LRID(GRID_in));}
1259#endif
1260
1261#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1262 int LRID( long long GRID_in) const {return(Graph_.LRID(GRID_in));}
1263#endif
1264
1265#if defined(EPETRA_NO_32BIT_GLOBAL_INDICES) && defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
1266 // default implementation so that no compiler/linker error in case neither 32 nor 64
1267 // bit indices present.
1268 int LRID(long long GRID_in) const {return(Graph_.LRID(GRID_in));}
1269#endif
1270
1272#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1273 int GRID(int LRID_in) const {
1274 if(RowMap().GlobalIndicesInt())
1275 return (int) GRID64(LRID_in);
1276 throw "Epetra_CrsMatrix::GRID: GlobalIndices not int.";
1277 }
1278#endif
1279 long long GRID64( int LRID_in) const {return(Graph_.GRID64(LRID_in));}
1280
1282
1285#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1286 int LCID( int GCID_in) const {return(Graph_.LCID(GCID_in));}
1287#endif
1288#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1289 int LCID( long long GCID_in) const {return(Graph_.LCID(GCID_in));}
1290#endif
1291
1293
1296#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1297 int GCID(int LCID_in) const {
1298 if(RowMap().GlobalIndicesInt())
1299 return (int) GCID64(LCID_in);
1300 throw "Epetra_CrsMatrix::GCID: GlobalIndices not int.";
1301 }
1302#endif
1303 long long GCID64( int LCID_in) const {return(Graph_.GCID64(LCID_in));}
1304
1306#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1307 bool MyGRID(int GRID_in) const {return(Graph_.MyGRID(GRID_in));}
1308#endif
1309#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1310 bool MyGRID(long long GRID_in) const {return(Graph_.MyGRID(GRID_in));}
1311#endif
1312
1314 bool MyLRID(int LRID_in) const {return(Graph_.MyLRID(LRID_in));}
1315
1317
1320#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1321 bool MyGCID(int GCID_in) const {return(Graph_.MyGCID(GCID_in));}
1322#endif
1323#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1324 bool MyGCID(long long GCID_in) const {return(Graph_.MyGCID(GCID_in));}
1325#endif
1326
1328
1331 bool MyLCID(int LCID_in) const {return(Graph_.MyLCID(LCID_in));}
1332
1334#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1335 bool MyGlobalRow(int GID) const {return(Graph_.MyGlobalRow(GID));}
1336#endif
1337#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1338 bool MyGlobalRow(long long GID) const {return(Graph_.MyGlobalRow(GID));}
1339#endif
1341
1342
1344
1345
1347 virtual void Print(std::ostream& os) const;
1349
1351
1352
1354 const char* Label() const {return(Epetra_Object::Label());}
1355
1357
1365 int SetUseTranspose(bool UseTranspose_in) {UseTranspose_ = UseTranspose_in; return(0);}
1366
1368
1378
1380
1394 return(Solve(UpperTriangular(), Epetra_CrsMatrix::UseTranspose(), NoDiagonal(), X, Y));}
1395
1397 bool HasNormInf() const {return(true);}
1398
1400 bool UseTranspose() const {return(UseTranspose_);}
1401
1404 {
1405 if (UseTranspose()) return(RangeMap());
1406 else return(DomainMap());
1407 }
1408
1411 {
1412 if (UseTranspose()) return(DomainMap());
1413 else return(RangeMap());
1414 }
1415
1417
1419
1421
1430 int NumMyRowEntries(int MyRow, int& NumEntries) const;
1431
1433 const Epetra_BlockMap& Map() const { return Epetra_DistObject::Map(); }
1434
1436 const Epetra_Map& RowMatrixRowMap() const {return(RowMap());}
1437
1439 const Epetra_Map& RowMatrixColMap() const {return(ColMap());}
1440
1442 const Epetra_Import* RowMatrixImporter() const {return(Importer());}
1443
1445
1447
1448
1450
1455 inline double* operator[] (int Loc) {
1456 if (StorageOptimized()){ int * ind = Graph().IndexOffset(); return(All_Values_+ind[Loc]);}
1457 else return Values_[Loc];}
1458 inline double* operator[] (int Loc) const {
1459 if (StorageOptimized()){ int * ind = Graph().IndexOffset(); return(All_Values_+ind[Loc]);}
1460 else return Values_[Loc];}
1462
1464
1465
1479 int ExtractCrsDataPointers(int *& IndexOffset, int *& Indices, double *& Values_in) const {
1480 if (StorageOptimized()) {
1481 IndexOffset = Graph().IndexOffset();
1482 Indices = Graph().All_Indices();
1483 Values_in = All_Values();
1484 return (0);
1485 }
1486 else { IndexOffset = 0; Indices = 0; Values_in = 0; return (-1);} }
1487
1488
1490
1493 Epetra_IntSerialDenseVector& ExpertExtractIndexOffset();
1494
1496
1499 Epetra_IntSerialDenseVector& ExpertExtractIndices();
1500
1502
1505 double *& ExpertExtractValues() {return All_Values_;}
1506
1507
1509
1514 int ExpertStaticFillComplete(const Epetra_Map & DomainMap,const Epetra_Map & RangeMap, const Epetra_Import * Importer=0, const Epetra_Export * Exporter=0, int NumMyDiagonals=-1);
1515
1516
1518
1521 int ExpertMakeUniqueCrsGraphData();
1522
1524
1534 int SortGhostsAssociatedWithEachProcessor(bool Flag) {Graph_.SortGhostsAssociatedWithEachProcessor(Flag); return(0);}
1536
1538
1539
1541 const Epetra_Map& ImportMap() const {return((Epetra_Map&) Graph_.ImportMap());}
1542
1544 int TransformToLocal();
1545
1547 int TransformToLocal(const Epetra_Map* DomainMap, const Epetra_Map* RangeMap);
1548
1550
1551
1552 protected:
1553 bool Allocated() const {return(Allocated_);}
1554 int SetAllocated(bool Flag) {Allocated_ = Flag; return(0);}
1555 double** Values() const {
1556 if (StorageOptimized()) throw ReportError("This method: double** Values() cannot be called when StorageOptimized()==true", -1);
1557 else return(Values_);}
1558 double* All_Values() const {
1559 if (!StorageOptimized()) throw ReportError("This method: double* All_Values()cannot be called when StorageOptimized()==false", -1);
1560 else return(All_Values_);}
1561 double* Values(int LocalRow) const {
1562 if (StorageOptimized())
1563 if (Graph().StorageOptimized())
1564 return(All_Values_+Graph().IndexOffset()[LocalRow]);
1565 else throw ReportError("This method: double* Values()cannot be called when StorageOptimized()==true and Graph().StorageOptimized()==false", -1);
1566 else return(Values_[LocalRow]);}
1567
1568 void InitializeDefaults();
1569 int Allocate();
1570
1571#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1572 int InsertValues(int LocalRow, int NumEntries, double* Values, int* Indices);
1573 int InsertValues(int LocalRow, int NumEntries, const double* Values, const int* Indices);
1574#endif
1575#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1576 int InsertValues(int LocalRow, int NumEntries, double* Values, long long* Indices);
1577 int InsertValues(int LocalRow, int NumEntries, const double* Values, const long long* Indices);
1578#endif
1579
1580 int InsertOffsetValues(long long GlobalRow, int NumEntries, double *Values, int *Indices);
1581 int InsertOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices);
1582 int ReplaceOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices);
1583 int SumIntoOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices);
1584 void UpdateImportVector(int NumVectors) const;
1585 void UpdateExportVector(int NumVectors) const;
1586 void GeneralMV(double * x, double * y) const;
1587 void GeneralMTV(double * x, double * y) const;
1588 void GeneralMM(double ** X, int LDX, double ** Y, int LDY, int NumVectors) const;
1589 void GeneralMTM(double ** X, int LDX, double ** Y, int LDY, int NumVectors) const;
1590 void GeneralSV(bool Upper, bool Trans, bool UnitDiagonal, double * x, double * y) const;
1591 void GeneralSM(bool Upper, bool Trans, bool UnitDiagonal, double ** X, int LDX, double ** Y, int LDY, int NumVectors) const;
1592
1593 void SetStaticGraph(bool Flag) {StaticGraph_ = Flag;}
1594
1595 int CheckSizes(const Epetra_SrcDistObject& A);
1596
1597 int CopyAndPermute(const Epetra_SrcDistObject& Source,
1598 int NumSameIDs,
1599 int NumPermuteIDs,
1600 int* PermuteToLIDs,
1601 int* PermuteFromLIDs,
1602 const Epetra_OffsetIndex * Indexor,
1603 Epetra_CombineMode CombineMode = Zero);
1604 int CopyAndPermuteCrsMatrix(const Epetra_CrsMatrix& A,
1605 int NumSameIDs,
1606 int NumPermuteIDs,
1607 int* PermuteToLIDs,
1608 int* PermuteFromLIDs,
1609 const Epetra_OffsetIndex * Indexor,
1610 Epetra_CombineMode CombineMode);
1611 int CopyAndPermuteRowMatrix(const Epetra_RowMatrix& A,
1612 int NumSameIDs,
1613 int NumPermuteIDs,
1614 int* PermuteToLIDs,
1615 int* PermuteFromLIDs,
1616 const Epetra_OffsetIndex * Indexor,
1617 Epetra_CombineMode CombineMode);
1618
1619 int PackAndPrepare(const Epetra_SrcDistObject& Source,
1620 int NumExportIDs,
1621 int* ExportLIDs,
1622 int& LenExports,
1623 char*& Exports,
1624 int& SizeOfPacket,
1625 int* Sizes,
1626 bool& VarSizes,
1627 Epetra_Distributor& Distor);
1628
1629 int UnpackAndCombine(const Epetra_SrcDistObject& Source,
1630 int NumImportIDs,
1631 int* ImportLIDs,
1632 int LenImports,
1633 char* Imports,
1634 int& SizeOfPacket,
1635 Epetra_Distributor& Distor,
1636 Epetra_CombineMode CombineMode,
1637 const Epetra_OffsetIndex * Indexor);
1638
1640 int SortEntries();
1641
1643 bool Sorted() const {return(Graph_.Sorted());}
1644
1646 int MergeRedundantEntries();
1647
1649 bool NoRedundancies() const {return(Graph_.NoRedundancies());}
1650
1651 void DeleteMemory();
1652
1660
1661 double** Values_;
1664 mutable double NormInf_;
1665 mutable double NormOne_;
1666 mutable double NormFrob_;
1667
1671
1673
1675#ifdef Epetra_ENABLE_CASK
1676 caskHandle_t cask;
1677#endif
1678 private:
1679
1680 // These are the pre-5.0 versions of solve. They are still faster that generic 5.0 solves, so we keep them around
1681 int Solve1(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector& x, Epetra_Vector& y) const;
1682 int Solve1(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector& X, Epetra_MultiVector& Y) const;
1683
1684private:
1685
1686 template<typename int_type>
1687 int TInsertGlobalValues(int_type Row, int NumEntries, const double* values, const int_type* Indices);
1688
1689 template<typename int_type>
1690 int TInsertGlobalValues(int_type Row, int NumEntries, double* values, int_type* Indices);
1691
1692 template<typename int_type>
1693 int InsertValues(int Row, int NumEntries, const double* values, const int_type* Indices);
1694
1695 template<typename int_type>
1696 int InsertValues(int Row, int NumEntries, double* values, int_type* Indices);
1697
1698 template<typename int_type>
1699 int TReplaceGlobalValues(int_type Row, int NumEntries, const double * srcValues, const int_type *Indices);
1700
1701 template<typename int_type>
1702 int TSumIntoGlobalValues(int_type Row, int NumEntries, const double * srcValues, const int_type *Indices);
1703
1704 template<typename int_type>
1705 int ExtractGlobalRowCopy(int_type Row, int Length, int & NumEntries, double * values, int_type * Indices) const;
1706
1707 template<typename int_type>
1708 int ExtractGlobalRowCopy(int_type Row, int Length, int & NumEntries, double * values) const;
1709
1710 template<typename int_type>
1711 int ExtractGlobalRowView(int_type Row, int & NumEntries, double *& values, int_type *& Indices) const;
1712
1713 template<typename int_type>
1714 int ExtractGlobalRowView(int_type Row, int & NumEntries, double *& values) const;
1715
1716 template<typename int_type>
1717 int TCopyAndPermuteCrsMatrix(const Epetra_CrsMatrix& A,
1718 int NumSameIDs,
1719 int NumPermuteIDs,
1720 int* PermuteToLIDs,
1721 int* PermuteFromLIDs,
1722 const Epetra_OffsetIndex * Indexor,
1723 Epetra_CombineMode CombineMode);
1724
1725 template<typename int_type>
1726 int TCopyAndPermuteRowMatrix(const Epetra_RowMatrix& A,
1727 int NumSameIDs,
1728 int NumPermuteIDs,
1729 int* PermuteToLIDs,
1730 int* PermuteFromLIDs,
1731 const Epetra_OffsetIndex * Indexor,
1732 Epetra_CombineMode CombineMode);
1733
1734 template<typename int_type>
1735 int TUnpackAndCombine(const Epetra_SrcDistObject& Source,
1736 int NumImportIDs,
1737 int* ImportLIDs,
1738 int LenImports,
1739 char* Imports,
1740 int& SizeOfPacket,
1741 Epetra_Distributor& Distor,
1742 Epetra_CombineMode CombineMode,
1743 const Epetra_OffsetIndex * Indexor);
1744
1745 // Used for fused[import|export] constructors
1746 template<class TransferType>
1747 void FusedTransfer(const Epetra_CrsMatrix & SourceMatrix,
1748 const TransferType & RowTransfer,
1749 const TransferType* DomainTransfer,
1750 const Epetra_Map * DomainMap,
1751 const Epetra_Map * RangeMap,
1752 bool RestrictCommunicator);
1753
1754 public:
1755
1756 void FusedImport(const Epetra_CrsMatrix & SourceMatrix,
1757 const Epetra_Import & RowImporter,
1758 const Epetra_Map * DomainMap,
1759 const Epetra_Map * RangeMap,
1760 bool RestrictCommunicator);
1761
1762 void FusedExport(const Epetra_CrsMatrix & SourceMatrix,
1763 const Epetra_Export & RowExporter,
1764 const Epetra_Map * DomainMap,
1765 const Epetra_Map * RangeMap,
1766 bool RestrictCommunicator);
1767
1768 void FusedImport(const Epetra_CrsMatrix & SourceMatrix,
1769 const Epetra_Import & RowImporter,
1770 const Epetra_Import * DomainImporter,
1771 const Epetra_Map * DomainMap,
1772 const Epetra_Map * RangeMap,
1773 bool RestrictCommunicator);
1774
1775 void FusedExport(const Epetra_CrsMatrix & SourceMatrix,
1776 const Epetra_Export & RowExporter,
1777 const Epetra_Export * DomainExporter,
1778 const Epetra_Map * DomainMap,
1779 const Epetra_Map * RangeMap,
1780 bool RestrictCommunicator);
1781
1782
1783};
1784#endif /* EPETRA_CRSMATRIX_H */
Epetra_CombineMode
@ Zero
#define EPETRA_CHK_ERR(a)
Epetra_DataAccess
Epetra_BLAS: The Epetra BLAS Wrapper Class.
Definition: Epetra_BLAS.h:70
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:73
Epetra_CompObject: Functionality and data that is common to all computational classes.
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs.
int * All_Indices() const
int * IndexOffset() const
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
int GCID(int LCID_in) const
Returns the global column index for give local column index, returns IndexBase-1 if we don't have thi...
int NumAllocatedGlobalEntries(int Row) const
Returns the allocated number of nonzero entries in specified global row on this processor.
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 Filled() const
If FillComplete() has been called, this query returns true, otherwise it returns false.
int LRID(long long GRID_in) const
bool UseTranspose() const
Returns the current UseTranspose setting.
int NumGlobalEntries(long long Row) const
Returns the current number of nonzero entries in specified global row on this processor.
int InsertOffsetValues(long long GlobalRow, int NumEntries, const double *Values, const int *Indices)
const Epetra_Export * Exporter() const
Returns the Epetra_Export object that contains the export operations for distributed operations.
int NumMyCols() const
Returns the number of entries in the set of column-indices that appear on this processor.
bool StaticGraph()
Returns true if the graph associated with this matrix was pre-constructed and therefore not changeabl...
int MakeDataContiguous()
Eliminates memory that is used for construction. Make consecutive row index sections contiguous.
int SetAllocated(bool Flag)
bool Sorted() const
If SortEntries() has been called, this query returns true, otherwise it returns false.
const Epetra_Map & RowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
int GlobalMaxNumEntries() const
Returns the maximum number of nonzero entries across all rows on all processors.
bool MyGRID(int GRID_in) const
Returns true if the GRID passed in belongs to the calling processor in this map, otherwise returns fa...
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this matrix operator.
long long NumGlobalDiagonals64() const
bool MyGlobalRow(int GID) const
Returns true of GID is owned by the calling processor, otherwise it returns false.
int NumGlobalCols() const
Returns the number of global matrix columns.
Epetra_DataAccess CV_
int LCID(int GCID_in) const
Returns the local column index for given global column index, returns -1 if no local column for this ...
long long NumGlobalRows64() const
bool HaveColMap() const
Returns true if we have a well-defined ColMap, and returns false otherwise.
double * All_Values() const
long long NumGlobalNonzeros64() const
void SetStaticGraph(bool Flag)
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...
Epetra_CrsGraph Graph_
int LCID(long long GCID_in) const
const Epetra_Import * RowMatrixImporter() const
Returns the Epetra_Import object that contains the import operations for distributed operations.
bool HasNormInf() const
Returns true because this class can compute an Inf-norm.
long long IndexBase64() const
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global matrix.
bool Allocated() const
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
const Epetra_Map & ImportMap() const
Use ColMap() instead.
bool MyLCID(int LCID_in) const
Returns true if the LRID passed in belongs to the calling processor in this map, otherwise returns fa...
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.
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
const char * Label() const
Returns a character string describing the operator.
bool MyGlobalRow(long long GID) const
int NumMyDiagonals() const
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
int GRID(int LRID_in) const
Returns the global row index for give local row index, returns IndexBase-1 if we don't have this loca...
int NumGlobalDiagonals() const
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
const Epetra_CrsGraph & Graph() const
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
const Epetra_Map & RangeMap() const
Returns the Epetra_Map object associated with the range of this matrix operator.
int ExtractCrsDataPointers(int *&IndexOffset, int *&Indices, double *&Values_in) const
Returns internal data pointers associated with Crs matrix format.
int NumGlobalRows() const
Returns the number of global matrix rows.
double * Values(int LocalRow) const
int IndexBase() const
Returns the index base for row and column indices for this graph.
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.
const Epetra_Map & ColMap() const
Returns the Epetra_Map object that describes the set of column-indices that appear in each processor'...
bool StorageOptimized() const
If OptimizeStorage() has been called, this query returns true, otherwise it returns false.
bool IndicesAreLocal() const
If matrix indices has been transformed to local, this query returns true, otherwise it returns false.
bool NoRedundancies() const
If MergeRedundantEntries() has been called, this query returns true, otherwise it returns false.
Epetra_MultiVector * ExportVector_
int NumMyEntries(int Row) const
Returns the current number of nonzero entries in specified local row on this processor.
bool LowerTriangular() const
If matrix is lower triangular in local index space, this query returns true, otherwise it returns fal...
bool MyGCID(long long GCID_in) const
int MaxNumEntries() const
Returns the maximum number of nonzero entries across all rows on this processor.
int NumAllocatedMyEntries(int Row) const
Returns the allocated number of nonzero entries in specified local row on this processor.
bool MyGRID(long long GRID_in) const
bool UpperTriangular() const
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
const Epetra_Map & RowMatrixColMap() const
Returns the Epetra_Map object associated with columns of this matrix.
const Epetra_Map & DomainMap() const
Returns the Epetra_Map object associated with the domain of this matrix operator.
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
const Epetra_Import * Importer() const
Returns the Epetra_Import object that contains the import operations for distributed operations.
double ** Values() const
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.
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true,...
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this matrix operator.
long long GRID64(int LRID_in) const
bool NoDiagonal() const
If matrix has no diagonal entries in global index space, this query returns true, otherwise it return...
bool IndicesAreGlobal() const
If matrix indices has not been transformed to local, this query returns true, otherwise it returns fa...
int SortGhostsAssociatedWithEachProcessor(bool Flag)
Forces FillComplete() to locally order ghostnodes associated with each remote processor in ascending ...
const Epetra_Map & RowMatrixRowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
const Epetra_BlockMap & Map() const
Map() method inherited from Epetra_DistObject.
Epetra_MultiVector * ImportVector_
long long GCID64(int LCID_in) const
long long NumGlobalCols64() const
double *& ExpertExtractValues()
Returns a reference to the double* used to hold the values array.
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_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in pa...
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.
virtual int CheckSizes(const Epetra_SrcDistObject &Source)=0
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not.
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().
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().
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_DistObject & operator=(const Epetra_DistObject &src)
const Epetra_Comm & Comm() const
Returns the address of the Epetra_Comm for this multi-vector.
virtual void Print(std::ostream &os) const
Print method.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Definition: Epetra_Export.h:62
Epetra_Import: This class builds an import object for efficient importing of off-processor elements.
Definition: Epetra_Import.h:63
Epetra_IntSerialDenseVector: A class for constructing and using dense vectors.
Epetra_Map: A class for partitioning vectors and matrices.
Definition: Epetra_Map.h:119
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
virtual const char * Label() const
Epetra_Object Label access funtion.
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
virtual bool UseTranspose() const =0
Returns the current UseTranspose setting.
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices.
virtual long long NumGlobalNonzeros64() const =0
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.
virtual int ExtractDiagonalCopy(Epetra_Vector &Diagonal) const =0
Returns a copy of the main diagonal in a user-provided vector.
virtual long long NumGlobalRows64() const =0
virtual long long NumGlobalCols64() const =0
virtual int NumMyRowEntries(int MyRow, int &NumEntries) const =0
Returns the number of nonzero entries in MyRow.
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...
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.
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.
virtual bool UpperTriangular() const =0
If matrix is upper triangular in local index space, this query returns true, otherwise it returns fal...
virtual int RightScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x.
virtual double NormOne() const =0
Returns the one norm of the global matrix.
virtual double NormInf() const =0
Returns the infinity norm of the global matrix.
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.
virtual long long NumGlobalDiagonals64() const =0
virtual int LeftScale(const Epetra_Vector &x)=0
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x.
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.